-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
service.name is not propagate to Jaeger using trace HTTP exporter #4486
Comments
I've just tried booting the jaeger-all-in-one docker container on my machine, and running the otel-collector example: https://github.com/open-telemetry/opentelemetry-go/tree/main/example/otel-collector |
If this is an issue between the collector and jaeger, shouldn't it be in the opentelemetry-collector repository ? |
I manage to create a minimum example with the error: I solved the issue by changing the way I create the resource, using the one in the otel-collector example: r, _ := resource.New(context.Background(),
resource.WithAttributes(
// the service name used to display traces in backends
semconv.ServiceName("test-service"),
),
) with this the service.name is propagated correctly to jaeger. |
From your original example, it's possible/likely you have a resource merge error, giving you an empty resource. Try the following: r, err := resource.Merge(
resource.Default(),
resource.NewWithAttributes(
semconv.SchemaURL,
semconv.ServiceName("my_service"),
semconv.ServiceVersion("v0.1"),
),
)
if err != nil {
log.Fatal(err)
} Resource merges being problematic is a known issue. See #2341 With the example above, I'm getting resource merge errors if I use the latest library with semconv < 1.21.0. |
yes, that is the issue: 2023/09/12 09:33:16 cannot merge resource due to conflicting Schema URL The way of creating the resource is in the Getting Started doc, maybe it can be updated for avoiding this error: thanks for your support! |
The getting started doc documents the proper way of doing it. The problem here is the larger issue of resource versions which are hard to tackle/upgrade. |
Already part of open-telemetry/opentelemetry.io#3235 |
Description
It seems that service.name is not propagated to jaeger when we integrate open telemetry-go using otlptracehttp. At jaeger ui, we see OTLPResourceNoServiceName instead of the service name.
We checked the contexts of the service post to jaeger and the label "my_service" is not in the protobuf message.
Environment
Steps To Reproduce
Expected behavior
We expect that service.name is propagated to jaeger.
The text was updated successfully, but these errors were encountered: