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