opentelemetry-dotnet: AddOtlpExporter seems to be causing a crash?

Bug Report

        <PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.0.0-rc1.1" />
        <PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.0.0-rc1.1" />
        <PackageReference Include="OpenTelemetry" Version="1.0.0-rc1.1" />
        <PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.0.0-rc1.1" />

Running on net5.0

Symptom

It seems like when I use the following in my ASP.net Core project:

            services.AddOpenTelemetryTracing((builder) =>
            {
                builder
                    .AddSource(projectName)
                    .SetSampler(new AlwaysOnSampler())
                    .AddAspNetCoreInstrumentation()
                    .AddOtlpExporter();
            });

I get a segfault with the message: Process finished with exit code 139.

Note: If I remove AddOtlpExporter() everything boots fine.

What is the expected behavior? Normal application bootup.

What is the actual behavior? The segfault.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 16 (10 by maintainers)

Most upvoted comments

Ah, yes, sorry I had missed your previous statement regarding Ubuntu. I’m able to reproduce what you’re seeing. Still not yet sure why, but I can confirm that #1634 does not resolve this issue.

Sadly we just ran into the same problem. Added unhandled Task & App Exception Handling to maybe catch & log the exceptions which did not help. For us it looks like the crash happens when the first trace/log/metric is exported.

Ok i couldn’t repro in windows. Will try Linux.