Start using the new SizeConfig#12486
Merged
Merged
Conversation
bogdandrutu
commented
Feb 25, 2025
c41d07d to
9220c8a
Compare
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (85.10%) 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 #12486 +/- ##
==========================================
- Coverage 92.19% 92.16% -0.04%
==========================================
Files 465 465
Lines 25204 25208 +4
==========================================
- Hits 23238 23233 -5
- Misses 1570 1576 +6
- Partials 396 399 +3 ☔ View full report in Codecov by Sentry. |
dmitryax
reviewed
Feb 25, 2025
d8907a4 to
b000208
Compare
dmitryax
reviewed
Feb 25, 2025
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
1b8a6e0 to
7891ea3
Compare
jmacd
approved these changes
Feb 25, 2025
axw
reviewed
Feb 27, 2025
Comment on lines
+59
to
+64
| if c.MinSizeItems != nil { | ||
| c.SizeConfig.MinSize = *c.MinSizeItems | ||
| } | ||
| if c.MaxSizeItems != 0 && c.MaxSizeItems < c.MinSizeItems { | ||
| return errors.New("max_size_items must be greater than or equal to min_size_items") | ||
|
|
||
| if c.MaxSizeItems != nil { | ||
| c.SizeConfig.MaxSize = *c.MaxSizeItems |
Contributor
There was a problem hiding this comment.
The doc comments above say:
// Deprecated: [v0.121.0] Ignored if SizeConfig is set.
MinSizeConfig `mapstructure:",squash"`
// Deprecated: [v0.121.0] Ignored if SizeConfig is set.
MaxSizeConfig `mapstructure:",squash"... whereas here we're overriding SizeConfig with Min/MaxSizeConfig if they're set. Behaviour/docs don't seem to line up.
axw
added a commit
to axw/opentelemetry-collector-contrib
that referenced
this pull request
Feb 27, 2025
axw
added a commit
to axw/opentelemetry-collector-contrib
that referenced
this pull request
Feb 27, 2025
axw
added a commit
to axw/opentelemetry-collector-contrib
that referenced
this pull request
Feb 27, 2025
axw
added a commit
to axw/opentelemetry-collector-contrib
that referenced
this pull request
Feb 27, 2025
dmitryax
pushed a commit
to open-telemetry/opentelemetry-collector-contrib
that referenced
this pull request
Feb 27, 2025
#### Description Updated BatcherConfig to support the new SizeConfig, which replaces the now-deprecated MinSizeItems and MaxSizeItems. BatcherConfig now embeds the exporterbatcher.Config and sets an additional unexported field to track whether `batcher::enabled` has been set. See open-telemetry/opentelemetry-collector#12486 #### Link to tracking issue N/A #### Testing Added unit test #### Documentation Updated README.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR also temporary removes "bytes" as supported sizer type since it is not yet implemented.