From f23e729d19bd52656b5621d4ad849141a7dab406 Mon Sep 17 00:00:00 2001 From: alrocar Date: Thu, 11 Sep 2025 13:02:21 +0200 Subject: [PATCH] feat: add trace details endpoint for Jaeger compatibility --- endpoints/trace_details.pipe | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 endpoints/trace_details.pipe diff --git a/endpoints/trace_details.pipe b/endpoints/trace_details.pipe new file mode 100644 index 0000000..683d14d --- /dev/null +++ b/endpoints/trace_details.pipe @@ -0,0 +1,19 @@ +DESCRIPTION > + Endpoint to get trace details by trace ID with Jaeger-compatible format + +NODE trace_details_node +SQL > + % + SELECT + TraceId AS traceID, + SpanId AS spanID, + SpanName AS operationName, + ParentSpanId AS parentSpanID, + ServiceName AS serviceName, + Duration / 1000000 AS duration, + Timestamp AS startTime, + arrayMap(key -> map('key', key, 'value', SpanAttributes[key]), mapKeys(SpanAttributes)) AS tags, + arrayMap(key -> map('key', key, 'value', ResourceAttributes[key]), mapKeys(ResourceAttributes)) AS serviceTags + FROM otel_traces + +TYPE endpoint