Open ndrwrbgs opened 2 years ago
This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day.
Is there anything more I can provide to reproduce the issue?
Bug Report
List of NuGet packages and version that you are using (e.g.
OpenTelemetry 1.0.2
):Runtime version (e.g.
net461
,net48
,netcoreapp3.1
,net5.0
etc. You can find this information from the*.csproj
file):Symptom
ScopeManagerShim.Active returns a Scope whose Dispose() is NOOP (it does not tell OpenTel about the
finish
).Specifically, this line in .Active:
return new ScopeInstrumentation(currentSpan);
What is the expected behavior?
GlobalTracer.Instance.Active.Dispose() should correctly orchestrate the call back to OpenTel
What is the actual behavior?
Spans never get closed in OpenTel. There's no deconstructor on the ScopeInstrumentation either, so if Dispose is not explicitly called (with the disposeAction supplied) OpenTel never gets told about the span at all
Reproduce
Honestly, my network connection is being crazy slow right now, so I won't provide a whole repo. Here's the call format you'll observe it with though. If it's too much effort to reproduce please let me know and I'll provide more!
(proactive note in case the suggestion comes: I cannot simply refactor the call format, because the calls are actually being generated by a library which cannot save the state between them to reuse the object from Activate(). A workaround to call GlobalTracer.Instance.ActiveSpan.Finish() would work with this library, but deviate from the OpenTracing semantics)