enhance: Support trace context propagation and traceID visibility
Describe the feature: Support trace context propagation and traceID visibility
Describe a specific use case for the feature: The client must pass the trace context with each request to ensure the trace can be propagated across all downstream services. Additionally, when a request fails or encounters an error, the client needs the ability to log or display the specific traceID associated with the failed request.
This capability allows developers and operators to:
- Identify the exact trace path of the failed request across the system.
- Debug and pinpoint the root cause of the error by correlating logs and metrics using the traceID.
- Provide observability and insight into client-side request behaviors in the context of the broader system.
For example, if a client makes a request to Milvus service and receives an error response, the client can log the traceID from the trace context. This traceID can then be used to investigate the issue in distributed tracing tools, enabling quick identification of which service in the chain caused the failure.
can you show me how to implement this? example or docs?
Hello, There's no need to manually instrument the grpc-js library to propagate OpenTelemetry trace context. The official OpenTelemetry JavaScript SDK supports automatic instrumentation of grpc-js, as demonstrated in their official example.
I've created a demo application at topikachu/milvus-nodejs-otel to showcase this integration with the Milvus client.
I recommend aligning with the OpenTelemetry community's practices and deprecating or discouraging manual instrumentation in favor of the officially supported auto-instrumentation approach.
Hello, There's no need to manually instrument the grpc-js library to propagate OpenTelemetry trace context. The official OpenTelemetry JavaScript SDK supports automatic instrumentation of grpc-js, as demonstrated in their official example.
I've created a demo application at topikachu/milvus-nodejs-otel to showcase this integration with the Milvus client.
I recommend aligning with the OpenTelemetry community's practices and deprecating or discouraging manual instrumentation in favor of the officially supported auto-instrumentation approach.
This is cool, thank you for the example repo. I will follow your instruction soon.