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,112 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: anthropic
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-03-20T11:22:55Z'
grafana.com/updatedBy: bf1wptf89bpq8d
labels:
grafana.app/folder: anthropic
grafana.com/group: anthropic
grafana.com/group-index: '1'
name: 8451fbba-5835-56e2-b2f5-7f5e44c520b8
namespace: stacks-890472
spec:
annotations:
description: 'Anthropic API usage over the last hour averaged {{ $value | humanize }}
tokens/sec excluding cache reads, above the 1000 tokens/sec floor (about 3.6M
tokens/hour). Check the scrape overview dashboard for which key and model.'
summary: Anthropic API token burst detected.
execErrState: Ok
expressions:
prometheus_math:
model:
datasource:
IsPrunable: false
access: ''
apiVersion: ''
basicAuth: false
basicAuthUser: ''
created: '0001-01-01T00:00:00Z'
database: ''
id: -100
isDefault: false
jsonData: {}
name: __expr__
readOnly: false
secureJsonData: {}
type: __expr__
uid: __expr__
updated: '0001-01-01T00:00:00Z'
url: ''
user: ''
withCredentials: false
expression: is_number($query) || is_nan($query) || is_inf($query)
intervalMs: 1000
maxDataPoints: 43200
refId: prometheus_math
type: math
queryType: math
query:
datasourceUID: grafanacloud-prom
model:
datasource:
type: prometheus
uid: grafanacloud-prom
expr: |
sum(
rate(gen_ai_usage_tokens_total{job=~"integrations/anthropic/.*", gen_ai_token_type!="input_cache_read"}[1h])
) > 1000
instant: true
intervalMs: 1000
maxDataPoints: 43200
range: false
refId: query
queryType: prometheus
relativeTimeRange:
from: 11m0s
to: 1m0s
threshold:
model:
conditions:
- evaluator:
params:
- 0
type: gt
datasource:
IsPrunable: false
access: ''
apiVersion: ''
basicAuth: false
basicAuthUser: ''
created: '0001-01-01T00:00:00Z'
database: ''
id: -100
isDefault: false
jsonData: {}
name: __expr__
readOnly: false
secureJsonData: {}
type: __expr__
uid: __expr__
updated: '0001-01-01T00:00:00Z'
url: ''
user: ''
withCredentials: false
expression: prometheus_math
intervalMs: 1000
maxDataPoints: 43200
refId: threshold
type: threshold
queryType: threshold
source: true
for: 15m0s
labels:
__converted_prometheus_rule__: 'true'
severity: warning
missingSeriesEvalsToResolve: 10
noDataState: Ok
title: AnthropicTokenBurst
trigger:
interval: 1m

View File

@@ -0,0 +1,66 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: f6hsw6
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-04-21T09:07:11Z'
grafana.com/updatedBy: ae5t47muqbegwf
labels:
grafana.app/folder: f6hsw6
grafana.com/group: zero-alerts-fast
grafana.com/group-index: '2'
name: afjn4kz1g4jk0a
namespace: stacks-890472
spec:
execErrState: Error
expressions:
A:
datasourceUID: grafanacloud-prom
model:
editorMode: code
expr: zero_replication_total_lag_millisecond{deployment_environment="production",
service_name="zero-rm"}
instant: true
intervalMs: 1000
legendFormat: __auto
maxDataPoints: 43200
range: false
refId: A
relativeTimeRange:
from: 10m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 1000
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
for: 5m0s
labels:
service: zero
severity: warning
noDataState: NoData
title: Zero replication lag elevated
trigger:
interval: 5m

View File

@@ -0,0 +1,81 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: f6hsw6
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-04-28T08:48:46Z'
grafana.com/updatedBy: ae5t47muqbegwf
labels:
grafana.app/folder: f6hsw6
grafana.com/group: zero-fly-alerts
grafana.com/group-index: '5'
name: bfjyilovht2pse
namespace: stacks-890472
spec:
annotations:
description: |-
Fires when the 5-minute rolling count of logs with detected_level error or fatal is greater than zero for service_name matching zero-(rm|vs) and deployment_environment=production.
Investigate in Grafana Explore (grafanacloud-tldraw-logs):
{service_name=~"zero-(rm|vs)", deployment_environment="production"} | detected_level=~"error|fatal"
Typical causes include failed upstream connections, auth/sync failures, or crashes; use log fields (component, worker, status, message) to narrow the blast radius.
summary: 'Production Zero: error/fatal logs in the last evaluation window.'
execErrState: Ok
expressions:
A:
datasourceUID: grafanacloud-logs
model:
datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr:
sum(count_over_time({service_name=~"zero-(rm|vs)", deployment_environment="production"}
| detected_level=~"error|fatal" [5m]))
instant: true
intervalMs: 1000
maxDataPoints: 43200
queryType: instant
refId: A
queryType: instant
relativeTimeRange:
from: 10m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 0
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
for: 1m0s
labels:
service: zero
severity: critical
noDataState: Ok
paused: true
title: Zero error log (production)
trigger:
interval: 1m

View File

@@ -0,0 +1,72 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: f6hsw6
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-04-28T08:48:46Z'
grafana.com/updatedBy: ae5t47muqbegwf
labels:
grafana.app/folder: f6hsw6
grafana.com/group: zero-fly-alerts
grafana.com/group-index: '2'
name: cfjnb1whljcowe
namespace: stacks-890472
spec:
annotations:
summary: Zero container disk utilization exceeds 80%
execErrState: Error
expressions:
A:
datasourceUID: afj5re4yk9og0e
model:
datasource:
type: prometheus
uid: afj5re4yk9og0e
editorMode: code
expr: |-
(fly_instance_filesystem_blocks{app=~"production-zero-rm|production-zero-vs"} - fly_instance_filesystem_blocks_avail{app=~"production-zero-rm|production-zero-vs"}) * fly_instance_filesystem_block_size{app=~"production-zero-rm|production-zero-vs"} /
(fly_instance_filesystem_blocks{app=~"production-zero-rm|production-zero-vs"} * fly_instance_filesystem_block_size{app=~"production-zero-rm|production-zero-vs"})
instant: true
intervalMs: 1000
legendFormat: __auto
maxDataPoints: 43200
range: false
refId: A
relativeTimeRange:
from: 10m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 0.8
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
for: 10m0s
labels:
service: zero
severity: critical
noDataState: NoData
title: Flyio zero container disk high
trigger:
interval: 1m

View File

@@ -0,0 +1,72 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: f6hsw6
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-04-28T08:48:46Z'
grafana.com/updatedBy: ae5t47muqbegwf
labels:
grafana.app/folder: f6hsw6
grafana.com/group: zero-fly-alerts
grafana.com/group-index: '3'
name: cfjnbehzmlhxcc
namespace: stacks-890472
spec:
annotations:
summary: Zero container CPU utilization exceeds 85%
execErrState: Error
expressions:
A:
datasourceUID: afj5re4yk9og0e
model:
datasource:
type: prometheus
uid: afj5re4yk9og0e
editorMode: code
expr:
sum by (instance, app)(rate(fly_instance_cpu{app=~"production-zero-rm|production-zero-vs",mode!="idle"}[5m]))
/ sum by (instance, app)(rate(fly_instance_cpu{app=~"production-zero-rm|production-zero-vs"}[5m]))
instant: true
intervalMs: 1000
legendFormat: __auto
maxDataPoints: 43200
range: false
refId: A
relativeTimeRange:
from: 10m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 0.85
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
for: 15m0s
labels:
service: zero
severity: warning
noDataState: NoData
title: Flyio zero container cpu high
trigger:
interval: 1m

View File

@@ -0,0 +1,80 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: f6hsw6
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-04-28T08:48:46Z'
grafana.com/updatedBy: ae5t47muqbegwf
labels:
grafana.app/folder: f6hsw6
grafana.com/group: zero-fly-alerts
grafana.com/group-index: '6'
name: cfjyl9tbrury8b
namespace: stacks-890472
spec:
annotations:
description: |-
Fires when the 5-minute rolling count of logs with detected_level error or fatal is greater than zero for service_name matching zero-(rm|vs) and deployment_environment=staging.
Investigate in Grafana Explore (grafanacloud-tldraw-logs):
{service_name=~"zero-(rm|vs)", deployment_environment="staging"} | detected_level=~"error|fatal"
Typical causes include failed upstream connections, auth/sync failures, or crashes; use log fields (component, worker, status, message) to narrow the blast radius.
summary: 'Staging Zero: error/fatal logs in the last evaluation window.'
execErrState: Ok
expressions:
A:
datasourceUID: grafanacloud-logs
model:
datasource:
type: loki
uid: grafanacloud-logs
editorMode: code
expr: sum(count_over_time({service_name=~"zero-(rm|vs)", deployment_environment="staging"}
| detected_level=~"error|fatal" [5m]))
instant: true
intervalMs: 1000
maxDataPoints: 43200
queryType: instant
refId: A
queryType: instant
relativeTimeRange:
from: 10m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 0
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
for: 5m0s
labels:
service: zero
severity: warning
noDataState: Ok
paused: true
title: Zero error log (staging)
trigger:
interval: 1m

View File

@@ -0,0 +1,69 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: f6hsw6
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-04-21T09:06:29Z'
grafana.com/updatedBy: ae5t47muqbegwf
labels:
grafana.app/folder: f6hsw6
grafana.com/group: zero-alerts
grafana.com/group-index: '1'
name: dfjn3qe3l7w8wc
namespace: stacks-890472
spec:
execErrState: Error
expressions:
A:
datasourceUID: grafanacloud-prom
model:
editorMode: code
expr: zero_replica_backup_lag_millisecond{deployment_environment="production",
service_name="zero-rm"}
instant: true
intervalMs: 1000
legendFormat: __auto
maxDataPoints: 43200
range: false
refId: A
relativeTimeRange:
from: 10m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 1200000
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
for: 20m0s
labels:
service: zero
severity: critical
noDataState: NoData
notificationSettings:
receiver: Discord
type: SimplifiedRouting
title: Zero replica backup lag
trigger:
interval: 20m

View File

@@ -0,0 +1,72 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: f6hsw6
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-04-28T08:48:46Z'
grafana.com/updatedBy: ae5t47muqbegwf
labels:
grafana.app/folder: f6hsw6
grafana.com/group: zero-fly-alerts
grafana.com/group-index: '1'
name: dfjn9xellhibka
namespace: stacks-890472
spec:
annotations:
summary: Zero container memory utilization exceeds 90%
execErrState: Error
expressions:
A:
datasourceUID: afj5re4yk9og0e
model:
datasource:
type: prometheus
uid: afj5re4yk9og0e
editorMode: code
expr: 1 - (fly_instance_memory_mem_available{app=~"production-zero-rm|production-zero-vs"}
/ fly_instance_memory_mem_total{app=~"production-zero-rm|production-zero-vs"})
instant: true
intervalMs: 1000
legendFormat: __auto
maxDataPoints: 43200
range: false
refId: A
relativeTimeRange:
from: 10m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 0.9
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
for: 1m0s
keepFiringFor: 5m0s
labels:
service: zero
severity: warning
noDataState: NoData
title: Flyio zero container memory high
trigger:
interval: 1m

View File

@@ -0,0 +1,94 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: dotcom
grafana.com/provenance: ''
labels:
grafana.app/folder: dotcom
grafana.com/group: dotcom-alerts
grafana.com/group-index: '1'
name: dotcom-file-do-exceptions
namespace: stacks-890472
spec:
annotations:
description: TLFileDurableObject threw more than 300 uncaught exceptions in the
last hour. Quiet hours run 1-50; the bursts that followed hibernation being
enabled on 2026-08-13 run 700-1300. Check the "DO exceptions by namespace"
panel on the Cloudflare platform metrics dashboard, then Sentry for the
matching source tag.
summary: File room durable objects are throwing uncaught exceptions
execErrState: Error
expressions:
A:
datasourceUID: ffuyblsuemj28b
model:
columns:
- selector: sum.requests
text: exceptions
type: number
format: table
global_query_id: ''
parser: backend
refId: A
root_selector: data.viewer.accounts[0].durableObjectsInvocationsAdaptiveGroups
source: url
type: graphql
url: https://api.cloudflare.com/client/v4/graphql
url_options:
body_content_type: application/json
body_graphql_query: |-
query {
viewer {
accounts(filter: {accountTag: "c34edc4e76350954b63adebde86d5eb1"}) {
durableObjectsInvocationsAdaptiveGroups(limit: 1, filter: {datetime_geq: "${__from:date:iso}", datetime_leq: "${__to:date:iso}", namespaceId: "5864db4344ac4c55bfd94e81dd25a043", status: "scriptThrewException"}) {
sum { requests }
}
}
}
}
body_type: graphql
method: POST
relativeTimeRange:
from: 1h0m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 300
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
for: 10m0s
labels:
service: dotcom
severity: warning
# The query filters to scriptThrewException, so a healthy hour returns no rows at
# all rather than a zero. NoData here means "nothing threw" — alerting on it would
# invert the rule.
noDataState: Ok
notificationSettings:
receiver: Discord
type: SimplifiedRouting
title: File room DO exceptions
trigger:
interval: 10m

View File

@@ -0,0 +1,95 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: dotcom
grafana.com/provenance: ''
labels:
grafana.app/folder: dotcom
grafana.com/group: version-chain-alerts
grafana.com/group-index: '1'
name: dotcom-version-chain-verify-failures
namespace: stacks-890472
spec:
annotations:
description: More than two retired version chains failed to reproduce the state
the durable object persisted, in the last hour. Check the "Verify results"
panel on the Dotcom events dashboard for the reason. head-mismatch is the
serious one — the delta encoding is producing a different board — while
missing and legacy-fallback mean the chain did not answer at all. Until the
legacy full copies are turned off these versions still read; after that they
are unreadable and there is no rebuild path, so this should block the
rollout advancing.
summary: Version chain reconstructions are not reproducing persisted state
execErrState: Error
expressions:
A:
datasourceUID: bdgu7tk03irr4e
model:
dateTimeType: DATETIME
editorMode: code
extrapolate: true
format: table
formatAs: table
intervalFactor: 1
# rawQuery must be the boolean, not a copy of the SQL. The dashboard panels
# carry the SQL in both fields, but that shape reaches the plugin as
# already-interpolated text and dies on "unsupported value type: $from".
# Matches 'fail' rather than negating 'ok': a check the durable object
# declined to run (outcome 'skipped') is not a failing chain, and on a
# board big enough to skip, a negated match would page on every retire.
query: |-
SELECT count() as fails
FROM 'MEASURE'
WHERE timestamp >= toDateTime($from) AND timestamp <= toDateTime($to)
AND blob1 = 'version_chain_verify'
AND blob2 = 'production-tldraw-multiplayer'
AND blob3 = 'fail'
rawQuery: true
refId: A
round: 0s
skip_comments: true
step: ''
relativeTimeRange:
from: 1h0m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 2
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
for: 10m0s
labels:
service: dotcom
severity: warning
# count() with no GROUP BY returns a row holding 0 rather than no rows, so a
# healthy hour evaluates a real zero. NoData here means the Analytics Engine
# datasource itself is down, which is not a version chain problem.
noDataState: Ok
notificationSettings:
receiver: Discord
type: SimplifiedRouting
title: Version chain verify failures
trigger:
interval: 10m

View File

@@ -0,0 +1,85 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: dotcom
grafana.com/provenance: ''
labels:
grafana.app/folder: dotcom
grafana.com/group: version-chain-alerts
grafana.com/group-index: '2'
name: dotcom-version-chain-write-errors
namespace: stacks-890472
spec:
annotations:
description: A chain write failed non-transiently in the last hour. These have
already retried three times and fallen back to writing a legacy full copy,
so no version is lost and boards are unaffected — but the chain is unhealthy
and the rollout should not advance while this fires. Check the "Chain write
errors" panel on the Dotcom events dashboard, then Sentry for the underlying
exception. Expected rate is zero.
summary: Version chain writes are failing and falling back to legacy copies
execErrState: Error
expressions:
A:
datasourceUID: bdgu7tk03irr4e
model:
dateTimeType: DATETIME
editorMode: code
extrapolate: true
format: table
formatAs: table
intervalFactor: 1
# See the verify-failures rule: rawQuery is the boolean, and the SQL lives
# only in `query`, or $from reaches the plugin uninterpolated.
query: |-
SELECT count() as errors
FROM 'MEASURE'
WHERE timestamp >= toDateTime($from) AND timestamp <= toDateTime($to)
AND blob1 = 'version_chain_error'
AND blob2 = 'production-tldraw-multiplayer'
rawQuery: true
refId: A
round: 0s
skip_comments: true
step: ''
relativeTimeRange:
from: 1h0m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 0
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
for: 10m0s
labels:
service: dotcom
severity: warning
noDataState: Ok
notificationSettings:
receiver: Discord
type: SimplifiedRouting
title: Version chain write errors
trigger:
interval: 10m

View File

@@ -0,0 +1,116 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: anthropic
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-03-20T11:22:55Z'
grafana.com/updatedBy: bf1wptf89bpq8d
labels:
grafana.app/folder: anthropic
grafana.com/group: anthropic
grafana.com/group-index: '0'
name: e75d2f6c-44cf-54bf-8a74-ced2e045fcb6
namespace: stacks-890472
spec:
annotations:
description: 'The last completed day cost ${{ $value | humanize }}, more than
1.5x the day before. The cost metric updates once a day at about 03:00 UTC,
so this describes yesterday.'
summary: Anthropic API daily cost spike detected.
execErrState: Ok
expressions:
prometheus_math:
model:
datasource:
IsPrunable: false
access: ''
apiVersion: ''
basicAuth: false
basicAuthUser: ''
created: '0001-01-01T00:00:00Z'
database: ''
id: -100
isDefault: false
jsonData: {}
name: __expr__
readOnly: false
secureJsonData: {}
type: __expr__
uid: __expr__
updated: '0001-01-01T00:00:00Z'
url: ''
user: ''
withCredentials: false
expression: is_number($query) || is_nan($query) || is_inf($query)
intervalMs: 1000
maxDataPoints: 43200
refId: prometheus_math
type: math
queryType: math
query:
datasourceUID: grafanacloud-prom
model:
datasource:
type: prometheus
uid: grafanacloud-prom
expr: |
(
sum(increase(gen_ai_cost{job=~"integrations/anthropic/.*"}[1d])) / 100
>
1.5 * sum(increase(gen_ai_cost{job=~"integrations/anthropic/.*"}[1d] offset 1d)) / 100
)
and
sum(increase(gen_ai_cost{job=~"integrations/anthropic/.*"}[1d])) / 100 > 50
instant: true
intervalMs: 1000
maxDataPoints: 43200
range: false
refId: query
queryType: prometheus
relativeTimeRange:
from: 11m0s
to: 1m0s
threshold:
model:
conditions:
- evaluator:
params:
- 0
type: gt
datasource:
IsPrunable: false
access: ''
apiVersion: ''
basicAuth: false
basicAuthUser: ''
created: '0001-01-01T00:00:00Z'
database: ''
id: -100
isDefault: false
jsonData: {}
name: __expr__
readOnly: false
secureJsonData: {}
type: __expr__
uid: __expr__
updated: '0001-01-01T00:00:00Z'
url: ''
user: ''
withCredentials: false
expression: prometheus_math
intervalMs: 1000
maxDataPoints: 43200
refId: threshold
type: threshold
queryType: threshold
source: true
for: 5m0s
labels:
__converted_prometheus_rule__: 'true'
severity: warning
missingSeriesEvalsToResolve: 10
noDataState: Ok
title: AnthropicDailyCostSpike
trigger:
interval: 1m

View File

@@ -0,0 +1,110 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: anthropic
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-03-20T11:22:55Z'
grafana.com/updatedBy: bf1wptf89bpq8d
labels:
grafana.app/folder: anthropic
grafana.com/group: anthropic
grafana.com/group-index: '2'
name: eec2ad9e-30b9-5c8f-802f-53e26ab8fdc9
namespace: stacks-890472
spec:
annotations:
description: 'The last completed day cost ${{ $value | humanize }}, above the
$1000 threshold. The cost metric updates once a day at about 03:00 UTC, so
this describes yesterday.'
summary: Anthropic API cost threshold exceeded.
execErrState: Ok
expressions:
prometheus_math:
model:
datasource:
IsPrunable: false
access: ''
apiVersion: ''
basicAuth: false
basicAuthUser: ''
created: '0001-01-01T00:00:00Z'
database: ''
id: -100
isDefault: false
jsonData: {}
name: __expr__
readOnly: false
secureJsonData: {}
type: __expr__
uid: __expr__
updated: '0001-01-01T00:00:00Z'
url: ''
user: ''
withCredentials: false
expression: is_number($query) || is_nan($query) || is_inf($query)
intervalMs: 1000
maxDataPoints: 43200
refId: prometheus_math
type: math
queryType: math
query:
datasourceUID: grafanacloud-prom
model:
datasource:
type: prometheus
uid: grafanacloud-prom
expr: |
sum(increase(gen_ai_cost{job=~"integrations/anthropic/.*"}[1d])) / 100 > 1000
instant: true
intervalMs: 1000
maxDataPoints: 43200
range: false
refId: query
queryType: prometheus
relativeTimeRange:
from: 11m0s
to: 1m0s
threshold:
model:
conditions:
- evaluator:
params:
- 0
type: gt
datasource:
IsPrunable: false
access: ''
apiVersion: ''
basicAuth: false
basicAuthUser: ''
created: '0001-01-01T00:00:00Z'
database: ''
id: -100
isDefault: false
jsonData: {}
name: __expr__
readOnly: false
secureJsonData: {}
type: __expr__
uid: __expr__
updated: '0001-01-01T00:00:00Z'
url: ''
user: ''
withCredentials: false
expression: prometheus_math
intervalMs: 1000
maxDataPoints: 43200
refId: threshold
type: threshold
queryType: threshold
source: true
for: 15m0s
labels:
__converted_prometheus_rule__: 'true'
severity: critical
missingSeriesEvalsToResolve: 10
noDataState: Ok
title: AnthropicHighCostThreshold
trigger:
interval: 1m

View File

@@ -0,0 +1,66 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: f6hsw6
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-04-21T09:07:11Z'
grafana.com/updatedBy: ae5t47muqbegwf
labels:
grafana.app/folder: f6hsw6
grafana.com/group: zero-alerts-fast
grafana.com/group-index: '1'
name: efjn4hgdlhc00f
namespace: stacks-890472
spec:
execErrState: Error
expressions:
A:
datasourceUID: grafanacloud-prom
model:
editorMode: code
expr: zero_replication_total_lag_millisecond{deployment_environment="production",
service_name="zero-rm"}
instant: true
intervalMs: 1000
legendFormat: __auto
maxDataPoints: 43200
range: false
refId: A
relativeTimeRange:
from: 10m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 2000
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
for: 5m0s
labels:
service: zero
severity: critical
noDataState: NoData
title: Zero replication lag high
trigger:
interval: 5m

View File

@@ -0,0 +1,69 @@
apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: f6hsw6
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-04-28T08:48:46Z'
grafana.com/updatedBy: ae5t47muqbegwf
labels:
grafana.app/folder: f6hsw6
grafana.com/group: zero-fly-alerts
grafana.com/group-index: '4'
name: efjnbq9h4iha8a
namespace: stacks-890472
spec:
annotations:
summary: Zero container OOM kill detected
execErrState: Ok
expressions:
A:
datasourceUID: afj5re4yk9og0e
model:
datasource:
type: prometheus
uid: afj5re4yk9og0e
editorMode: code
expr: fly_instance_exit_oom{app=~"production-zero-rm|production-zero-vs"}
instant: true
intervalMs: 1000
legendFormat: __auto
maxDataPoints: 43200
range: false
refId: A
relativeTimeRange:
from: 10m0s
to: 0s
C:
model:
conditions:
- evaluator:
params:
- 0
type: gt
operator:
type: and
query:
params:
- C
reducer:
params: []
type: last
type: query
datasource:
type: __expr__
uid: __expr__
expression: A
intervalMs: 1000
maxDataPoints: 43200
refId: C
type: threshold
queryType: expression
source: true
labels:
service: zero
severity: critical
noDataState: Ok
title: Flyio zero container oom kill
trigger:
interval: 1m