-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
area:tracePart of OpenTelemetry tracingPart of OpenTelemetry tracingpkg:SDKRelated to an SDK packageRelated to an SDK package
Milestone
Description
If span processors are intended for more than just exporters, then it would be nice if OnEnd was called on the processors in reverse order. This makes it possible to create a span filter that removes short spans for example since EndTime is obviously only available on end and it's critical that the filter runs before the exporter.
I was able to hack it into span.End like so:
i := len(sps)
rev := make([]SpanProcessor, i)
for sp := range sps {
i--
rev[i] = sp
}
for _, sp := range rev {
sp.OnEnd(sd)
}Metadata
Metadata
Assignees
Labels
area:tracePart of OpenTelemetry tracingPart of OpenTelemetry tracingpkg:SDKRelated to an SDK packageRelated to an SDK package