Tyler Yahn
5bfa9c55be
Log warning when a trace attribute/event/link is discarded due to limits ( #5434 )
...
Fix #5343
- Update the `evictionQueue` to log when it drops a value
- Update the `evictionQueue` to be declared over an `[T any]` parameter
so it knows what to log when it is dropping a value and to reduce the
`interface{}` allocation
- Add a `clone` method to replace the now unneeded
`interfaceArrayTo*Array` functions.
- Update the `recordingSpan` to log once that is dropped an attribute
when limits are reached.
2024-05-30 11:40:08 -07:00
Robert Pająk
7dea232a46
[chore] Simplify the license header ( #4987 )
2024-02-29 07:05:28 +01:00
Liz Fong-Jones
4491b39db2
sdk/trace: use slices.Grow() to avoid excessive runtime.growslice() ( #4818 )
...
* sdk/trace: use slices.Grow() to avoid excessive runtime.growslice()
* go1.20 compat
* update go.mod/sum
* Update CHANGELOG.md
* Revert "update go.mod/sum"
This reverts commit 1e4fcfa86c
.
* inline slices.Grow as ensureAttributesCapacity
* fix comment
* add bench
* fix inlining
* Apply suggestions from code review
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* add ReportAllocs
* add benchmark variations with lower limit
* bugfix: we always want to set cap, just the value is a min()
* lint
---------
Co-authored-by: Robert Pająk <pellared@hotmail.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
2024-01-12 13:42:36 -08:00
wdullaer
b369e59ba1
Improve trace status handling ( #3214 )
...
* Implement specification compliant trace status handling
* Update trace/trace.go
Co-authored-by: Damien Mathieu <42@dmathieu.com>
* Update CHANGELOG.md
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
* chore: Make linter happy
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-09-23 11:39:53 -07:00
Joshua MacDonald
49a653682f
Safely truncate over-length string attributes ( #3156 )
...
* Safely truncate over-length string attributes
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
2022-09-12 09:54:58 -05:00
Tyler Yahn
0d0a7320e6
Update span limits to comply with specification ( #2637 )
...
* 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>
2022-03-03 07:56:07 -08:00