Skip to content
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

Log warning when a trace attribute/event/link is discarded due to limits #5434

Merged
merged 8 commits into from
May 30, 2024

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented May 29, 2024

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.

@MrAlias MrAlias added pkg:SDK Related to an SDK package area:trace Part of OpenTelemetry tracing labels May 29, 2024
@MrAlias MrAlias added this to the v1.28.0 milestone May 29, 2024
Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@fad23ee). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff           @@
##             main   #5434   +/-   ##
======================================
  Coverage        ?   84.6%           
======================================
  Files           ?     268           
  Lines           ?   17823           
  Branches        ?       0           
======================================
  Hits            ?   15082           
  Misses          ?    2428           
  Partials        ?     313           
Files Coverage Δ
sdk/trace/evictedqueue.go 100.0% <100.0%> (ø)
sdk/trace/span.go 87.6% <100.0%> (ø)
sdk/trace/tracer.go 100.0% <100.0%> (ø)

@MrAlias MrAlias changed the title Log warning an trace attribute/event/link is discarded due to limits Log warning when a trace attribute/event/link is discarded due to limits May 29, 2024
@MrAlias MrAlias marked this pull request as ready for review May 29, 2024 19:26
@MrAlias MrAlias merged commit 5bfa9c5 into open-telemetry:main May 30, 2024
26 checks passed
@MrAlias MrAlias deleted the log-trace branch May 30, 2024 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:trace Part of OpenTelemetry tracing pkg:SDK Related to an SDK package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sdk/trace: Log when an attribute/event/link is discarded due to limits
4 participants