opentelemetry-dotnet icon indicating copy to clipboard operation
opentelemetry-dotnet copied to clipboard

The link tracing information displayed by Zipkin is incorrect

Open benxionghu opened this issue 3 years ago • 4 comments

Question

Item link error in Zipkin

I have a demo project, called link is gateway - > payapi - > orderApi - > ProductApi, but he was payapi orderApi/ProductApi display link is wrong

Describe your environment. NetCore 6.0 OpenTelemetry 1.2.0-rc1 OpenTelemetry.Exporter.Zipkin 1.2.0-rc1 OpenTelemetry.Extensions.Hosting 1.0.0-rc8

The way I inject it:

 public static IServiceCollection AddZipKin(this IServiceCollection services, string serverName, string zipUrl)
        {
            var serviceVersion = "1.0.0";
            return services.AddOpenTelemetryTracing(tracing =>
            {
                tracing.AddConsoleExporter()
                    .SetResourceBuilder(ResourceBuilder.CreateDefault().AddService(serverName, serviceVersion))
                    //.AddHttpClientInstrumentation()
                    .AddAspNetCoreInstrumentation()
                    //.AddCapInstrumentation()
                    .AddZipkinExporter(options =>
                    {
                        options.Endpoint = new System.Uri(zipUrl);
                        options.HttpClientFactory = () =>
                        {
                            HttpClient client = new HttpClient();
                            client.DefaultRequestHeaders.Add("X-MyCustomHeader", "value");
                            return client;
                        };
                    });
            });
        }

Describe any aspect of your environment relevant to the question. Error request link display diagram: image

image

What are you trying to achieve?

I think the correct display would be gateway--> PayAPI -->orderApi-->ProductApi,

I'm not sure if I'm missing something or is this a problem in the latest version

What did you expect to see?

Additional Context

Add any other context about the problem here. If you followed an existing documentation, please share the link to it.

benxionghu avatar Jan 18 '22 08:01 benxionghu