question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OTLP Exporter Help

See original GitHub issue

Question

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:closed
  • Created 3 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
zfaelcommented, Feb 15, 2021

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!

1reaction
alanwestcommented, Feb 12, 2021

so you are saying that a regular HTTP endpoint would not properly fit as a target for the OtlpExporter exporter?

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

OpenTelemetry Protocol Exporter
This document specifies the configuration options available to the OpenTelemetry Protocol (OTLP) Exporter as well as the retry behavior.
Read more >
Getting Started with the OTLP Exporters
An exporter is a component in the OpenTelemetry Collector configured to send data to different systems/back-ends. Different exporters converts OpenTelemetry ...
Read more >
otelcol.exporter.otlp | Grafana Agent documentation
otelcol.exporter.otlp accepts telemetry data from other otelcol components and writes them over the network using the OTLP gRPC protocol. NOTE: ...
Read more >
opentelemetry-collector/exporter/README.md at main
An exporter is how data gets sent to different systems/back-ends. ... Available trace exporters (sorted alphabetically):. OTLP gRPC · OTLP HTTP.
Read more >
OpenTelemetry OTLP Exporters
The OTLP Span Exporter allows to export OpenTelemetry traces to the OTLP collector. You can configure the exporter with the following environment variables:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found