Skip to content

Instantly share code, notes, and snippets.

@dimaqq
Created July 18, 2025 06:25
Show Gist options
  • Save dimaqq/8880e3ad8caa51b9907a417d59822926 to your computer and use it in GitHub Desktop.
Save dimaqq/8880e3ad8caa51b9907a417d59822926 to your computer and use it in GitHub Desktop.
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 3,
"links": [],
"panels": [
{
"datasource": {
"type": "tempo",
"uid": "aes6htnk041dsb"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "smooth",
"lineStyle": {
"fill": "solid"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": 300000,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": [
{
"matcher": {
"id": "byFrameRefID",
"options": "traces"
},
"properties": []
},
{
"__systemRef": "hideSeriesFrom",
"matcher": {
"id": "byNames",
"options": {
"mode": "exclude",
"names": [
"duration"
],
"prefix": "All except:",
"readOnly": true
}
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": false,
"tooltip": false,
"viz": true
}
}
]
}
]
},
"gridPos": {
"h": 20,
"w": 16,
"x": 0,
"y": 0
},
"id": 1,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "12.0.2",
"targets": [
{
"datasource": {
"type": "tempo",
"uid": "aes6htnk041dsb"
},
"filters": [
{
"id": "5de51d4f",
"operator": "=",
"scope": "span"
},
{
"id": "service-name",
"operator": "=",
"scope": "resource",
"tag": "service.name",
"value": [
"Webhook receiver"
],
"valueType": "string"
}
],
"limit": 1000,
"metricsQueryType": "range",
"query": "(\n { span:name=\"GitHub\" }\n ||\n { span:name=\"Job status check\" }\n)\n| select(\n trace:id,\n span:name\n )",
"queryType": "traceql",
"refId": "A",
"spss": 1000,
"tableType": "spans"
}
],
"title": "Job startup lag",
"transformations": [
{
"id": "calculateField",
"options": {
"alias": "startMore",
"binary": {
"left": {
"matcher": {
"id": "byName",
"options": "Start time"
}
},
"operator": "-",
"right": {
"fixed": "0.000"
}
},
"mode": "binary",
"reduce": {
"reducer": "sum"
},
"replaceFields": false
}
},
{
"id": "calculateField",
"options": {
"alias": "startCopy",
"binary": {
"left": {
"matcher": {
"id": "byName",
"options": "Start time"
}
},
"right": {
"fixed": "0.000"
}
},
"mode": "binary",
"reduce": {
"reducer": "sum"
}
}
},
{
"id": "filterByValue",
"options": {
"filters": [
{
"config": {
"id": "equal",
"options": {
"value": "record the webhook"
}
},
"fieldName": "name"
},
{
"config": {
"id": "equal",
"options": {
"value": "GitHub"
}
},
"fieldName": "name"
}
],
"match": "any",
"type": "exclude"
}
},
{
"id": "groupBy",
"options": {
"fields": {
"Start time": {
"aggregations": [
"min"
]
},
"startCopy": {
"aggregations": [
"max"
],
"operation": "aggregate"
},
"startMore": {
"aggregations": [
"min"
],
"operation": "aggregate"
},
"startTime": {
"aggregations": [
"min"
],
"operation": "aggregate"
},
"time": {
"aggregations": [
"firstNotNull"
],
"operation": "aggregate"
},
"traceID": {
"aggregations": [],
"operation": "groupby"
},
"traceIdHidden": {
"aggregations": [],
"operation": "groupby"
}
}
}
},
{
"id": "calculateField",
"options": {
"alias": "duration",
"binary": {
"left": {
"matcher": {
"id": "byName",
"options": "startCopy (max)"
}
},
"operator": "-",
"right": {
"matcher": {
"id": "byName",
"options": "startMore (min)"
}
}
},
"mode": "binary",
"reduce": {
"reducer": "sum"
}
}
}
],
"type": "timeseries"
}
],
"preload": false,
"schemaVersion": 41,
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "2025-07-18T05:46:07.090Z",
"to": "2025-07-18T06:12:44.111Z"
},
"timepicker": {},
"timezone": "browser",
"title": "Job delta 2",
"uid": "b1fef5d2-d8fc-4420-8d8b-271387c3738e",
"version": 8
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment