snapshot of https://github.com/tldraw/tldraw.git (main, 2026-09-23; blobs > 131072B omitted)
Some checks failed
Deploy analytics worker / Deploy analytics worker to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
i18n upload strings / Upload latest strings (push) Failing after 1s
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
Deploy grafana resources / ${{ github.event_name == 'push' && 'Deploy grafana resources' || 'Validate grafana resources (dry run)' }} (push) Failing after 0s
End to end tests (dotcom) / Check for relevant changes (push) Failing after 0s
End to end tests (examples) / Check for relevant changes (push) Failing after 0s
End to end tests (mermaid readability) / Check for relevant changes (push) Failing after 1s
End to end tests (perf) / Check for relevant changes (push) Failing after 0s
Publish editor extensions / Publish editor extensions (push) Failing after 1s
Publish SDK packages / Remove the publish-packages label (push) Has been skipped
Checks / Tests & checks (push) Has been cancelled
Checks / Build all projects (push) Has been cancelled
Deploy templates / Deploy templates (push) Has been cancelled
End to end tests (dotcom) / End to end tests (dotcom) (push) Has been cancelled
End to end tests (mermaid readability) / End to end tests (mermaid readability) (push) Has been cancelled
End to end tests (perf) / End to end tests (perf) (push) Has been cancelled
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Has been cancelled
End to end tests (examples) / End to end tests (examples) (push) Has been cancelled
Publish SDK packages / Publish SDK packages (push) Has been cancelled
Publish SDK packages / Tell user released version (push) Has been cancelled
Publish SDK packages / Publishes code templates to separate repositories (push) Has been cancelled
Publish SDK packages / Deploys the template demos with the new SDK version (push) Has been cancelled

This commit is contained in:
upstream-mirror
2026-09-23 16:12:52 +05:00
commit a774ac673a
4541 changed files with 770499 additions and 0 deletions

View File

@@ -0,0 +1,254 @@
apiVersion: dashboard.grafana.app/v0alpha1
kind: Dashboard
metadata:
annotations:
grafana.app/folder: dotcom
grafana.app/saved-from-ui: Grafana Cloud
labels: {}
name: adgumkhou3chsd
namespace: stacks-890472
spec:
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
liveNow: false
panels:
- datasource:
type: vertamedia-clickhouse-datasource
uid: bdgu7tk03irr4e
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: linear
lineWidth: 1
pointSize: 5
scaleDistribution:
type: linear
showPoints: auto
showValues: false
spanNulls: false
stacking:
group: A
mode: none
thresholdsStyle:
mode: 'off'
thresholds:
mode: absolute
steps:
- color: green
value: 0
- color: red
value: 80
gridPos:
h: 21
w: 24
x: 0
y: 0
id: 1
options:
annotations:
clustering: -1
multiLane: false
legend:
calcs: []
displayMode: list
placement: bottom
showLegend: true
tooltip:
hideZeros: false
maxHeight: 600
mode: single
sort: none
pluginVersion: 13.1.0-24556818486
targets:
- datasource:
type: vertamedia-clickhouse-datasource
uid: bdgu7tk03irr4e
dateTimeType: DATETIME
editorMode: builder
extrapolate: true
format: time_series
formatAs: time_series
formattedQuery: "SELECT toStartOfInterval(timestamp, INTERVAL '$interval' SECOND)\
\ as date, blob1 as event, count() as total\n\tFROM 'MEASURE'\n WHERE NOT\
\ endsWith(event, 'tldraw-multiplayer')\n\tAND timestamp >= toDateTime($from)\
\ AND timestamp <= toDateTime($to)\n\tGROUP BY date, event\n\tORDER BY date\
\ ASC"
intervalFactor: 1
query: "SELECT toStartOfInterval(timestamp, INTERVAL '$interval' SECOND) as\
\ date, blob1 as event, count() as total\n\tFROM 'MEASURE'\n\tWHERE timestamp\
\ >= toDateTime($from) AND timestamp <= toDateTime($to)\n\tAND blob2 = '${environment}-tldraw-multiplayer'\n\
\tGROUP BY date, event\n\tORDER BY date ASC"
rawQuery: "SELECT toStartOfInterval(timestamp, INTERVAL '120' SECOND) as date,\
\ blob1 as event, count() as total\n\tFROM 'MEASURE'\n\tWHERE timestamp >=\
\ toDateTime(1733213050) AND timestamp <= toDateTime(1733385850)\n\tAND blob2\
\ = 'pr-5028-tldraw-multiplayer'\n\tGROUP BY date, event\n\tORDER BY date ASC"
refId: A
round: 0s
showFormattedSQL: true
showHelp: true
skip_comments: true
step: ''
title: Room events
type: timeseries
- datasource:
type: vertamedia-clickhouse-datasource
uid: bdgu7tk03irr4e
fieldConfig:
defaults:
color:
mode: palette-classic
custom:
axisBorderShow: false
axisCenteredZero: false
axisColorMode: text
axisLabel: ''
axisPlacement: right
barAlignment: 0
barWidthFactor: 0.6
drawStyle: line
fillOpacity: 0
gradientMode: none
hideFrom:
legend: false
tooltip: false
viz: false
insertNulls: 3600000
lineInterpolation: stepAfter
lineStyle:
fill: solid
lineWidth: 1
pointSize: 6
scaleDistribution:
type: linear
showPoints: auto
showValues: false
spanNulls: false
stacking:
group: A
mode: none
thresholdsStyle:
mode: 'off'
min: 0
thresholds:
mode: absolute
steps:
- color: green
value: 0
- color: red
value: 80
gridPos:
h: 8
w: 12
x: 0
y: 21
id: 13
interval: 5m
options:
annotations:
clustering: -1
multiLane: false
legend:
calcs: []
displayMode: table
placement: bottom
showLegend: false
tooltip:
hideZeros: false
mode: single
sort: none
pluginVersion: 13.1.0-24556818486
targets:
- datasource:
type: vertamedia-clickhouse-datasource
uid: bdgu7tk03irr4e
dateTimeType: DATETIME
editorMode: builder
extrapolate: true
format: time_series
formatAs: time_series
formattedQuery: "SELECT toStartOfInterval(timestamp, INTERVAL '$interval' SECOND)\
\ as date, blob1 as name, max(double1) as avg_attempts\n\tFROM 'MEASURE'\n\
\tWHERE timestamp >= toDateTime($from) AND timestamp <= toDateTime($to)\n \
\ AND name = 'persist_success'\n\tGROUP BY date, name\n\tORDER BY date ASC"
intervalFactor: 1
query: "SELECT toStartOfInterval(timestamp, INTERVAL '$interval' SECOND) as\
\ date, blob1 as name, max(double1) as avg_attempts\n\tFROM 'MEASURE'\n\t\
WHERE timestamp >= toDateTime($from) AND timestamp <= toDateTime($to)\n \
\ AND name = 'persist_success'\n\tGROUP BY date, name\n\tORDER BY date ASC"
rawQuery: "SELECT toStartOfInterval(timestamp, INTERVAL '300' SECOND) as date,\
\ blob1 as name, max(double1) as avg_attempts\n\tFROM 'MEASURE'\n\tWHERE timestamp\
\ >= toDateTime(1762169567) AND timestamp <= toDateTime(1762180367)\n AND\
\ name = 'persist_success'\n\tGROUP BY date, name\n\tORDER BY date ASC"
refId: A
round: 0s
showFormattedSQL: false
showHelp: false
skip_comments: true
step: ''
title: max attempts before persistence success
type: timeseries
preload: false
refresh: 5s
schemaVersion: 42
templating:
list:
- current:
text: production
value: production
description: Environment to filter by. Use production, staging, or your pr number
(pr-42).
hide: 0
label: 'Environment: production | staging | pr-42'
name: environment
query: production
skipUrlSync: false
type: textbox
time:
from: now-3h
to: now
timepicker:
refresh_intervals:
- 5s
- 10s
- 30s
- 1m
- 5m
- 15m
- 30m
- 1h
- 2h
- 1d
timezone: browser
title: Dotcom events V1
tags:
- provisioned
- repo:tldraw/tldraw

View File

@@ -0,0 +1,195 @@
apiVersion: dashboard.grafana.app/v0alpha1
kind: Dashboard
metadata:
annotations:
grafana.app/folder: anthropic
grafana.app/message: creating dashboard from the Cloud Connections plugin
labels: {}
name: anthropic-integration-scrape-overview
namespace: stacks-890472
spec:
editable: false
fiscalYearStartMonth: 0
graphTooltip: 0
id: null
links:
- asDropdown: false
icon: external link
includeVars: true
keepTime: true
tags:
- anthropic-integration
targetBlank: true
title: Dashboards
type: dashboards
liveNow: false
panels:
- gridPos:
h: 12
w: 7
x: 0
y: 0
id: 1
options:
code:
language: plaintext
showLineNumbers: false
showMiniMap: false
content: <center><img style="width:auto;max-height:320px;" src="https://storage.googleapis.com/grafanalabs-integration-logos/anthropic-logo-dark.svg"></center>
mode: markdown
pluginVersion: 9.4.3
title: Logo
type: text
- datasource:
type: prometheus
uid: $datasource
description: Shows the number of samples received by metric name received for
this integration.
fieldConfig:
defaults:
color:
mode: palette-classic
custom:
axisCenteredZero: false
axisColorMode: text
axisLabel: ''
axisPlacement: auto
barAlignment: 0
drawStyle: line
fillOpacity: 0
gradientMode: none
hideFrom:
legend: false
tooltip: false
viz: false
lineInterpolation: linear
lineStyle:
fill: solid
lineWidth: 1
pointSize: 5
scaleDistribution:
type: linear
showPoints: auto
spanNulls: false
stacking:
group: A
mode: none
thresholdsStyle:
mode: 'off'
mappings: []
thresholds:
mode: absolute
steps:
- color: green
value: null
- color: red
value: 80
unit: pps
overrides: []
gridPos:
h: 12
w: 17
x: 7
y: 0
id: 7
options:
legend:
calcs: []
displayMode: list
placement: bottom
showLegend: true
tooltip:
mode: single
sort: none
targets:
- datasource:
type: prometheus
uid: $datasource
editorMode: code
expr: count by (__name__) ({__name__=~".+", job=~"integrations/anthropic/.+",
scrape_job=~"$scrape_job"})
legendFormat: __auto
range: true
refId: A
title: Samples Received
type: timeseries
refresh: 30s
revision: 1
schemaVersion: 38
style: dark
tags:
- anthropic-integration
- provisioned
- repo:tldraw/tldraw
templating:
list:
- current:
selected: false
text: default
value: default
hide: 0
includeAll: false
label: Data source
multi: false
name: datasource
options: []
query: prometheus
queryValue: ''
refresh: 1
regex: (?!grafanacloud-usage|grafanacloud-ml-metrics).+
skipUrlSync: false
type: datasource
- allValue: .+
current:
text: All
value:
- $__all
datasource: $datasource
definition: label_values({__name__=~".+", job=~"integrations/anthropic/.+"},
scrape_job)
hide: 0
includeAll: true
label: scrape_job
multi: true
name: scrape_job
options: []
query: label_values({__name__=~".+", job=~"integrations/anthropic/.+"}, scrape_job)
refresh: 2
regex: ''
skipUrlSync: false
sort: 0
tagValuesQuery: ''
tags: []
tagsQuery: ''
type: query
useTags: false
- allValue: integrations/anthropic/.+
current:
text: All
value:
- $__all
datasource: $datasource
definition: label_values({job=~"integrations/anthropic/.+"}, job)
hide: 0
includeAll: true
label: job
multi: true
name: job
options: []
query: label_values({job=~"integrations/anthropic/.+"}, job)
refresh: 2
regex: ''
skipUrlSync: false
sort: 0
tagValuesQuery: ''
tags: []
tagsQuery: ''
type: query
useTags: false
time:
from: now-30m
to: now
timepicker: {}
timezone: ''
title: Anthropic scrape overview
weekStart: ''

View File

@@ -0,0 +1,375 @@
apiVersion: dashboard.grafana.app/v0alpha1
kind: Dashboard
metadata:
annotations:
grafana.app/folder: dotcom
labels: {}
name: edrigjn435v5sf
namespace: stacks-890472
spec:
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
links: []
panels:
- datasource:
type: vertamedia-clickhouse-datasource
uid: bdgu7tk03irr4e
fieldConfig:
defaults:
color:
mode: thresholds
mappings: []
thresholds:
mode: absolute
steps:
- color: green
value: null
- color: red
value: 80
overrides: []
gridPos:
h: 8
w: 12
x: 0
y: 0
id: 3
options:
minVizHeight: 75
minVizWidth: 75
orientation: auto
reduceOptions:
calcs:
- sum
fields: ''
values: false
showThresholdLabels: false
showThresholdMarkers: true
sizing: auto
pluginVersion: 11.3.0-77222
targets:
- datasource:
type: vertamedia-clickhouse-datasource
uid: bdgu7tk03irr4e
dateTimeType: DATETIME
editorMode: builder
extrapolate: true
format: time_series
formatAs: time_series
formattedQuery: "SELECT count(*)\n\tFROM 'BEMO_ANALYICS'\n WHERE blob1 =\
\ 'connect'\n\tAND timestamp >= toDateTime($from) AND timestamp <= toDateTime($to)\n\
\tGROUP BY date\n\tORDER BY date ASC"
intervalFactor: 1
query: "SELECT toStartOfInterval(timestamp, INTERVAL '$interval' MINUTE) as\
\ date, count() as numConnects\n\tFROM 'BEMO_ANALYTICS'\n WHERE blob1 =\
\ 'connect'\n\tAND timestamp >= toDateTime($from) AND timestamp <= toDateTime($to)\n\
\tGROUP BY date\n\tORDER BY date ASC"
rawQuery: "SELECT toStartOfInterval(timestamp, INTERVAL '1800' MINUTE) as date,\
\ count() as numConnects\n\tFROM 'BEMO_ANALYTICS'\n WHERE blob1 = 'connect'\n\
\tAND timestamp >= toDateTime(1722620600) AND timestamp <= toDateTime(1725212600)\n\
\tGROUP BY date\n\tORDER BY date ASC"
refId: A
round: 0s
showFormattedSQL: false
showHelp: false
skip_comments: true
step: ''
title: Num Connects
type: gauge
- datasource:
type: vertamedia-clickhouse-datasource
uid: bdgu7tk03irr4e
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: linear
lineWidth: 1
pointSize: 5
scaleDistribution:
type: linear
showPoints: auto
spanNulls: false
stacking:
group: A
mode: none
thresholdsStyle:
mode: 'off'
mappings: []
thresholds:
mode: absolute
steps:
- color: green
value: null
- color: red
value: 80
overrides: []
gridPos:
h: 8
w: 12
x: 12
y: 0
id: 1
options:
legend:
calcs: []
displayMode: list
placement: bottom
showLegend: true
tooltip:
mode: single
sort: none
pluginVersion: 11.3.0-77222
targets:
- datasource:
type: vertamedia-clickhouse-datasource
uid: bdgu7tk03irr4e
dateTimeType: DATETIME
editorMode: builder
extrapolate: true
format: time_series
formatAs: time_series
formattedQuery: "SELECT count(*)\n\tFROM 'BEMO_ANALYICS'\n WHERE blob1 =\
\ 'connect'\n\tAND timestamp >= toDateTime($from) AND timestamp <= toDateTime($to)\n\
\tGROUP BY date\n\tORDER BY date ASC"
intervalFactor: 1
query: "SELECT toStartOfInterval(timestamp, INTERVAL '$interval' MINUTE) as\
\ date, count() as numConnects\n\tFROM 'BEMO_ANALYTICS'\n WHERE blob1 =\
\ 'connect'\n\tAND timestamp >= toDateTime($from) AND timestamp <= toDateTime($to)\n\
\tGROUP BY date\n\tORDER BY date ASC"
rawQuery: "SELECT toStartOfInterval(timestamp, INTERVAL '3600' MINUTE) as date,\
\ count() as numConnects\n\tFROM 'BEMO_ANALYTICS'\n WHERE blob1 = 'connect'\n\
\tAND timestamp >= toDateTime(1720773373) AND timestamp <= toDateTime(1726292377)\n\
\tGROUP BY date\n\tORDER BY date ASC"
refId: A
round: 0s
showFormattedSQL: false
showHelp: false
skip_comments: true
step: ''
title: Num Connects
type: timeseries
- datasource:
uid: bdgu7tk03irr4e
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: linear
lineWidth: 1
pointSize: 5
scaleDistribution:
type: linear
showPoints: auto
spanNulls: false
stacking:
group: A
mode: none
thresholdsStyle:
mode: 'off'
mappings: []
thresholds:
mode: absolute
steps:
- color: green
value: null
- color: red
value: 80
overrides: []
gridPos:
h: 8
w: 12
x: 0
y: 8
id: 5
options:
legend:
calcs: []
displayMode: list
placement: bottom
showLegend: true
tooltip:
mode: single
sort: none
pluginVersion: 11.3.0-77222
targets:
- dateTimeType: DATETIME
editorMode: builder
extrapolate: true
format: time_series
formattedQuery: SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter
GROUP BY t ORDER BY t
intervalFactor: 1
query: "SELECT toStartOfInterval(timestamp, INTERVAL '$interval' MINUTE) as\
\ date, count() as numConnects,\n\tif(\n\t\tstartsWith(blob2, 'http://localhost')\
\ or startsWith(blob2, 'http://127.0.0.1'),\n\t\t'localhost',\n\t\tif(\n\t\
\t\tendsWith(blob2, '.csb.app'),\n\t\t\t'code sandbox',\n\t\t\tblob2\n\t\t\
)\n\t) as host\n\tFROM 'BEMO_ANALYTICS'\n WHERE blob1 = 'connect'\n\tAND\
\ timestamp >= toDateTime($from) AND timestamp <= toDateTime($to)\n\t-- AND\
\ NOT(startsWith(host, 'http://localhost')) AND NOT(startsWith(host, 'http://127.0.0.1'))\n\
\tGROUP BY date, host\n ORDER BY date ASC"
rawQuery: "SELECT toStartOfInterval(timestamp, INTERVAL '30' MINUTE) as date,\
\ count() as numConnects,\n\tif(\n\t\tstartsWith(blob2, 'http://localhost')\
\ or startsWith(blob2, 'http://127.0.0.1'),\n\t\t'localhost',\n\t\tif(\n\t\
\t\tendsWith(blob2, '.csb.app'),\n\t\t\t'code sandbox',\n\t\t\tblob2\n\t\t\
)\n\t) as host\n\tFROM 'BEMO_ANALYTICS'\n WHERE blob1 = 'connect'\n\tAND\
\ timestamp >= toDateTime(1728620743) AND timestamp <= toDateTime(1728642343)\n\
\t\n\tGROUP BY date, host\n ORDER BY date ASC"
refId: A
round: 0s
skip_comments: true
title: Num Connects
type: timeseries
- datasource:
type: vertamedia-clickhouse-datasource
uid: bdgu7tk03irr4e
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
lineWidth: 1
pointSize: 5
scaleDistribution:
type: linear
showPoints: auto
spanNulls: false
stacking:
group: A
mode: none
thresholdsStyle:
mode: 'off'
mappings: []
thresholds:
mode: absolute
steps:
- color: green
value: null
- color: red
value: 80
overrides: []
gridPos:
h: 19
w: 12
x: 12
y: 8
id: 4
options:
legend:
calcs: []
displayMode: table
placement: bottom
showLegend: true
tooltip:
mode: single
sort: none
pluginVersion: 11.3.0-77222
targets:
- datasource:
type: vertamedia-clickhouse-datasource
uid: bdgu7tk03irr4e
dateTimeType: DATETIME
editorMode: builder
extrapolate: true
format: time_series
formatAs: time_series
formattedQuery: "SELECT count() as numConnects, blob2\n\tFROM 'BEMO_ANALYTICS'\n\
\ WHERE blob1 = 'connect'\n\tAND timestamp >= toDateTime($from) AND timestamp\
\ <= toDateTime($to)\n\tGROUP BY blob2\n ORDER BY numConnects ASC"
intervalFactor: 1
query: "SELECT toStartOfInterval(timestamp, INTERVAL '$interval' MINUTE) as\
\ date, count() as numConnects,\n\tif(\n\t\tstartsWith(blob2, 'http://localhost')\
\ or startsWith(blob2, 'http://127.0.0.1'),\n\t\t'localhost',\n\t\tif(\n\t\
\t\tendsWith(blob2, '.csb.app'),\n\t\t\t'code sandbox',\n\t\t\tblob2\n\t\t\
)\n\t) as host\n\tFROM 'BEMO_ANALYTICS'\n WHERE blob1 = 'connect'\n\tAND\
\ timestamp >= toDateTime($from) AND timestamp <= toDateTime($to)\n\t-- AND\
\ NOT(startsWith(host, 'http://localhost')) AND NOT(startsWith(host, 'http://127.0.0.1'))\n\
\tGROUP BY date, host\n ORDER BY date ASC"
rawQuery: "SELECT toStartOfInterval(timestamp, INTERVAL '3600' MINUTE) as date,\
\ count() as numConnects,\n\tif(\n\t\tstartsWith(blob2, 'http://localhost')\
\ or startsWith(blob2, 'http://127.0.0.1'),\n\t\t'localhost',\n\t\tif(\n\t\
\t\tendsWith(blob2, '.csb.app'),\n\t\t\t'code sandbox',\n\t\t\tblob2\n\t\t\
)\n\t) as host\n\tFROM 'BEMO_ANALYTICS'\n WHERE blob1 = 'connect'\n\tAND\
\ timestamp >= toDateTime(1720773373) AND timestamp <= toDateTime(1726292377)\n\
\t\n\tGROUP BY date, host\n ORDER BY date ASC"
refId: A
round: 0s
showFormattedSQL: false
showHelp: false
skip_comments: true
step: ''
title: Panel Title
type: timeseries
preload: false
schemaVersion: 40
tags:
- provisioned
- repo:tldraw/tldraw
templating:
list: []
time:
from: now-6h
to: now
timepicker: {}
timezone: browser
title: Bemo analytics
weekStart: ''

View File

@@ -0,0 +1,605 @@
apiVersion: dashboard.grafana.app/v0alpha1
kind: Dashboard
metadata:
annotations:
grafana.app/message: Add qtype split, env toggle, deploy annotations and restart
panel
grafana.app/folder: f6hsw6
labels: {}
name: slow-queries
namespace: stacks-890472
spec:
annotations:
list:
- datasource:
type: loki
uid: grafanacloud-logs
enable: true
expr: '{service_name=~"$service", deployment_environment="$env"} |= "OpenTelemetry
SDK started" | process_worker="reaper"'
hide: false
iconColor: red
name: Deploys (machine restarts)
target:
expr: '{service_name=~"$service", deployment_environment="$env"} |= "OpenTelemetry
SDK started" | process_worker="reaper"'
queryType: range
refId: Anno
textFormat: '{{host_name}}'
titleFormat: zero-cache restart
editable: true
graphTooltip: 1
panels:
- collapsed: false
gridPos:
h: 1
w: 24
x: 0
y: 0
id: 1
panels: []
title: Overview
type: row
- datasource:
type: loki
uid: grafanacloud-logs
description: Total "Slow SQLite query" log lines from zero-cache in the selected
time range.
fieldConfig:
defaults:
unit: short
overrides: []
gridPos:
h: 5
w: 4
x: 0
y: 1
id: 2
options:
colorMode: value
graphMode: none
reduceOptions:
calcs:
- lastNotNull
targets:
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr: sum(count_over_time({service_name=~"$service", deployment_environment="$env"}
|~ "Slow SQLite query" | type=~"$qtype" [$__range]))
instant: true
queryType: instant
range: false
refId: A
title: Slow queries in range
type: stat
- datasource:
type: loki
uid: grafanacloud-logs
description: Longest slow query seen in the selected time range.
fieldConfig:
defaults:
unit: ms
overrides: []
gridPos:
h: 5
w: 4
x: 4
y: 1
id: 3
options:
colorMode: value
graphMode: none
reduceOptions:
calcs:
- lastNotNull
targets:
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr: max(max_over_time({service_name=~"$service", deployment_environment="$env"}
|~ "Slow SQLite query" | type=~"$qtype" | regexp "Slow SQLite query (?P<duration_ms>[0-9.]+)"
| unwrap duration_ms [$__range]))
instant: true
queryType: instant
range: false
refId: A
title: Max duration in range
type: stat
- datasource:
type: loki
uid: grafanacloud-logs
description: Slow SQLite query log lines per interval, by Zero service (zero-vs
= view-syncer, zero-rm = replication-manager).
fieldConfig:
defaults:
custom:
fillOpacity: 8
lineWidth: 1
showPoints: never
unit: short
overrides: []
gridPos:
h: 10
w: 8
x: 8
y: 1
id: 4
options:
legend:
displayMode: list
placement: bottom
showLegend: true
tooltip:
mode: multi
sort: desc
targets:
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr:
sum by (service_name) (count_over_time({service_name=~"$service", deployment_environment="$env"}
|~ "Slow SQLite query" | type=~"$qtype" [$__auto]))
legendFormat: '{{service_name}}'
queryType: range
refId: A
title: Slow query rate
type: timeseries
- datasource:
type: loki
uid: grafanacloud-logs
description: Duration parsed from the log line, in ms. Only queries over zero-cache's
slow threshold are logged, so these are percentiles of the slow tail, not of
all queries.
fieldConfig:
defaults:
custom:
fillOpacity: 8
lineWidth: 1
showPoints: never
unit: ms
overrides: []
gridPos:
h: 10
w: 8
x: 16
y: 1
id: 5
options:
legend:
displayMode: list
placement: bottom
showLegend: true
tooltip:
mode: multi
sort: desc
targets:
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr: quantile_over_time(0.5, {service_name=~"$service", deployment_environment="$env"}
|~ "Slow SQLite query" | type=~"$qtype" | regexp "Slow SQLite query (?P<duration_ms>[0-9.]+)"
| unwrap duration_ms [$__auto]) by ()
legendFormat: p50
queryType: range
refId: A
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr: quantile_over_time(0.95, {service_name=~"$service", deployment_environment="$env"}
|~ "Slow SQLite query" | type=~"$qtype" | regexp "Slow SQLite query (?P<duration_ms>[0-9.]+)"
| unwrap duration_ms [$__auto]) by ()
legendFormat: p95
queryType: range
refId: B
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr: quantile_over_time(0.99, {service_name=~"$service", deployment_environment="$env"}
|~ "Slow SQLite query" | type=~"$qtype" | regexp "Slow SQLite query (?P<duration_ms>[0-9.]+)"
| unwrap duration_ms [$__auto]) by ()
legendFormat: p99
queryType: range
refId: C
title: Slow query duration percentiles
type: timeseries
- datasource:
type: loki
uid: grafanacloud-logs
description: Which Fly machines are producing slow queries.
fieldConfig:
defaults:
custom:
fillOpacity: 8
lineWidth: 1
showPoints: never
unit: short
overrides: []
gridPos:
h: 5
w: 8
x: 0
y: 6
id: 6
options:
legend:
displayMode: list
placement: bottom
showLegend: true
tooltip:
mode: multi
sort: desc
targets:
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr:
sum by (host_name) (count_over_time({service_name=~"$service", deployment_environment="$env"}
|~ "Slow SQLite query" | type=~"$qtype" [$__auto]))
legendFormat: '{{host_name}}'
queryType: range
refId: A
title: Slow queries by worker host
type: timeseries
- datasource:
type: loki
uid: grafanacloud-logs
description: Worker restarts (every zero-cache process logs one line per worker
on boot; a fleet-wide burst = a deploy) and post-restart auth failures from
the custom-query transform endpoint. Slow-query storms almost always line up
with these.
fieldConfig:
defaults:
custom:
drawStyle: bars
fillOpacity: 15
lineWidth: 1
showPoints: never
unit: short
overrides: []
gridPos:
h: 5
w: 16
x: 8
y: 11
id: 15
options:
legend:
displayMode: list
placement: bottom
showLegend: true
tooltip:
mode: multi
sort: desc
targets:
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr: sum(count_over_time({service_name=~"$service", deployment_environment="$env"}
|= "OpenTelemetry SDK started" [$__auto]))
legendFormat: worker restarts
queryType: range
refId: A
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr: sum(count_over_time({service_name=~"$service", deployment_environment="$env"}
|= "Connection auth validation failed" [$__auto]))
legendFormat: auth 401s on reconnect
queryType: range
refId: B
title: Deploys and reconnect storms
type: timeseries
- collapsed: false
gridPos:
h: 1
w: 24
x: 0
y: 16
id: 7
panels: []
title: By statement
type: row
- datasource:
type: loki
uid: grafanacloud-logs
description: The sql field is attached as structured metadata on each slow query
log line.
fieldConfig:
defaults:
custom:
align: auto
filterable: false
inspect: true
unit: short
overrides: []
gridPos:
h: 11
w: 12
x: 0
y: 17
id: 8
options:
showHeader: true
sortBy:
- desc: true
displayName: slow queries
targets:
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr:
topk(15, sum by (sql) (count_over_time({service_name=~"$service", deployment_environment="$env"}
|~ "Slow SQLite query" | type=~"$qtype" [$__range])))
instant: true
queryType: instant
range: false
refId: A
title: Top statements by slow query count
transformations:
- id: organize
options:
excludeByName:
Time: true
renameByName:
Value: slow queries
'Value #A': slow queries
type: table
- datasource:
type: loki
uid: grafanacloud-logs
description: p95 of parsed duration, grouped by statement.
fieldConfig:
defaults:
custom:
align: auto
filterable: false
inspect: true
unit: ms
overrides: []
gridPos:
h: 11
w: 12
x: 12
y: 17
id: 9
options:
showHeader: true
sortBy:
- desc: true
displayName: p95 ms
targets:
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr:
topk(15, quantile_over_time(0.95, {service_name=~"$service", deployment_environment="$env"}
|~ "Slow SQLite query" | type=~"$qtype" | regexp "Slow SQLite query (?P<duration_ms>[0-9.]+)"
| unwrap duration_ms [$__range]) by (sql))
instant: true
queryType: instant
range: false
refId: A
title: Top statements by p95 duration (ms)
transformations:
- id: organize
options:
excludeByName:
Time: true
renameByName:
Value: p95 ms
'Value #A': p95 ms
type: table
- collapsed: false
gridPos:
h: 1
w: 24
x: 0
y: 28
id: 10
panels: []
title: By table
type: row
- datasource:
type: loki
uid: grafanacloud-logs
description: "Table name extracted from the sql structured-metadata field. (Per-client
breakdowns are not possible here: more than 500 distinct clientGroupID values
per query window exceeds Loki's series limit.)"
fieldConfig:
defaults:
custom:
fillOpacity: 8
lineWidth: 1
showPoints: never
stacking:
group: A
mode: normal
unit: short
overrides: []
gridPos:
h: 9
w: 12
x: 0
y: 29
id: 11
options:
legend:
displayMode: list
placement: bottom
showLegend: true
tooltip:
mode: multi
sort: desc
targets:
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr:
sum by (tbl) (count_over_time({service_name=~"$service", deployment_environment="$env"}
|~ "Slow SQLite query" | type=~"$qtype" | label_format tbl=`{{ regexReplaceAll
"(?s).*FROM .([a-zA-Z0-9._]+).*" .sql "$1" }}` [$__auto]))
legendFormat: '{{tbl}}'
queryType: range
refId: A
title: Slow queries by table
type: timeseries
- datasource:
type: loki
uid: grafanacloud-logs
description: zero-cache tags each statement event with class/method/type (e.g.
Statement/iterate/total).
fieldConfig:
defaults:
custom:
fillOpacity: 8
lineWidth: 1
showPoints: never
unit: short
overrides: []
gridPos:
h: 9
w: 12
x: 12
y: 29
id: 12
options:
legend:
displayMode: list
placement: bottom
showLegend: true
tooltip:
mode: multi
sort: desc
targets:
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr:
sum by (method, type) (count_over_time({service_name=~"$service", deployment_environment="$env"}
|~ "Slow SQLite query" | type=~"$qtype" [$__auto]))
legendFormat: '{{method}}/{{type}}'
queryType: range
refId: A
title: Slow queries by method / type
type: timeseries
- collapsed: false
gridPos:
h: 1
w: 24
x: 0
y: 38
id: 13
panels: []
title: Raw logs
type: row
- datasource:
type: loki
uid: grafanacloud-logs
gridPos:
h: 12
w: 24
x: 0
y: 39
id: 14
options:
dedupStrategy: none
enableLogDetails: true
showTime: true
sortOrder: Descending
wrapLogMessage: true
targets:
- datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr: '{service_name=~"$service", deployment_environment="$env"} |~ "Slow SQLite
query" | type=~"$qtype"'
maxLines: 200
queryType: range
refId: A
title: Recent slow query logs
type: logs
refresh: ''
schemaVersion: 42
tags:
- zero
- loki
- slow-queries
- provisioned
- repo:tldraw/tldraw
templating:
list:
- allValue: zero-.+
current:
text:
- All
value:
- $__all
hide: 0
includeAll: true
label: Zero service
multi: true
name: service
options: []
query: zero-vs,zero-rm
type: custom
- current:
text: production
value: production
hide: 0
includeAll: false
label: Environment
multi: false
name: env
options:
- selected: true
text: production
value: production
- selected: false
text: staging
value: staging
query: production,staging
type: custom
- allValue: .*
current:
text: All
value: $__all
description: total = wall-clock across row iteration (includes syncer pipeline
stalls); sqlite = time inside the SQLite engine. Filter to sqlite to see whether
the database itself is slow.
hide: 0
includeAll: true
label: Query type
multi: false
name: qtype
options:
- selected: true
text: All
value: $__all
- selected: false
text: total
value: total
- selected: false
text: sqlite
value: sqlite
query: total,sqlite
type: custom
time:
from: now-6h
to: now
timezone: browser
title: Zero slow queries