Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cmd/trace-coverage-audit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,21 @@ var flows = []flow{
},
{
Name: "in_api_workers",
Description: "Per-iteration spans for in-API background tickers",
Description: "Spans for in-API background workers",
GlobPatterns: []string{
"internal/worker/gas_price_worker.go",
"internal/worker/maintenance_worker.go",
"internal/worker/unit_drift_validator.go",
"internal/app/new.go",
"internal/api/telemetry/telemetry_sessions_charge_geofence_pricing.go",
},
MinSpanFiles: 4,
MinSpanFiles: 5,
RequiredFiles: []string{
"internal/worker/gas_price_worker.go",
"internal/worker/maintenance_worker.go",
"internal/worker/unit_drift_validator.go",
"internal/app/new.go",
"internal/api/telemetry/telemetry_sessions_charge_geofence_pricing.go",
},
},
{
Expand Down
5 changes: 3 additions & 2 deletions docs/runbooks/phase-44-trace-coverage-audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,12 @@ go run ./cmd/trace-coverage-audit -report docs/runbooks/phase-44-trace-coverage-
- Matched files:
- `internal/tracing/fsmtracer.go`

## Per-iteration spans for in-API background tickers — `in_api_workers`
## Spans for in-API background workers — `in_api_workers`

- Status: **OK**
- Instrumented files matched: 4 (threshold ≥ 4)
- Instrumented files matched: 5 (threshold ≥ 5)
- Matched files:
- `internal/api/telemetry/telemetry_sessions_charge_geofence_pricing.go`
- `internal/app/new.go`
- `internal/worker/gas_price_worker.go`
- `internal/worker/maintenance_worker.go`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
{
"uid": "slo-geofence_pricing_read_availability",
"title": "SLO: geofence_pricing_read_availability",
"description": "Charging-place rate history, preview, and activity reads must avoid server errors.",
"tags": [
"slo",
"owner:platform",
"http",
"geofences",
"pricing"
],
"schemaVersion": 38,
"version": 1,
"time": {
"from": "now-24h",
"to": "now"
},
"refresh": "30s",
"panels": [
{
"id": 1,
"type": "stat",
"title": "SLI (5m)",
"description": "Current good/valid ratio.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 0,
"w": 6,
"h": 4
},
"targets": [
{
"refId": "A",
"expr": "slo:geofence_pricing_read_availability:ratio_rate5m",
"legendFormat": "ratio_5m"
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"min": 0,
"max": 1,
"decimals": 3
},
"overrides": null
}
},
{
"id": 2,
"type": "stat",
"title": "Objective",
"description": "SLO target.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 6,
"y": 0,
"w": 6,
"h": 4
},
"targets": [
{
"refId": "A",
"expr": "vector(0.995)",
"legendFormat": "objective"
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"min": 0,
"max": 1,
"decimals": 3
},
"overrides": null
}
},
{
"id": 3,
"type": "stat",
"title": "Error budget remaining (30d)",
"description": "1 - (1 - SLI_30d) / (1 - objective). Negative = budget blown.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 12,
"y": 0,
"w": 12,
"h": 4
},
"targets": [
{
"refId": "A",
"expr": "1 - ((1 - slo:geofence_pricing_read_availability:ratio_rate30d) / (1 - 0.995))",
"legendFormat": "budget_remaining"
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"min": 0,
"max": 1,
"decimals": 3
},
"overrides": null
}
},
{
"id": 4,
"type": "timeseries",
"title": "SLI over time (5m / 1h / 6h)",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 4,
"w": 24,
"h": 8
},
"targets": [
{
"refId": "A",
"expr": "slo:geofence_pricing_read_availability:ratio_rate5m",
"legendFormat": "5m"
},
{
"refId": "B",
"expr": "slo:geofence_pricing_read_availability:ratio_rate1h",
"legendFormat": "1h"
},
{
"refId": "C",
"expr": "slo:geofence_pricing_read_availability:ratio_rate6h",
"legendFormat": "6h"
}
],
"fieldConfig": {
"defaults": {
"unit": "percentunit",
"min": 0,
"max": 1,
"decimals": 3
},
"overrides": null
}
},
{
"id": 5,
"type": "timeseries",
"title": "Burn rate (1h / 6h)",
"description": "Bad-event ratio multiplied so the y-axis is in 'budgets per hour' units.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 12,
"w": 24,
"h": 8
},
"targets": [
{
"refId": "A",
"expr": "(1 - slo:geofence_pricing_read_availability:ratio_rate1h) / (1 - 0.995)",
"legendFormat": "1h"
},
{
"refId": "B",
"expr": "(1 - slo:geofence_pricing_read_availability:ratio_rate6h) / (1 - 0.995)",
"legendFormat": "6h"
}
],
"fieldConfig": {
"defaults": {
"decimals": 3
},
"overrides": null
}
},
{
"id": 6,
"type": "timeseries",
"title": "Latency (with Tempo exemplars)",
"description": "Histogram of the underlying SLI denominator. Exemplars link to Tempo for trace IDs that touched the latency bucket.",
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"gridPos": {
"x": 0,
"y": 20,
"w": 24,
"h": 8
},
"targets": [
{
"refId": "A",
"expr": "histogram_quantile(0.99, sum by (le) (rate(teslasync_red_http_request_duration_seconds_bucket[5m])))",
"legendFormat": "p99",
"exemplar": true
}
],
"fieldConfig": {
"defaults": {
"unit": "s"
},
"overrides": null
}
}
],
"templating": {
"list": []
},
"links": [
{
"title": "Tempo (traces)",
"type": "link",
"url": "/explore?left=%7B%22datasource%22:%22tempo%22%7D"
}
],
"annotations": {
"list": []
}
}
Loading
Loading