-
Notifications
You must be signed in to change notification settings - Fork 858
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedGood for taking. Extra help will be provided by maintainersGood for taking. Extra help will be provided by maintainerspkg:OpenTelemetry.Shims.OpenTracingIssues related to OpenTelemetry.Shims.OpenTracing NuGet packageIssues related to OpenTelemetry.Shims.OpenTracing NuGet package
Description
Bug Report
List of all OpenTelemetry NuGet
packages and version that you are
using (e.g. OpenTelemetry 1.0.2):
AspNetCore app
Npgsql.OpenTelemetry 8.0.2OpenTelemetry 1.7.0OpenTelemetry.Exporter.Console 1.7.0OpenTelemetry.Extensions.Hosting 1.7.0OpenTelemetry.Instrumentation.AspNetCore 1.7.1OpenTelemetry.Instrumentation.Http 1.7.1OpenTelemetry.Instrumentation.Runtime 1.7.0OpenTelemetry.Shims.OpenTracing 1.7.0-beta.1
Library
OpenTracing 0.12.1
Runtime version (e.g. net462, net48, netcoreapp3.1, net6.0 etc. You can
find this information from the *.csproj file):
- net8.0 aspnetcore webapp
- net6.0 library
Symptom
When building and starting child spans using the TracerShim injected as OpenTracer ITracer, the ScopeManagerShim throws a ArgumentException
What is the expected behavior?
That a span is created and activated
What is the actual behavior?
System.ArgumentException: An item with the same key has already been added.
at System.Runtime.CompilerServices.ConditionalWeakTable`2.Add(TKey key, TValue value)
at OpenTelemetry.Shims.OpenTracing.ScopeManagerShim.Activate(ISpan span, Boolean finishSpanOnDispose)
at OpenTelemetry.Shims.OpenTracing.SpanBuilderShim.StartActive(Boolean finishSpanOnDispose)
at SubLibrary.SubClassWithOpenTracing.RecursiveChildSpan(String input, Int32 recursiveDepth) in .\OpenTelemetryTesting\SubLibrary\SubClassWithOpenTracing.cs:line 24
at SubLibrary.SubClassWithOpenTracing.ParentSpan(String input) in.\OpenTelemetryTesting\SubLibrary\SubClassWithOpenTracing.cs:line 18
at OpenTelemetryTesting.Program.<>c__DisplayClass0_0.<Main>b__0() in .\OpenTelemetryTesting\OpenTelemetryTesting\Program.cs:line 28
at lambda_method2(Closure, Object, HttpContext)
at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
Reproduce
https://github.com/tvandenheuvel/OpenTelemetryTesting
We will close this issue if:
- The repro project you share with us is complex. We can't investigate custom
projects, so don't point us to such, please. - If we can not reproduce the behavior you're reporting.
Blackbaud-IsaacInsley
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedGood for taking. Extra help will be provided by maintainersGood for taking. Extra help will be provided by maintainerspkg:OpenTelemetry.Shims.OpenTracingIssues related to OpenTelemetry.Shims.OpenTracing NuGet packageIssues related to OpenTelemetry.Shims.OpenTracing NuGet package