SpanProcessor.OnEnd never gets called if FilterHttpRequestMessage returns false #5415
Unanswered
jamescrosswell
asked this question in
Q&A
Replies: 1 comment 1 reply
-
This maybe tricky.. If recording (isalldatarequested flag) is false, then processors won't be invoked, so this is by-design. But it is questionable whether the filter should flip the recording decision... If your goal is to listen to all activity start/stop calls, irrespective of filtering/other things, then a workaround would be to setup an ActivityListener yourself - this will be called no matter what the filtering is done! Also - why are you modelling this as a processor? Can you use an exporter to convert spans to sentryspans? (Ignore this, if you have a reason for this approach. I am curious as to why!) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The Sentry OpenTelemetry integration uses a custom
SpanProcessor
that listens forOnStart
andOnEnd
events to create aSentrySpan
for each OpenTelemetryActivity
.For the most part, this works well. However if
HttpClientInstrumentationOptions.FilterHttpRequestMessage
is configured, any traces for outgoing HttpClient requests that get filtered by that delgate triggerSpanProcessor.OnStart
but never triggerSpanProcessor.OnEnd
... which is of course problematic.A couple of questions:
HttpClientInstrumentationOptions.FilterHttpRequestMessage
?Beta Was this translation helpful? Give feedback.
All reactions