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
Update span limits to comply with specification #2637
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2637 +/- ##
=====================================
Coverage 75.6% 75.7%
=====================================
Files 172 172
Lines 11551 11619 +68
=====================================
+ Hits 8736 8798 +62
- Misses 2605 2611 +6
Partials 210 210
|
04e7ed4
to
d8eb930
Compare
7451a9a
to
8057d17
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
The only comment that stops me from approving is: mutating the attribute. the others are mostly color choices.
Update and unify documentation accordingly.
6c89ecb
to
c24c844
Compare
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
* PoC for span limit refactor * Rename config.go to span_limits.go * Add unit tests for truncateAttr * Add unit tests for non-string attrs * Add span limit benchmark tests * Fix lint * Isolate span limit tests * Clean span limits test * Test limits on exported spans * Remove duplicate test code * Fix lint * Add WithRawSpanLimits option * Add test for raw and orig span limits opts * Add changes to changelog * Add tests for span resource disabled * Test unlimited instead of default limit * Update docs * Add fix to changelog * Fix option docs * Do no mutate attribute * Fix truncateAttr comment * Remake NewSpanLimits to be newEnvSpanLimits Update and unify documentation accordingly. * Update truncateAttr string slice update comment * Update CHANGELOG.md Co-authored-by: Anthony Mirabella <a9@aneurysm9.com> Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Fix #2635
Fix #2636
OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT
OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT
OTEL_LINK_ATTRIBUTE_COUNT_LIMIT
WithSpanLimits
in favor of the newWithRawSpanLimits
.WithRawSpanLimits
supports0
and unlimited limits.WithSpanLimits
is updated to preserve existing behavior.Testing