Skip to content

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
@codecov
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!

@Test
void invalidLogLimits() {
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).

@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

3 participants