这是indexloc提供的服务,不要输入任何密码
Skip to content

Follow spec on span limits, batch processors #7030

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

Merged
merged 3 commits into from
Jan 28, 2025

Conversation

onurkybsi
Copy link
Contributor

Addresses the issue mentioned #7024.

@onurkybsi onurkybsi requested a review from a team as a code owner January 17, 2025 06:35
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.96%. Comparing base (492b94f) to head (e6e26f9).
Report is 24 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7030      +/-   ##
============================================
- Coverage     89.99%   89.96%   -0.03%     
- Complexity     6596     6664      +68     
============================================
  Files           729      748      +19     
  Lines         19858    20088     +230     
  Branches       1955     1970      +15     
============================================
+ Hits          17871    18073     +202     
- Misses         1389     1423      +34     
+ Partials        598      592       -6     

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

Copy link
Contributor

@breedx-splk breedx-splk left a comment

Choose a reason for hiding this comment

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

This looks good to me. I had one small comment about a test, but looks fine. Thanks for the contribution!

assertThatThrownBy(() -> LogLimits.builder().setMaxNumberOfAttributes(0))
assertThatThrownBy(() -> LogLimits.builder().setMaxNumberOfAttributes(-1))
Copy link
Contributor

Choose a reason for hiding this comment

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

Oops, the -1 now appears in here twice. Might be nice to add a test case that covers the fact that 0 is now valid (no exception thrown).

@@ -46,23 +46,23 @@ void updateSpanLimits_All() {

@Test
void invalidSpanLimits() {
assertThatThrownBy(() -> SpanLimits.builder().setMaxNumberOfAttributes(0))
assertThatThrownBy(() -> SpanLimits.builder().setMaxNumberOfAttributes(-1))
Copy link
Member

@jack-berg jack-berg Jan 28, 2025

Choose a reason for hiding this comment

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

Looks like each of these test cases now duplicates a test case directly below it. Same comment as this.

*/
public BatchSpanProcessor build() {
checkArgument(
maxExportBatchSize <= maxQueueSize,
"maxExportBatchSize must be smaller or equal to maxQueueSize.");
Copy link
Member

Choose a reason for hiding this comment

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

Let's omit this for the time being, given @breedx-splk's comment here:

Why is this a requirement? Wouldn't it be ok to fill up an export batch with multiple queue drains?

@jack-berg jack-berg merged commit c4412f2 into open-telemetry:main Jan 28, 2025
25 checks passed
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.

3 participants