-
Notifications
You must be signed in to change notification settings - Fork 522
SpanLimits going over limit set for max events per spans #1148
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
Comments
Just verified all the limit options:
|
Investigating this further, I think this is a bug with |
The EvictedQueue was checking for the length _before_ inserting, and popping extra items, then doing the insertion. In the case where the capacity is set to zero, it caused the pop operation to be a no-op on the first insert, and then insert an item anyway. This commit fixes the issue by moving the length check after the insert and popping any extra items. Fixes open-telemetry#1148
The EvictedQueue was checking for the length _before_ inserting, and popping extra items, then doing the insertion. In the case where the capacity is set to zero, it caused the pop operation to be a no-op on the first insert, and then insert an item anyway. This commit fixes the issue by moving the length check after the insert and popping any extra items. Fixes open-telemetry#1148
@wperron Can you describe more what is the use case for setting the limit to 0 for span events? It is mentioned this is needed for tracing-opentelemetry - but not clear.. If the intention is not to send tracing events as Otel Span Events, then tracing-opentelemetry can provide a bool flag to control that, right? If you can comment on #1283 (comment), that'd help while working on some improvements (including potentially removing this feature) in the area! |
I'm trying to set the limit on events per spans to 0, but events are still being exported, bypassing the limit set in the config. Here's a minimal repro:
Outputs:
I thought this might be an edge case for
0
and tried setting the limit to1
but the same issue appears. I also tried overwriting the limit in code rather than through the environment variable, no luck.I haven't looked to see if this also applied to the other limits as well.
Edit: This also has a negative side effect when setting events with
SpanBuilder
, if the limit is set to 0 in that case, all the events are attached to the EvictedQueue, basically putting no limit on the number of events or links on a span.This particularly affects tracing-opentelemetry since that's how they create OpenTelemetry spans from their spans.
The text was updated successfully, but these errors were encountered: