Skip to content
DashboardWebsite

Metrics

OpenTremor Core exposes a /metrics endpoint in Prometheus format. Prometheus can scrape it without authentication. The OpenTremor Monitoring repository provides a separate Grafana dashboard.

Configure Prometheus to scrape the Core server:

scrape_configs:
- job_name: opentremor-core
static_configs:
- targets:
- <host>:8000
metrics_path: /metrics

The endpoint is served by prometheus_client and is excluded from HTTP request timing. The prometheus-client dependency is included by default.

Every metric below carries an org_id label, so you can filter any panel or query by tenant. See Filter by organization.

MetricTypeLabelsDescription
http_request_duration_secondsHistogrammethod, handler, status, org_idHTTP request latency. The handler label uses the route template, not the raw path. Requests matching no route use none. Requests to /metrics and paths beginning with /health are excluded.
MetricTypeLabelsDescription
mcp_ingest_totalCounterpack, org_idPlan ingest calls
mcp_ingested_resources_totalCounterpack, org_idResources ingested
mcp_analysis_totalCounterresource_type, org_idAnalysis submissions
mcp_findings_totalCounterresource_type, severity, org_idIndividual findings — severity is CRITICAL, HIGH, MEDIUM, LOW, or INFO
mcp_llm_analysis_duration_secondsHistogramresource_type, org_idTime from a unit’s claim (POST /v1/{changeset}/claims) to its analysis submission (POST /v1/{changeset}/analyses)

mcp_analysis_total and mcp_findings_total count identically regardless of how the analysis was produced: client-led PUT, server-side POST .../analyze, or a GitHub-webhook-triggered run. All three use the same analysis_service.record_analysis(). Prometheus metrics do not report billing (usage_events/LLM token cost) or finding triage changes. For billing, query GET /v1/orgs/{org_id}/usage. For finding summaries, query GET /v1/findings/summary.

The org_id label comes from the same request-scoped context as telemetry spans (current_principal() in the platform’s controllers/shared/observability/request_context.py). Metrics need no separate plumbing. Requests without a resolved org, such as health checks, the metrics scrape, public report links, GitHub webhooks, and SSO callbacks before login, use org_id="_none" instead of an empty label value. The label is always an explicit, queryable string.

# Request rate for one org only
sum(rate(http_request_duration_seconds_count{org_id="7c3c6e2e-..."}[5m]))
# Findings by severity for one org
sum(rate(mcp_findings_total[5m])) by (org_id, severity)