lab7 completed
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
2026-11-20 20:37:41 +03:00
parent 20afc2c790
commit 4b21efc2cc
43 changed files with 2277 additions and 144 deletions
+169
View File
@@ -0,0 +1,169 @@
{
"uid": "messenger",
"title": "Messenger observability",
"schemaVersion": 41,
"version": 1,
"refresh": "5s",
"time": {
"from": "now-15m",
"to": "now"
},
"panels": [
{
"id": 1,
"title": "API requests / second",
"type": "timeseries",
"datasource": {
"uid": "prometheus",
"type": "prometheus"
},
"gridPos": {
"x": 0,
"y": 0,
"w": 12,
"h": 8
},
"targets": [
{
"expr": "sum by (service_instance_id) (rate(http_requests_total{route!~\"/health/.*\"}[1m]))",
"refId": "A",
"legendFormat": "{{outcome}} {{service_instance_id}}"
}
],
"fieldConfig": {
"defaults": {
"unit": "reqps"
}
}
},
{
"id": 2,
"title": "API 5xx / second",
"type": "timeseries",
"datasource": {
"uid": "prometheus",
"type": "prometheus"
},
"gridPos": {
"x": 12,
"y": 0,
"w": 12,
"h": 8
},
"targets": [
{
"expr": "sum(rate(http_requests_total{status_class=\"5xx\",route!~\"/health/.*\"}[1m]))",
"refId": "A",
"legendFormat": "{{outcome}} {{service_instance_id}}"
}
],
"fieldConfig": {
"defaults": {
"unit": "reqps"
}
}
},
{
"id": 3,
"title": "API p95 duration",
"type": "timeseries",
"datasource": {
"uid": "prometheus",
"type": "prometheus"
},
"gridPos": {
"x": 0,
"y": 8,
"w": 12,
"h": 8
},
"targets": [
{
"expr": "histogram_quantile(0.95, sum by (le) (rate(http_duration_seconds_bucket{route!~\"/health/.*\"}[1m])))",
"refId": "A",
"legendFormat": "{{outcome}} {{service_instance_id}}"
}
],
"fieldConfig": {
"defaults": {
"unit": "s"
}
}
},
{
"id": 4,
"title": "Worker jobs / second",
"type": "timeseries",
"datasource": {
"uid": "prometheus",
"type": "prometheus"
},
"gridPos": {
"x": 12,
"y": 8,
"w": 12,
"h": 8
},
"targets": [
{
"expr": "sum by (outcome) (rate(worker_jobs_total[1m]))",
"refId": "A",
"legendFormat": "{{outcome}} {{service_instance_id}}"
}
],
"fieldConfig": {
"defaults": {
"unit": "ops"
}
}
},
{
"id": 5,
"title": "Worker p95 duration",
"type": "timeseries",
"datasource": {
"uid": "prometheus",
"type": "prometheus"
},
"gridPos": {
"x": 0,
"y": 16,
"w": 12,
"h": 8
},
"targets": [
{
"expr": "histogram_quantile(0.95, sum by (le,outcome) (rate(worker_job_duration_seconds_bucket[1m])))",
"refId": "A",
"legendFormat": "{{outcome}} {{service_instance_id}}"
}
],
"fieldConfig": {
"defaults": {
"unit": "s"
}
}
},
{
"id": 6,
"title": "API and worker structured logs",
"type": "logs",
"datasource": {
"uid": "loki",
"type": "loki"
},
"gridPos": {
"x": 12,
"y": 16,
"w": 12,
"h": 8
},
"targets": [
{
"expr": "{service_name=~\"messenger-api|messenger-worker\"}",
"refId": "A"
}
]
}
]
}
+41
View File
@@ -0,0 +1,41 @@
apiVersion: 1
datasources:
- name: Prometheus
uid: prometheus
type: prometheus
access: proxy
url: https://prometheus:9443
basicAuth: true
basicAuthUser: grafana
jsonData:
tlsAuthWithCACert: true
secureJsonData:
basicAuthPassword: "@PROM_PASSWORD@"
tlsCACert: |
@TLS_CA@
- name: Loki
uid: loki
type: loki
access: proxy
url: https://loki:9443
basicAuth: true
basicAuthUser: grafana
jsonData:
tlsAuthWithCACert: true
secureJsonData:
basicAuthPassword: "@LOKI_PASSWORD@"
tlsCACert: |
@TLS_CA@
- name: Tempo
uid: tempo
type: tempo
access: proxy
url: https://tempo:9443
basicAuth: true
basicAuthUser: grafana
jsonData:
tlsAuthWithCACert: true
secureJsonData:
basicAuthPassword: "@TEMPO_PASSWORD@"
tlsCACert: |
@TLS_CA@
@@ -0,0 +1,6 @@
apiVersion: 1
providers:
- name: Messenger
type: file
options:
path: /var/lib/grafana/dashboards