Open mostafafarzaneh opened 5 months ago
I think this may be related to import-ordering (@grpc/grpc-js
) is required before the instrumentation is enabled, which means it's never instrumented. It's a limitation of the way we can currently configure the exporters as there's no way to programmatically pass metadata without requiring @grpc/grpc-js
.
Temporary Fix: setting the env var OTEL_EXPORTER_OTLP_INSECURE=true
, don't set credentials
in the exporter, and only require @grpc/grpc-js
in the server code after the instrumentation is registered.
Permanent Fix: I'll work on a way to allow us setting the metadata/credentials so that users don't have to to require @grpc/grpc-js
for it - I've prepared something like this in the GrpcExporterTransport
a while ago, we just have to expose it to users via the exporter itself.
What version of OpenTelemetry are you using?
What version of Node are you using?
v20.12.1
What did you do?
I have a NodeJs gRPC server that serves a Golang gRPC client. The client and server are set up to generate open telemetry traces and it is configured to be compatible with Xray. The problem is that the NodeJs server generates traces that are not connected to client traces. I can see in the Xray console that the client and server traces are not connected.
Here is the server code:
and here is the otel code:
I generated a debug in the client application and here is the trace:
x-amzn-trace-id:[Root=1-661c9fab-031aa61a7481ac4925ee28d0;Parent=568846939e558d55;Sampled=1]
and here is the debug in the server
What did you expect to see?
I was expecting that the traces from the client to server are connected.
What did you see instead?
I can see in the XRay console that the client sends traces to a remote service instead of a NodeJs service, and can see a separate traces fro NodeJs server
Additional context