Metrics

Every metric that the telemetry package records, with its Prometheus name, type, and labels.

@docx-editor.dev/telemetry is available in version 2.29.0 and later.

Read metric names and labels

Each metric has an OpenTelemetry name and a derived Prometheus name. For example, docx_editor.collab.room.load.duration becomes docx_editor_collab_room_load_duration_seconds. The tables list Prometheus names and OpenTelemetry label keys; Prometheus replaces dots in label keys with underscores.

LabelApplies toNotes
docx_editor.versionEvery editor metricThe editor package version, docx_editor_version in Prometheus. Server metrics omit it.
Keys in metricLabelsEvery editor metricYour attributes, such as app.version. See Identify rooms and users.
Built-in labelsListed per metricClosed value lists, which limit the number of series.

Monitor documents and edits

Prometheus nameTypeLabelsDescription
docx_editor_document_opens_totalcounteroutcome, code, cause, part, docx_editor.versionDocuments opened or refused, by outcome, refusal code, engine reason, and part role.
docx_editor_document_open_duration_secondshistogramdocx_editor.versionTime from the start of an open to the laid-out document.
docx_editor_document_saves_totalcounteroutcome, code, docx_editor.versionCalls to save() that returned the document or failed, by outcome and failure code.
docx_editor_document_save_duration_secondshistogramdocx_editor.versionTime from a save() call to the saved bytes, pending edits included. Successful saves only.
docx_editor_edits_totalcounterorigin, docx_editor.versionEdits that changed the document, by origin: input, command, or automation. Refused edits are in docx_editor.edit.rejections, and edits by collaborators are not counted. Counted when a session summary is sent, up to a minute after the edit.
docx_editor_edit_rejections_totalcountercode, cause, origin, tracked, docx_editor.versionEdits, commands, and tracked changes refused, by public code and engine reason.
docx_editor_review_skipped_totalcountercode, cause, operation, change_kind, docx_editor.versionTracked changes skipped by accept, reject, or reassign requests, by engine reason, operation, and change kind.
docx_editor_font_failures_totalcountercode, docx_editor.versionFont faces that failed to load and were substituted.
docx_editor_history_diagnostics_totalcountercode, docx_editor.versionUndo steps that did not group as the gesture intended, by code.
docx_editor_custom_node_diagnostics_totalcountercode, docx_editor.versionCustom node payloads that could not be read, by code.
docx_editor_telemetry_dropped_events_totalcounterreason, docx_editor.versionEvents the anonymity guard dropped, by reason. Usually a version mismatch.

Monitor sessions and performance

Prometheus nameTypeLabelsDescription
docx_editor_editor_sessions_totalcounterphase, docx_editor.versionEditor sessions started and ended, by phase. An editor ends when it is destroyed or its page closes.
docx_editor_editor_session_duration_secondshistogramdocx_editor.versionTime from the creation of an editor to its end, idle time included. Recorded when the session ends.
docx_editor_editor_active_time_seconds_totalcounterdocx_editor.versionSeconds of use: time between key presses, pointer presses, and edits that are at most 30 seconds apart. Counted when a session summary is sent.
docx_editor_editor_interaction_duration_secondshistogrampages, docx_editor.versionKey presses and pointer presses on the pages, to the next frame on screen, by page count bucket. Bucket counts are exact; the sum is estimated from the bands.
docx_editor_editor_layout_duration_secondshistogrampages, docx_editor.versionEngine layout passes after edits and view changes, background work included, by page count bucket. Bucket counts are exact; the sum is estimated from the bands.
docx_editor_editor_paint_duration_secondshistogrampages, docx_editor.versionEngine paints of the pages, by page count bucket. Bucket counts are exact; the sum is estimated from the bands.

For counting rules, see Measure sessions, edits, and saves and Measure performance.

Monitor collaboration clients

Prometheus nameTypeLabelsDescription
docx_editor_collab_client_status_transitions_totalcounterstatus, code, docx_editor.versionCollaboration status changes on clients, by new status and failure code.
docx_editor_collab_client_connect_duration_secondshistogramdocx_editor.versionTime from an editor attaching a room to its first ready status, when the editor attached before the room was ready.
docx_editor_collab_client_participantshistogramdocx_editor.versionPeople in the room, as each client sees it when the count changes.

Monitor collaboration servers

Server metrics carry no docx_editor.version label.

Prometheus nameTypeLabelsDescription
docx_editor_collab_rooms_activegaugenoneRooms loaded.
docx_editor_collab_connections_activegaugenoneOpen client connections. One person with two tabs is two connections.
docx_editor_collab_participants_activegaugenonePeople present in all rooms, from awareness states.
docx_editor_collab_room_participantshistogramnonePeople present in each room, sampled once per room per interval.
docx_editor_collab_room_participants_maxgaugenonePeople in the fullest room now.
docx_editor_collab_room_memory_byteshistogramkindBytes each room holds, sampled per room: encoded state, blobs, and updates not yet stored.
docx_editor_collab_rooms_memory_bytesgaugekindBytes all rooms hold together at the last sample.
docx_editor_collab_room_nodeshistogramstateShared document nodes per room, live and tombstoned.
docx_editor_collab_room_resource_usagehistogramresourceShare of each room resource limit in use, from 0 to 1.
docx_editor_collab_room_age_secondshistogramnoneHow long each room has been loaded.
docx_editor_collab_room_idle_secondshistogramnoneTime since each room last changed.
docx_editor_collab_room_load_duration_secondshistogramoutcomeTime to load a room, by outcome.
docx_editor_collab_room_store_duration_secondshistogramoutcomeTime to store a room, by outcome.
docx_editor_collab_admission_rejections_totalcounterreasonConnections refused at admission, by reason.
docx_editor_collab_message_refusals_totalcounterreasonMessages refused before they applied, by reason, such as room-generation-changed.
docx_editor_collab_updates_totalcounternoneDocument updates applied to rooms.
docx_editor_collab_update_bytes_totalcounternoneBytes of document updates applied to rooms.
docx_editor_collab_migrations_totalcounteroutcomeRoom migrations, by outcome.
docx_editor_collab_room_participants_currentgaugeroomPeople in each room, labeled by room. Recorded only with perRoomSeries.
docx_editor_collab_room_memory_current_bytesgaugeroom, kindBytes each room holds, labeled by room and kind. Recorded only with perRoomSeries.

Limits

  • Performance histogram bucket counts are exact. Sums are estimates from the timing bands.
  • Edit and active-time counts arrive with session summaries, up to a minute after the edit.
  • Nonzero session and performance sampling limits events, not metrics. A performance sampleRate of 0 stops performance metrics.
  • Per-room gauges require perRoomSeries. For label rules, see Rooms, people, and memory.

See also