Skip to content

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 ​

MetricInstrumentUnitDescription
backlog_holdem.http.server.requestsCounter—Completed observed HTTP requests.
backlog_holdem.http.server.request.durationHistogramsObserved HTTP request duration.
backlog_holdem.http.server.active_requestsUp-down counter—Observed HTTP requests currently in progress.
backlog_holdem.room.commandsCounter—Completed room commands.
backlog_holdem.room.command.durationHistogramsRoom command duration.
backlog_holdem.realtime.connectionsUp-down counter—Currently open SSE and WebSocket connections.
backlog_holdem.realtime.connection.durationHistogramsDuration of closed SSE and WebSocket connections.
backlog_holdem.realtime.events.droppedCounter—Room updates that could not be delivered to a subscriber because its channel remained full.
backlog_holdem.repository.operationsCounter—Completed room repository operations.
backlog_holdem.repository.operation.durationHistogramsRoom repository operation duration.
backlog_holdem.room.deletedCounter—Rooms removed by the expiry cleanup worker.
backlog_holdem.deck.selectedCounter—Decks selected when rooms are created.
backlog_holdem.card.playedCounter—Cards played in successful votes.
backlog_holdem.room.activeObservable gauge—Non-ended rooms currently stored.
backlog_holdem.participant.activeObservable 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 ​

AttributeMetricsValues
http.request.methodHTTP requests, duration, and active requestsHTTP method, such as GET or POST
http.routeCompleted HTTP requests and durationRoute template, such as /api/rooms/{code}; never the room code
http.response.status_codeCompleted HTTP requests and durationInteger HTTP status code
backlog_holdem.commandRoom commands and durationcreate, join, vote, kick, reveal, end, reset, topic, or demo-team; WebSocket messages supply this value
backlog_holdem.transportRoom commands, command duration, connections, and connection durationhttp, sse, or websocket, as applicable
backlog_holdem.outcomeRoom commands, command duration, repository operations, and repository durationsuccess, rejected, or error for commands; success or error for repository operations
db.system.nameRepository operations and durationsqlite or postgres
db.operation.nameRepository operations and durationcreate, get, get_with_history, or save
reasonDeleted roomsidle_timeout or session_ended
backlog_holdem.deck.typeDeck selections and cards playedfibonacci, modified-fibonacci, or tshirt-sizes
backlog_holdem.card.valueCards playedA 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:

MetricInstrumentUnitDescription
go.memory.usedObservable up-down counterByMemory used by the Go runtime, split by go.memory.type (stack or other).
go.memory.limitObservable up-down counterByConfigured Go runtime memory limit. Omitted when no limit exists.
go.memory.allocatedObservable counterByMemory allocated to the heap by the application.
go.memory.allocationsObservable counter{allocation}Heap allocations made by the application.
go.memory.gc.goalObservable up-down counterByHeap size target for the end of the garbage collection cycle.
go.goroutine.countObservable up-down counter{goroutine}Live goroutines.
go.processor.limitObservable up-down counter{thread}OS threads that can execute Go code simultaneously.
go.config.gogcObservable up-down counter%Configured heap growth target percentage.

Resource attributes ​

Every metric is exported with resource attributes identifying the running server:

AttributeSource
service.nameOTEL_SERVICE_NAME, default backlog-holdem
service.versionSERVICE_VERSION, otherwise the build revision or version
service.instance.idHostname, when available
deployment.environment.nameDEPLOYMENT_ENVIRONMENT, default development
vcs.ref.head.revisionEmbedded build revision
gitlab.project.idGITLAB_PROJECT_ID, when set
gitlab.project.nameGITLAB_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.

Backlog Hold'em project documentation