Skip to content

Commit

Permalink
Update query to use Max and divide function
Browse files Browse the repository at this point in the history
  • Loading branch information
aangelisc committed Sep 12, 2024
1 parent 8ad9766 commit a74079b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/dashboards/opentelemetry-clickhouse.json
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,7 @@
},
"pluginVersion": "4.0.6",
"queryType": "table",
"rawSql": "SELECT\r\n min(Timestamp) as timestamp,\r\n TraceId as `Trace ID`,\r\n argMin(ServiceName, Timestamp) as `Service Name`,\r\n sum(Duration)/1000000 as Duration\r\nFROM otel_traces\r\nWHERE\r\n $__conditionalAll(TraceId IN (${trace_id:singlequote}), $trace_id)\r\n AND ServiceName IN (${serviceName:singlequote})\r\n AND ServiceName != 'loadgenerator'\r\n AND $__timeFilter(Timestamp)\r\nGROUP BY TraceId\r\nORDER BY Duration DESC\r\nLIMIT 100\r\n",
"refId": "A"
"rawSql": "SELECT\r\n min(Timestamp) as timestamp,\r\n TraceId as `Trace ID`,\r\n argMin(ServiceName, Timestamp) as `Service Name`,\r\n divide(max(Duration), 1000000) as Duration\r\nFROM otel_traces\r\nWHERE\r\n $__conditionalAll(TraceId IN (${trace_id:singlequote}), $trace_id)\r\n AND ServiceName IN (${serviceName:singlequote})\r\n AND ServiceName != 'loadgenerator'\r\n AND $__timeFilter(Timestamp)\r\nGROUP BY TraceId\r\nORDER BY Duration DESC\r\nLIMIT 100\r\n", "refId": "A"
}
],
"title": "Traces",
Expand Down

0 comments on commit a74079b

Please sign in to comment.