Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[exporter][batcher] Add the API ByteSize() to exporter.Request #12153

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sfc-gh-sili
Copy link
Contributor

Description

This PR adds the API to ByteSize() to exporter.Request

Link to tracking issue

#3262

Testing

Documentation

@sfc-gh-sili sfc-gh-sili requested review from bogdandrutu, dmitryax and a team as code owners January 22, 2025 03:05
@sfc-gh-sili sfc-gh-sili force-pushed the sili-bytes-based-batching-pre branch from cf461ca to 5d09bf6 Compare January 22, 2025 03:28
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 91.21%. Comparing base (e8807bf) to head (99a33d7).
Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
exporter/internal/requesttest/fake_request.go 0.00% 4 Missing ⚠️

❌ Your patch check has failed because the patch coverage (66.66%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12153      +/-   ##
==========================================
- Coverage   91.75%   91.21%   -0.54%     
==========================================
  Files         464      466       +2     
  Lines       24763    25668     +905     
==========================================
+ Hits        22722    23414     +692     
- Misses       1656     1841     +185     
- Partials      385      413      +28     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@dmathieu dmathieu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we add tests?

exporter/internal/request.go Outdated Show resolved Hide resolved
@sfc-gh-sili sfc-gh-sili force-pushed the sili-bytes-based-batching-pre branch from 5d09bf6 to bba043f Compare January 29, 2025 00:38
@sfc-gh-sili sfc-gh-sili requested a review from dmathieu January 29, 2025 00:47
@sfc-gh-sili
Copy link
Contributor Author

@dmathieu Hi Damien, I added a couple of tests to check the new API. Would you mind taking another look?

@@ -43,6 +43,8 @@ var (

func TestLogsRequest(t *testing.T) {
lr := newLogsRequest(testdata.GenerateLogs(1), nil)
assert.Equal(t, 1, lr.ItemsCount())
assert.Equal(t, logsMarshaler.LogsSize(testdata.GenerateLogs(1)), lr.ByteSize())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, this (and the other tests) should test against a static value.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good!

@sfc-gh-sili sfc-gh-sili requested a review from dmathieu January 31, 2025 07:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants