opentelemetry-go-instrumentation
opentelemetry-go-instrumentation copied to clipboard
uprobe_ClientConn_Invoke is not writing Traceparent/grpc-trace-bin to Outgoing Metadata
I wonder why we don't write an outgoing metadata, instead we inject the traceID and spanID to request? I found that the traceparent / grpc-trace-bin data is not injected to the metadata.
Anyone able to explain me regarding this? Thank you 🙇
https://github.com/open-telemetry/opentelemetry-go-instrumentation/blob/7218a9d1d405e9f27949c4502c53b7013ed108ca/internal/pkg/instrumentation/bpf/google.golang.org/grpc/client/bpf/probe.bpf.c#L67-L126
What are the advantages of injecting to the metadata over the current approach ?
What are the advantages of injecting to the metadata over the current approach ?
I'm currently using istio to generate traceparent header, I found that since the traceparent is not passed to metadata, istio will try to generate one on every gRPC call, I have tried to reproduce it on my local and it creates two different traceID
meanwhile if I manually inject the the Traceparent to the outgoing metadata, istio detected it so it won't create a new traceID
is this expected @RonFed ?
it's weird, whenever I create a connection using grpc.Dial, I have to manually inject the Traceparent to the outgoing metdadata, meanwhile if I create the connection using grpc.DialContext(context.Background(), ...), I don't need to manually inject it. Is this expected? If yes, could you please help to locate the docs/code regarding this? thank you :bow: