OpenTelemetry metrics
The server exports metrics over OTLP/HTTP when OTEL_EXPORTER_OTLP_ENDPOINT is set. Export is disabled when the variable is empty. See Deployment for configuration and local inspection instructions.
Names below are the names sent through OTLP. An observability backend may normalize them; for example, a Prometheus-compatible backend can replace dots with underscores and add counter or unit suffixes.
Application metrics
| Metric | Instrument | Unit | Description |
|---|---|---|---|
backlog_holdem.http.server.requests | Counter | — | Completed observed HTTP requests. |
backlog_holdem.http.server.request.duration | Histogram | s | Observed HTTP request duration. |
backlog_holdem.http.server.active_requests | Up-down counter | — | Observed HTTP requests currently in progress. |
backlog_holdem.room.commands | Counter | — | Completed room commands. |
backlog_holdem.room.command.duration | Histogram | s | Room command duration. |
backlog_holdem.realtime.connections | Up-down counter | — | Currently open SSE and WebSocket connections. |
backlog_holdem.realtime.connection.duration | Histogram | s | Duration of closed SSE and WebSocket connections. |
backlog_holdem.realtime.events.dropped | Counter | — | Room updates that could not be delivered to a subscriber because its channel remained full. |
backlog_holdem.repository.operations | Counter | — | Completed room repository operations. |
backlog_holdem.repository.operation.duration | Histogram | s | Room repository operation duration. |
backlog_holdem.room.deleted | Counter | — | Rooms removed by the expiry cleanup worker. |
backlog_holdem.deck.selected | Counter | — | Decks selected when rooms are created. |
backlog_holdem.card.played | Counter | — | Cards played in successful votes. |
backlog_holdem.room.active | Observable gauge | — | Non-ended rooms currently stored. |
backlog_holdem.participant.active | Observable gauge | — | Current participants summed across non-ended rooms. |
HTTP metrics cover /api/*, /events/*, and /ws/*. The /api/health endpoint and frontend routes and assets are excluded. Long-lived SSE and WebSocket requests remain active until their connection closes.
Metric attributes
| Attribute | Metrics | Values |
|---|---|---|
http.request.method | HTTP requests, duration, and active requests | HTTP method, such as GET or POST |
http.route | Completed HTTP requests and duration | Route template, such as /api/rooms/{code}; never the room code |
http.response.status_code | Completed HTTP requests and duration | Integer HTTP status code |
backlog_holdem.command | Room commands and duration | create, join, vote, kick, reveal, end, reset, topic, or demo-team; WebSocket messages supply this value |
backlog_holdem.transport | Room commands, command duration, connections, and connection duration | http, sse, or websocket, as applicable |
backlog_holdem.outcome | Room commands, command duration, repository operations, and repository duration | success, rejected, or error for commands; success or error for repository operations |
db.system.name | Repository operations and duration | sqlite or postgres |
db.operation.name | Repository operations and duration | create, get, get_with_history, or save |
reason | Deleted rooms | idle_timeout or session_ended |
backlog_holdem.deck.type | Deck selections and cards played | fibonacci, modified-fibonacci, or tshirt-sizes |
backlog_holdem.card.value | Cards played | A card from the selected deck |
backlog_holdem.realtime.events.dropped has no metric attributes. The metrics do not contain room codes, participant identifiers, names, or topics. Card values are only exported from the fixed, low-cardinality decks listed above.
Go runtime metrics
The server also enables the OpenTelemetry Go runtime instrumentation:
| Metric | Instrument | Unit | Description |
|---|---|---|---|
go.memory.used | Observable up-down counter | By | Memory used by the Go runtime, split by go.memory.type (stack or other). |
go.memory.limit | Observable up-down counter | By | Configured Go runtime memory limit. Omitted when no limit exists. |
go.memory.allocated | Observable counter | By | Memory allocated to the heap by the application. |
go.memory.allocations | Observable counter | {allocation} | Heap allocations made by the application. |
go.memory.gc.goal | Observable up-down counter | By | Heap size target for the end of the garbage collection cycle. |
go.goroutine.count | Observable up-down counter | {goroutine} | Live goroutines. |
go.processor.limit | Observable up-down counter | {thread} | OS threads that can execute Go code simultaneously. |
go.config.gogc | Observable up-down counter | % | Configured heap growth target percentage. |
Resource attributes
Every metric is exported with resource attributes identifying the running server:
| Attribute | Source |
|---|---|
service.name | OTEL_SERVICE_NAME, default backlog-holdem |
service.version | SERVICE_VERSION, otherwise the build revision or version |
service.instance.id | Hostname, when available |
deployment.environment.name | DEPLOYMENT_ENVIRONMENT, default development |
vcs.ref.head.revision | Embedded build revision |
gitlab.project.id | GITLAB_PROJECT_ID, when set |
gitlab.project.name | GITLAB_PROJECT_NAME, when set |
OTEL_RESOURCE_ATTRIBUTES can add or override resource attributes. Resource attributes may appear separately from data-point attributes in the observability backend.