-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple instances of OpenTelemetry-Sdk
EventSource
#4516
Comments
You have never disposed/stopped acivity. Please try following code while(true)
{
using (var activity = activitySource.StartActivity("SayHello"))
{
activity?.SetTag("foo", 1)
.SetTag("bar", "Hello, World!")
.SetTag("baz", new int[] {1, 2, 3})
.SetStatus(ActivityStatusCode.Ok);
counter.Add(1);
await Task.Delay(TimeSpan.FromSeconds(5));
}
Console.WriteLine("------------------------------------------------------------------");
} |
Oups, good catch... converted from vb.net and missed it |
I was not able to reproduce this issue, but definitely it should not occur. Do you have full stacktrace? |
|
I think that now I understand where there issue occurs.
In each of this projects instance of this class can be instantiated separately. It will leads to The guid is generated from The goal, should be to have only one instance of objects which is creating this EventSource. @open-telemetry/dotnet-approvers, What is more, it is a good candidate to fix in 1.5.0, so please assign to this milestone. |
OpenTelemetry-Sdk
EventSource
We have had similar issue is automatic-instrumentation repository. The (tricky) solution: open-telemetry/opentelemetry-dotnet-instrumentation#2145 |
@pellared This is a bit short notice to be completed in |
Bug Report
List of all OpenTelemetry NuGet
packages and version that you are
using (e.g.
OpenTelemetry 1.0.2
):Runtime version (e.g.
net462
,net48
,netcoreapp3.1
,net6.0
etc. You canfind this information from the
*.csproj
file):Symptom
I have a console app that generate metrics & traces for testing purpose with a console & otlp exporter.
I'm receiving the metrics but no traces.
I have another test app in
dotnet core
on the same endpoint that works fine.What is the expected behavior?
I want both metric & traces
What is the actual behavior?
I only get the metrics in my OTEL system
Reproduce
You can use this repo : https://github.com/MrLuje/opentelemetry-netfx-issue but fullcode below :
Additional Context
In debug, I got an exception when calling
Sdk.CreateTracerProviderBuilder
Diagnostic (OTEL_DIAGNOSTICS) run below :
The text was updated successfully, but these errors were encountered: