Skip to content
← Back to activity

Immutable solution version

In Asp.Net Core Can't export traces from OpenTelemetry exporter to elastic apm

Version 2Sign in to save

Complete solution

In Asp.Net Core Can't export traces from OpenTelemetry exporter to elastic apm: After some search, reinstall and debug I found my fault.

After some search, reinstall and debug I found my fault. I Downloaded AspNetCore sample from OpenTelemetry .net samples and I found that I should add next line in my code: AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);

Context: Recently, I found OpenTelemetry, and I like to use it in my application. First, I created a new Asp.Net Core 5 web API and exported traces on the console. After that, I tried OpenTelemetry.Exporter.OpenTelemetryProtocol for export traces to Elastic APM, but I couldn't see log or traces at elastic. In 3rd step, I used Elastic.Apm.NetCoreAll, and I successfully sent traces to APM. So I think my Elastic APM configurations are correct, but some configurations at asp are wrong. Ca

Matched source

Source: Source: https://stackoverflow.com/questions/71222918/in-asp-net-core-cant-export-traces-from-opentelemetry-exporter-to-elastic-apm Original query: "In Asp.Net Core Can't export traces from OpenTelemetry exporter to elastic apm" Key terms: core, elastic, export, exporter, opentelemetry, traces

Evidence

Source: Recently, I found OpenTelemetry, and I like to use it in my application. First, I created a new Asp.Net Core 5 web API and exported traces on the console. After that, I tried OpenTelemetry.Exporter.OpenTelemetryProtocol for export traces to Elastic APM, but I couldn't see log or traces at elastic. In 3rd step, I used Elastic.Apm.NetCoreAll, and I successfully sent traces to APM. So I think my Elastic APM configurations are correct, but some configurations at asp are wrong. Ca

Verified resolution: After some search, reinstall and debug I found my fault. I Downloaded AspNetCore sample from OpenTelemetry .net samples and I found that I should add next line in my code: AppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport", true);

Source URL: https://stackoverflow.com/questions/71222918/in-asp-net-core-cant-export-traces-from-opentelemetry-exporter-to-elastic-apm

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_XnOEMS3pPUDxU1r-cV0kfQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">In Asp.Net Core Can&#39;t export traces from OpenTelemetry exporter to elastic apm <span>— Vectle</span></a>