Arnab Karmakar has uploaded this change for review. ( http://gerrit.cloudera.org:8080/24706
Change subject: IMPALA-14752: Support W3C trace context propagation for hs2-http ...................................................................... IMPALA-14752: Support W3C trace context propagation for hs2-http Impala now supports W3C Trace Context propagation via the 'traceparent' and 'tracestate' HTTP headers for hs2-http protocol connections. When a client sends these headers, Impala's query root span uses the propagated trace ID and creates a child span of the client's span, enabling end-to-end distributed tracing across service boundaries. Implementation details: - Modified THttpServer to parse traceparent and tracestate headers in HTTP requests and propagate them via ConnectionContext - Extended ClientRequestState to snapshot HTTP trace context at query creation time from the thread's connection context - Added otel-propagation module with ExtractSpanContextFromHttpHeaders() using OpenTelemetry C++ HttpTraceContext propagator - Updated OtelTraceManager to use propagated span context as parent instead of creating a new root trace when valid context is provided - Enhanced Python ImpalaHS2Client to accept and send traceparent and tracestate headers via custom_http_headers Without these headers, behavior remains unchanged - each query creates a new independent trace as before. Testing: - Added unit test OtelTest.ExtractSpanContextFromHttpHeaders. - Added integration test verifying propagated trace ID and parentspan ID are correctly used. Change-Id: Ieac548f4f5f613ba116d1a79d95e31b7a1a37b97 --- M be/src/observe/CMakeLists.txt A be/src/observe/otel-propagation.cc A be/src/observe/otel-propagation.h M be/src/observe/otel-test.cc M be/src/observe/otel-trace-manager.cc M be/src/rpc/authentication.cc M be/src/rpc/thrift-server.h M be/src/service/client-request-state.cc M be/src/service/client-request-state.h M be/src/transport/THttpServer.cpp M be/src/transport/THttpServer.h M shell/impala_shell/ImpalaHttpClient.py M shell/impala_shell/impala_client.py M tests/custom_cluster/test_otel_trace.py M tests/util/otel_trace.py 15 files changed, 291 insertions(+), 15 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/06/24706/1 -- To view, visit http://gerrit.cloudera.org:8080/24706 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ieac548f4f5f613ba116d1a79d95e31b7a1a37b97 Gerrit-Change-Number: 24706 Gerrit-PatchSet: 1 Gerrit-Owner: Arnab Karmakar <[email protected]>
