|
| 1 | +{ |
| 2 | + "annotations": { |
| 3 | + "list": [ |
| 4 | + { |
| 5 | + "builtIn": 1, |
| 6 | + "datasource": { |
| 7 | + "type": "grafana", |
| 8 | + "uid": "-- Grafana --" |
| 9 | + }, |
| 10 | + "enable": true, |
| 11 | + "hide": true, |
| 12 | + "iconColor": "rgba(0, 211, 255, 1)", |
| 13 | + "name": "Annotations & Alerts", |
| 14 | + "type": "dashboard" |
| 15 | + } |
| 16 | + ] |
| 17 | + }, |
| 18 | + "editable": true, |
| 19 | + "fiscalYearStartMonth": 0, |
| 20 | + "graphTooltip": 0, |
| 21 | + "id": 1, |
| 22 | + "links": [], |
| 23 | + "panels": [ |
| 24 | + { |
| 25 | + "datasource": { |
| 26 | + "type": "grafana-clickhouse-datasource", |
| 27 | + "uid": "PDEE91DDB90597936" |
| 28 | + }, |
| 29 | + "fieldConfig": { |
| 30 | + "defaults": {}, |
| 31 | + "overrides": [] |
| 32 | + }, |
| 33 | + "gridPos": { |
| 34 | + "h": 33, |
| 35 | + "w": 24, |
| 36 | + "x": 0, |
| 37 | + "y": 0 |
| 38 | + }, |
| 39 | + "id": 1, |
| 40 | + "options": { |
| 41 | + "spanFilters": { |
| 42 | + "criticalPathOnly": false, |
| 43 | + "matchesOnly": false, |
| 44 | + "serviceNameOperator": "=", |
| 45 | + "spanNameOperator": "=", |
| 46 | + "tags": [ |
| 47 | + { |
| 48 | + "id": "775e0dbb-5cd", |
| 49 | + "operator": "=" |
| 50 | + } |
| 51 | + ] |
| 52 | + } |
| 53 | + }, |
| 54 | + "pluginVersion": "12.3.1", |
| 55 | + "targets": [ |
| 56 | + { |
| 57 | + "builderOptions": { |
| 58 | + "columns": [ |
| 59 | + { |
| 60 | + "hint": "time", |
| 61 | + "name": "Timestamp" |
| 62 | + }, |
| 63 | + { |
| 64 | + "hint": "trace_id", |
| 65 | + "name": "TraceId" |
| 66 | + }, |
| 67 | + { |
| 68 | + "hint": "trace_span_id", |
| 69 | + "name": "SpanId" |
| 70 | + }, |
| 71 | + { |
| 72 | + "hint": "trace_parent_span_id", |
| 73 | + "name": "ParentSpanId" |
| 74 | + }, |
| 75 | + { |
| 76 | + "hint": "trace_service_name", |
| 77 | + "name": "ServiceName" |
| 78 | + }, |
| 79 | + { |
| 80 | + "hint": "trace_operation_name", |
| 81 | + "name": "SpanName" |
| 82 | + }, |
| 83 | + { |
| 84 | + "hint": "trace_duration_time", |
| 85 | + "name": "Duration" |
| 86 | + }, |
| 87 | + { |
| 88 | + "hint": "trace_tags", |
| 89 | + "name": "SpanAttributes" |
| 90 | + }, |
| 91 | + { |
| 92 | + "hint": "trace_service_tags", |
| 93 | + "name": "ResourceAttributes" |
| 94 | + }, |
| 95 | + { |
| 96 | + "hint": "trace_status_code", |
| 97 | + "name": "StatusCode" |
| 98 | + }, |
| 99 | + { |
| 100 | + "hint": "trace_kind", |
| 101 | + "name": "SpanKind" |
| 102 | + }, |
| 103 | + { |
| 104 | + "hint": "trace_status_message", |
| 105 | + "name": "StatusMessage" |
| 106 | + }, |
| 107 | + { |
| 108 | + "hint": "trace_state", |
| 109 | + "name": "TraceState" |
| 110 | + } |
| 111 | + ], |
| 112 | + "database": "otel", |
| 113 | + "filters": [], |
| 114 | + "limit": 1000, |
| 115 | + "meta": { |
| 116 | + "flattenNested": false, |
| 117 | + "isTraceIdMode": true, |
| 118 | + "minimized": false, |
| 119 | + "otelEnabled": true, |
| 120 | + "otelVersion": "latest", |
| 121 | + "traceDurationUnit": "nanoseconds", |
| 122 | + "traceEventsColumnPrefix": "Events", |
| 123 | + "traceId": "3e89dee8f53039d3aadec3180374c0ab", |
| 124 | + "traceLinksColumnPrefix": "Links" |
| 125 | + }, |
| 126 | + "mode": "list", |
| 127 | + "orderBy": [], |
| 128 | + "queryType": "traces", |
| 129 | + "table": "otel_traces" |
| 130 | + }, |
| 131 | + "datasource": { |
| 132 | + "type": "grafana-clickhouse-datasource", |
| 133 | + "uid": "${DS_CLICKHOUSE}" |
| 134 | + }, |
| 135 | + "editorType": "sql", |
| 136 | + "format": 3, |
| 137 | + "meta": { |
| 138 | + "builderOptions": { |
| 139 | + "columns": [ |
| 140 | + { |
| 141 | + "hint": "time", |
| 142 | + "name": "Timestamp" |
| 143 | + }, |
| 144 | + { |
| 145 | + "hint": "trace_id", |
| 146 | + "name": "TraceId" |
| 147 | + }, |
| 148 | + { |
| 149 | + "hint": "trace_span_id", |
| 150 | + "name": "SpanId" |
| 151 | + }, |
| 152 | + { |
| 153 | + "hint": "trace_parent_span_id", |
| 154 | + "name": "ParentSpanId" |
| 155 | + }, |
| 156 | + { |
| 157 | + "hint": "trace_service_name", |
| 158 | + "name": "ServiceName" |
| 159 | + }, |
| 160 | + { |
| 161 | + "hint": "trace_operation_name", |
| 162 | + "name": "SpanName" |
| 163 | + }, |
| 164 | + { |
| 165 | + "hint": "trace_duration_time", |
| 166 | + "name": "Duration" |
| 167 | + }, |
| 168 | + { |
| 169 | + "hint": "trace_tags", |
| 170 | + "name": "SpanAttributes" |
| 171 | + }, |
| 172 | + { |
| 173 | + "hint": "trace_service_tags", |
| 174 | + "name": "ResourceAttributes" |
| 175 | + }, |
| 176 | + { |
| 177 | + "hint": "trace_status_code", |
| 178 | + "name": "StatusCode" |
| 179 | + }, |
| 180 | + { |
| 181 | + "hint": "trace_kind", |
| 182 | + "name": "SpanKind" |
| 183 | + }, |
| 184 | + { |
| 185 | + "hint": "trace_status_message", |
| 186 | + "name": "StatusMessage" |
| 187 | + }, |
| 188 | + { |
| 189 | + "hint": "trace_state", |
| 190 | + "name": "TraceState" |
| 191 | + } |
| 192 | + ], |
| 193 | + "database": "otel", |
| 194 | + "filters": [], |
| 195 | + "limit": 1000, |
| 196 | + "meta": { |
| 197 | + "flattenNested": false, |
| 198 | + "isTraceIdMode": true, |
| 199 | + "minimized": false, |
| 200 | + "otelEnabled": true, |
| 201 | + "otelVersion": "latest", |
| 202 | + "traceDurationUnit": "nanoseconds", |
| 203 | + "traceEventsColumnPrefix": "Events", |
| 204 | + "traceId": "3e89dee8f53039d3aadec3180374c0ab", |
| 205 | + "traceLinksColumnPrefix": "Links" |
| 206 | + }, |
| 207 | + "mode": "list", |
| 208 | + "orderBy": [], |
| 209 | + "queryType": "traces", |
| 210 | + "table": "otel_traces" |
| 211 | + } |
| 212 | + }, |
| 213 | + "pluginVersion": "4.11.4", |
| 214 | + "queryType": "traces", |
| 215 | + "rawSql": "WITH\n ${traceId:sqlstring} as trace_id,\n (SELECT min(Start) FROM \"otel\".\"otel_traces_trace_id_ts\" WHERE TraceId = trace_id) as trace_start,\n (SELECT max(End) + 1 FROM \"otel\".\"otel_traces_trace_id_ts\" WHERE TraceId = trace_id) as trace_end\nSELECT\n \"TraceId\" as traceID,\n \"SpanId\" as spanID,\n \"ParentSpanId\" as parentSpanID,\n \"ServiceName\" as serviceName,\n \"SpanName\" as operationName,\n multiply(toUnixTimestamp64Nano(\"Timestamp\"), 0.000001) as startTime,\n multiply(\"Duration\", 0.000001) as duration,\n arrayMap(x -> map('key', x.1::String, 'value', x.2::String), JSONExtractKeysAndValues(SpanAttributes::String, 'String')) AS tags,\n arrayMap(x -> map('key', x.1::String, 'value', x.2::String), JSONExtractKeysAndValues(ResourceAttributes::String, 'String')) AS serviceTags,\n if(\"StatusCode\" IN ('Error', 'STATUS_CODE_ERROR'), 2, 0) as statusCode,\n \"SpanKind\" as kind,\n \"StatusMessage\" as statusMessage,\n \"TraceState\" as traceState\nFROM \"otel\".\"otel_traces\"\nWHERE traceID = trace_id \n AND \"Timestamp\" >= trace_start\n AND \"Timestamp\" <= trace_end\nLIMIT 1000;", |
| 216 | + "refId": "Trace ID" |
| 217 | + } |
| 218 | + ], |
| 219 | + "title": "Trace", |
| 220 | + "type": "traces" |
| 221 | + } |
| 222 | + ], |
| 223 | + "preload": false, |
| 224 | + "schemaVersion": 42, |
| 225 | + "tags": [], |
| 226 | + "templating": { |
| 227 | + "list": [ |
| 228 | + { |
| 229 | + "current": { |
| 230 | + "text": "", |
| 231 | + "value": "" |
| 232 | + }, |
| 233 | + "description": "", |
| 234 | + "label": "Trace ID", |
| 235 | + "name": "traceId", |
| 236 | + "options": [ |
| 237 | + { |
| 238 | + "selected": true, |
| 239 | + "text": "", |
| 240 | + "value": "" |
| 241 | + } |
| 242 | + ], |
| 243 | + "query": "", |
| 244 | + "type": "textbox" |
| 245 | + } |
| 246 | + ] |
| 247 | + }, |
| 248 | + "time": { |
| 249 | + "from": "now-12h", |
| 250 | + "to": "now" |
| 251 | + }, |
| 252 | + "timepicker": {}, |
| 253 | + "timezone": "browser", |
| 254 | + "title": "trace", |
| 255 | + "uid": "adv5xzn", |
| 256 | + "version": 8 |
| 257 | +} |
0 commit comments