OTLP Exporter Help
See original GitHub issueQuestion
Describe your environment.
TargetFramework: netcoreapp3.1
OpenTelemetry@0.7.0-beta.1
OpenTelemetry.Api@0.7.0-beta.1
OpenTelemetry.Exporter.OpenTelemetryProtocol@0.7.0-beta.1
OpenTelemetry.Extensions.Hosting@0.7.0-beta.1
OpenTelemetry.Instrumentation.AspNetCore@0.7.0-beta.1
OpenTelemetry.Instrumentation.Http@0.7.0-beta.1
FYI – I’ve also used more recent versions and got the same behavior
What are you trying to achieve? I’d like to use the OTLP exporter to post the captured telemetry data to a custom endpoint I built.
What did you expect to see? Expect to see the open telemetry data being posted to the endpoint I specify when configuring the SDK.
Additional Context
Here’s the piece of code I’m using at this point
services.AddOpenTelemetryTracing((builder) =>
{
builder
.AddAspNetCoreInstrumentation()
.AddHttpClientInstrumentation()
.AddOtlpExporter(otlpOptions =>
{
otlpOptions.Endpoint = "http://localhost:4000/";
});
});
In a nutshell, the above is pretty straightforward and I picked that up from docs but turns that it doesn’t post the data to the specified endpoint, and looking into the docs/code I couldn’t identify the reason why that has been happening 😞
Another interesting thing: I’ve been seeing the following exception being printed into the console which leads me to think that’s related to the post OTLP is trying to accomplish.
Exception generated: 'System.InvalidOperationException' em System.Private.CoreLib.dll
Exception generated: 'Grpc.Core.RpcException' em System.Private.CoreLib.dll
I feel that it’s a simple thing that I’m not being able to identify/see. Hope I can get some help from here and happy to help improve the docs to make that clear for someone else that face the same 👍
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
alright! that makes sense, thanks @alanwest
@utpilla - in fact, while reading your comment that made me realize that I can come up with a custom exporter, like MyCustomExporter, where I’d just normalize the info produced by OpenTelemetry and then post to my Endpoint, thanks for bringing this up!
Correct, while OTLP supports both HTTP and gRPC, currently the .NET OTLP exporter only has support for gRPC. Regular HTTP support will be added in the future.