-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Some exporter classes (e.g. OtlpHttpSpanExporter) are currently implemented as value classes. However they contain handle properties which should not be shallow-copied. This can result in wrong and confusing behaviors.
import opentelemetry.sdk.trace.*
import opentelemetry.exporters.otlp.OtlpHttpSpanExporter
exp = OtlpHttpSpanExporter; % create an exporter
exp1 = exp; % make a copy
exp1.Endpoint = "bogus"; % mess up the endpoint of the copy
proc = SimpleSpanProcessor(exp); % use the original that supposedly be still using default settings
tp = TracerProvider(proc);
tr = getTracer(tp, "foo");
sp = startSpan(tr, "bar");
endSpan(sp);
The above code will not export the span to the default collector location, because exp and exp1 still share the same backend even though they appear to be independent copies.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working