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.

In Jaeger I get "unknown_service:dotnet" and "Duplicate tag "peer.service:"

See original GitHub issue

List of NuGet packages and version that you are using: “OpenTelemetry.Exporter.Console” Version=“1.1.0-beta1” /> “OpenTelemetry.Exporter.Jaeger” Version=“1.0.1” /> “OpenTelemetry.Exporter.Zipkin” Version=“1.0.1” /> “OpenTelemetry.Extensions.Hosting” Version=“1.0.0-rc4” /> “OpenTelemetry.Instrumentation.AspNetCore” Version=“1.0.0-rc4” /> “OpenTelemetry.Instrumentation.Http” Version=“1.0.0-rc4” /> “OpenTelemetry.Instrumentation.SqlClient” Version=“1.0.0-rc4” />

Runtime version netcoreapp2.2

Question

In Jaeger I get “unknown_service:dotnet” and "Duplicate tag “peer.service:”

image

Describe your environment.

Startup.cs:

services.AddOpenTelemetryTracing((builder) => builder
    .AddAspNetCoreInstrumentation()
    .AddHttpClientInstrumentation()
    .AddSqlClientInstrumentation()
    .AddZipkinExporter(options =>
    {
        options.Endpoint = new Uri("http://zipkin.istio-system:9411/api/v2/spans");
    })
    );

Run application under kubernetes 1.18, jaegertracing/all-in-one:1.20, istio 1.9.2.

What are you trying to achieve?

What did you expect to see?

I’de like to have name situated in “peer.service” instead of unknown_service:dotnet, on my screen it should be “content”.

Additional Context

Problem is similar to described here: #2584 span.kind & peer.service

I still do not have any idea how to fix it. Could you help me, please.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
ElectricVampirecommented, Jul 19, 2021

@luizhlelis it works with JaegerExporter but jaegerExporter has limitation that it doesn’t support Http or grpc(https://github.com/open-telemetry/opentelemetry-dotnet/issues/2054) hence using ZipkinExporter which does support Http.

Jaeger has a port open for Zipkin traces as well (https://www.jaegertracing.io/docs/1.17/features/#backwards-compatibility-with-zipkin), hence we can still use ZipkinExporter for JaegerUI, so I would not say this as invalid configuration.

2reactions
robrichcommented, May 9, 2021

To set the name from unknown_service to something descriptive:

public void ConfigureServices(IServiceCollection services)
{
    // ... snip ...
    services.AddOpenTelemetryTracing((builder) => {
        builder
            .SetResourceBuilder(ResourceBuilder
                .CreateDefault()
                .AddService(env.ApplicationName)) // <-- sets service name
            .AddAspNetCoreInstrumentation();
            // .AddMoreThings :D
    // ... snip ...
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

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