Jason Fehr has uploaded a new patch set (#10). ( http://gerrit.cloudera.org:8080/23777 )
Change subject: IMPALA-14370: [Patch 1 of 2] - OpenTelemetry Query Tracing Skips Queries with Leading Comments ...................................................................... IMPALA-14370: [Patch 1 of 2] - OpenTelemetry Query Tracing Skips Queries with Leading Comments Since OpenTelemetry traces must be opened before query planning starts, a rudimentry text parser was implemented to determine, based on the first query keyword, if the query should be traced. This parser could be fooled by a multiline comment such as: /*/ comment */ select * from db.tbl This type of leading comment would cause query tracing to be skipped. Removes this parser using the frontend's parsing result to determine if a query should be traced. The backend now queues a copy of all necessary data until the frontend parses the query. At that point, a JNI call is made to the backend letting it know whether or not to trace the query. The backend either discards the queued data or starts the OpenTelemetry trace and sends it to the trace management system. A new backend class has been added named "BufferedSpan". This class replaces the existing "TimedSpan" class. This new class has the ability to queue all necessary data for the root, init, submitted, and planning spans until it is notified to start an OpenTelemetry trace via the OpenTelemetry-cpp SDK. At that point, it creates a new root span with child spans init and submitted started/ended and sent to the OpenTelemetry trace management system. A planning child span is also started via the SDK but not ended. The other child spans AdmissionControl, QueryExecution, and Close are started and ended in real time as those phases of the query lifecycle start/end. Testing accomplished witg existing tests passing along with new ctest and custom cluste tests added. The full EE test suite passed with tracing enabled as part of the cluster start args. Generated-by: Github Copilot (GPT-5.3-Codex) Change-Id: I1425b32006f81586bf75c2e4045d23bab91e1611 --- M be/src/observe/CMakeLists.txt A be/src/observe/buffered-span.cc A be/src/observe/buffered-span.h M be/src/observe/otel-flags-trace.cc M be/src/observe/otel-test.cc M be/src/observe/otel.cc M be/src/observe/otel.h A be/src/observe/span-manager-test.cc M be/src/observe/span-manager.cc M be/src/observe/span-manager.h D be/src/observe/timed-span.cc D be/src/observe/timed-span.h M be/src/runtime/query-driver.cc M be/src/service/client-request-state.cc M be/src/service/client-request-state.h M be/src/service/fe-support.cc M be/src/service/impala-server.cc M be/src/service/impala-server.h M be/src/testutil/rand-util.h M be/src/util/backend-gflag-util.cc M common/thrift/BackendGflags.thrift M fe/src/main/java/org/apache/impala/analysis/AnalysisContext.java M fe/src/main/java/org/apache/impala/service/BackendConfig.java M fe/src/main/java/org/apache/impala/service/FeSupport.java M fe/src/main/java/org/apache/impala/service/Frontend.java M tests/common/impala_test_suite.py M tests/custom_cluster/test_otel_trace.py M tests/util/cancel_util.py M tests/util/otel_trace.py 29 files changed, 1,289 insertions(+), 809 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/77/23777/10 -- To view, visit http://gerrit.cloudera.org:8080/23777 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I1425b32006f81586bf75c2e4045d23bab91e1611 Gerrit-Change-Number: 23777 Gerrit-PatchSet: 10 Gerrit-Owner: Jason Fehr <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]> Gerrit-Reviewer: Surya Hebbar <[email protected]> Gerrit-Reviewer: Yida Wu <[email protected]>
