logging

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package logging is the domain logger (C-02.FR-17, ADR-0014): one JSON object per line, written only as the events registered in events.go and only with the fields each event declares. It is the only package that imports log/slog or writes to stdout and stderr.

Index

Constants

View Source
const (
	LevelInfo  = Level(slog.LevelInfo)
	LevelWarn  = Level(slog.LevelWarn)
	LevelError = Level(slog.LevelError)
)

Variables

View Source
var APIRequestFailed = newEvent("api_request_failed", LevelError, "C-03",
	"An API request failed with an unexpected error, usually because the database was unavailable, and answered "+
		"500 internal; operation is the operationId of the specification.",
	"operation", "error")

APIRequestFailed is logged when an API request fails with an unexpected error and answers 500.

View Source
var AccountLinkLinked = newEvent("account_link_linked", LevelInfo, "C-18",
	"A messenger account was linked to a User, through /start with a deep-link token in Telegram, a code from the "+
		"bot's direct message in Mattermost or Slack, or through a Bridge an account_link event with a token sent to "+
		"the bot or a code from the bot's direct message, and the account-links hint went to the User: messenger is "+
		"telegram, mattermost, bridge or slack, connection the public_id of the Connection, user the public_id of the "+
		"User. error, when present, says why the bot's confirmation or the answer to the account_link event was not "+
		"sent; the link stays. Never carries the token or the code.",
	"messenger", "connection", "user", "error")

AccountLinkLinked is logged when a messenger account was linked to a User (C-18.FR-2, FR-3, C-22.FR-15, C-24.FR-12).

View Source
var AccountLinkRejected = newEvent("account_link_rejected", LevelInfo, "C-18",
	"A link of a messenger account was refused and recorded as account_link.link_rejected: messenger is telegram, "+
		"mattermost, bridge or slack, connection the public_id of the Connection, reason token_unknown, token_used, "+
		"token_expired or wrong_connection for a /start or a Bridge account_link event, wrong_code, token_used or "+
		"token_expired for a Mattermost, Bridge or Slack code, or conflict for an account linked to another User. "+
		"error, when present, says why the bot's answer was not sent. Never carries the token or the code.",
	"messenger", "connection", "reason", "error")

AccountLinkRejected is logged when a link of a messenger account was refused (C-18.FR-2, FR-3, FR-5, C-22.FR-15, C-24.FR-12).

View Source
var AccountLinkUnlinked = newEvent("account_link_unlinked", LevelInfo, "C-18",
	"An Account link was removed and recorded as account_link.unlink: messenger is telegram, mattermost, bridge or "+
		"slack, connection the public_id of the Connection it was made through, user the public_id of its User, "+
		"reason removed when the User or an Admin unlinked it, replaced when a new link of the User in the same "+
		"identity space took its place, or user_deleted when its User was deleted.",
	"messenger", "connection", "user", "reason")

AccountLinkUnlinked is logged when an Account link was removed (C-18.FR-4, FR-6, C-03.FR-13).

View Source
var ActiveKeyNotHeld = newEvent("active_key_not_held", LevelError, "C-02",
	"The active master key is not in this replica's MUSTER_SECRET_KEYS, which happens when a key was activated while "+
		"this replica's record had expired. The replica stops; add the key to its environment.",
	"active_key_id", "key_ids", "error")

ActiveKeyNotHeld is logged when a running replica sees an active key it does not hold; the replica stops.

View Source
var AlertContinued = newEvent("alert_continued", LevelInfo, "C-09",
	"An Alert firing in an Alert Group got a new startsAt without being resolved in between (a Continuation, never "+
		"a new firing): group is the #N of its Alert Group and fingerprint the Alert's.",
	"group", "fingerprint")

AlertContinued is logged for each Continuation of an Alert that fires in an Alert Group.

View Source
var AlertGroupStatusChanged = newEvent("alert_group_status_changed", LevelInfo, "C-09",
	"An Alert Group changed status: group is its #N, route the public_id of its Route, from and to the statuses "+
		"(from is empty for a new Alert Group), reason the reason of an automatic change and transport how the "+
		"change reached Muster.",
	"group", "route", "from", "to", "reason", "transport")

AlertGroupStatusChanged is logged when an Alert Group changed status, by a system transition or a Command.

View Source
var AlertGroupsPurged = newEvent("alert_groups_purged", LevelInfo, "C-09",
	"The Alert Group retention of the Leader deleted, in batches, the Alerts inside Alert Groups that ended "+
		"retention.alert_details ago (details, the rows deleted) and the summary rows of Alert Groups resolved "+
		"retention.alert_group_summaries ago, with their Notes (summaries, the Alert Groups deleted).",
	"details", "summaries")

AlertGroupsPurged is logged when the Alert Group retention of the Leader deleted details or summary rows.

View Source
var AlertsStale = newEvent("alerts_stale", LevelInfo, "C-06",
	"The Stale scan resolved Alerts of an Integration with a live Heartbeat as Stale, because Alertmanager had not "+
		"listed them for stale_after of live time in any Alertmanager group: integration is the public_id of the "+
		"Integration and count how many Alerts resolved.",
	"integration", "count")

AlertsStale is logged when the Stale scan resolved Alerts of an Integration as Stale; a scan that resolves nothing logs nothing.

View Source
var AuditEntry = newEvent("audit_entry", LevelInfo, "C-03",
	"An Audit log entry, as written to audit_log: the actor (its kind, the public_id of the user or Service account, "+
		"or the --actor name of a CLI command), the token used, the Transport, the action <resource>.<verb>, the "+
		"resource, the before/after diff of what was configured (a Secret shows only that it changed) and details.",
	"entry", "at", "actor_kind", "actor", "actor_name", "token_name", "transport", "action", "resource_type",
	"resource", "resource_name", "source_address", "diff", "details")

AuditEntry is the copy of every Audit log entry on stdout.

View Source
var BootstrapAdminIgnored = newEvent("bootstrap_admin_ignored", LevelWarn, "C-03",
	"The bootstrap Admin variables are set, but the Organization already has an Admin, so they were ignored and no "+
		"user was created; remove them from the environment.",
	"variables")

BootstrapAdminIgnored is logged at startup when the bootstrap variables are set but the Organization has an Admin.

View Source
var BootstrapAdminMissing = newEvent("bootstrap_admin_missing", LevelWarn, "C-03",
	"The Organization has no Admin and the bootstrap variables are not set, so nobody can sign in to administer "+
		"Muster: set MUSTER_BOOTSTRAP_ADMIN_EMAIL and MUSTER_BOOTSTRAP_ADMIN_PASSWORD (or _FILE) and restart, or run "+
		"muster admin reset-password.")

BootstrapAdminMissing is logged at startup when the Organization has no Admin and no bootstrap variables.

View Source
var BridgeEventFailed = newEvent("bridge_event_failed", LevelWarn, "C-22",
	"The handling of a Bridge event failed — the read of a pushed event's Connection or of its secrets, its "+
		"claim, the read of the message it names or of the Account link, or the deleted Root message flow — so its "+
		"id was not recorded as handled: connection is the public_id of the Connection, event_id the event's id, "+
		"type its type and error what failed; a failed read of the Connection comes before the event is "+
		"authenticated, so its line has neither event_id nor type. In poll mode the cursor stays and the batch is "+
		"polled again; in push mode the answer is 500 and the bridge sends the event again. Lines that keep coming "+
		"for one event mean that the database refuses it.",
	"connection", "event_id", "type", "error")

BridgeEventFailed is logged when the handling of a Bridge event failed and its id was not recorded (C-22.FR-11, FR-24).

View Source
var BridgeEventRejected = newEvent("bridge_event_rejected", LevelInfo, "C-22",
	"A Bridge event was refused and changed nothing: connection is the public_id the request named, empty when it is "+
		"not a well-formed public_id, and reason why — unknown_connection (no Bridge Connection with this id, or a "+
		"deleted one), poll_mode (the Connection receives its events by polling), signature (a webhook header is "+
		"missing or no signature matches the push secret), timestamp (webhook-timestamp is further than "+
		"bridge.push_tolerance from Muster's real clock), each answered 401; not_an_event (the body is no event of "+
		"the Bridge protocol), id_mismatch (the event's id is not webhook-id) or too_large, each answered 400. A "+
		"polled event that is no event is skipped with not_an_event, and the batch goes on. Never carries the "+
		"signature, the push secret, the headers or the body.",
	"connection", "reason")

BridgeEventRejected is logged when Muster refused a pushed Bridge event, or skipped a polled one that is no event (C-22.FR-11, FR-24).

View Source
var BridgeInfoRead = newEvent("bridge_info_read", LevelInfo, "C-22",
	"Muster read the info of a Bridge Connection, on a Connection check or because its copy was older than "+
		"bridge.info_max_age: connection is the public_id of the Connection, protocol_version the version the bridge "+
		"speaks, features the names of the optional features it declares.",
	"connection", "protocol_version", "features")

BridgeInfoRead is logged when Muster read the info of a Bridge Connection (C-22.FR-2, FR-24).

View Source
var BridgePollFailed = newEvent("bridge_poll_failed", LevelWarn, "C-22",
	"A call of pollEvents of a Bridge Connection failed after the retries of the background client class, the "+
		"cursor after a batch could not be stored, or the Connection's client could not be built: connection is "+
		"the public_id of the Connection, failures how many calls in a row failed — for a client that cannot be "+
		"built, how many reads of the Connections in a row found it so, counted for each version of the "+
		"Connection, which is not polled meanwhile — and error what failed, masked of the token and the push "+
		"secret. Logged at the first failure and every tenth; the poller backs off from 1 s to 1 min per call and "+
		"polls again from the stored cursor. A failed poll makes no Destination Broken.",
	"connection", "failures", "error")

BridgePollFailed is logged when a poll of the events of a Bridge Connection failed (C-22.FR-11, FR-24).

View Source
var BridgePress = newEvent("bridge_press", LevelInfo, "C-22",
	"A press event of a Bridge Connection — a button press the bridge had already confirmed to its messenger — was "+
		"handled, once its id was recorded: connection is the public_id of the Connection, external_id the "+
		"messenger account that pressed; group the public_id of the Alert Group and command the Command, once the "+
		"button data is verified against the pressed message; outcome done or unchanged for a Command that ran, "+
		"which is not answered; refused, forbidden, not_linked, disabled or not_verified for a press that changed "+
		"nothing; expired for a press on a Reminder whose button was signed by a key that is no longer in the "+
		"Keyring; test for a press of a test message; unknown_message for a press on a message Muster did not post "+
		"through the Connection, which is not answered; failed when the Command failed. Every outcome but done, "+
		"unchanged and unknown_message is answered through answerEvent; error, when present, says why the press "+
		"failed or why its answer was not made — no limiter token within the interactive budget, or the bridge "+
		"refusing it — masked of the token. An answer that failed is not sent again.",
	"connection", "group", "command", "outcome", "external_id", "error")

BridgePress is logged for each press event of a Bridge Connection that was not dropped (C-22.FR-12, FR-13, FR-24).

View Source
var BridgePressDropped = newEvent("bridge_press_dropped", LevelInfo, "C-22",
	"A press event of a Bridge Connection arrived more than bridge.event_max_age after its occurred_at, by Muster's "+
		"real clock, and was dropped without an answer: acting on it now could undo what people did since. "+
		"connection is the public_id of the Connection, external_id the messenger account that pressed and "+
		"age_seconds how old the press was. Nothing changed; the person can press again.",
	"connection", "external_id", "age_seconds")

BridgePressDropped is logged when a press event of a Bridge Connection was dropped as too old (C-22.FR-12).

View Source
var BridgeRepublishedPastEditWindow = newEvent("bridge_republished_past_edit_window", LevelInfo, "C-22",
	"The status of an Alert Group changed while its Bridge Root message was past the bridge's edit window, so Muster "+
		"posted a new Root message Quietly and replied under the old one with a link to it: destination is the "+
		"public_id of the Destination, group the public_id of the Alert Group, old_message_id and new_message_id the "+
		"bridge's ids of the old and the new Root message. Later Thread replies go under the new one; the old one keeps "+
		"working. Logged once the republication was recorded.",
	"destination", "group", "old_message_id", "new_message_id")

BridgeRepublishedPastEditWindow is logged when a Bridge Root message past its edit window was published again (C-22.FR-9, FR-24).

View Source
var BridgeTextCommand = newEvent("bridge_text_command", LevelInfo, "C-22",
	"A thread_message event of a Bridge Connection was a Text command — one of the words of bridge.text_commands — "+
		"and was handled once its id was recorded: connection is the public_id of the Connection, external_id the "+
		"messenger account that wrote it, group the public_id of the Alert Group of the message whose Thread it is "+
		"in, command the Command; outcome done or unchanged for a Command that ran, answered \"Done: {command} #N\"; "+
		"refused, forbidden, not_linked, disabled or unknown_duration — a Snooze duration or preset the Route does not "+
		"offer — for a Text command that changed nothing; unknown_message for one in the Thread of a message "+
		"Muster did not post through the Connection, which is not answered; dropped for one older than "+
		"bridge.event_max_age, which is not answered; failed when the Command failed. error, when present, says "+
		"why the Command failed or why its answer was not made, masked of the token. Any other text in a Thread is "+
		"neither answered nor logged.",
	"connection", "group", "command", "outcome", "external_id", "error")

BridgeTextCommand is logged for each Text command in a Thread of a Bridge Connection (C-22.FR-14, FR-24).

View Source
var ClockSkew = newEvent("clock_skew", LevelWarn, "C-02",
	"This replica's clock differs from the database clock by more than process.clock_skew_warning; skew_seconds is "+
		"positive when the replica's clock is ahead. Synchronise the clocks with NTP.",
	"skew_seconds", "warning_seconds")

ClockSkew is logged when this replica's clock differs from the database clock by more than process.clock_skew_warning.

View Source
var CommandExecuted = newEvent("command_executed", LevelInfo, "C-10",
	"A Command ran on an Alert Group: command is its name, group the public_id of the Alert Group, actor the "+
		"public_id of the User or Service account, transport how it reached Muster and outcome done, or unchanged "+
		"for an idempotent repeat such as Acknowledge by the current Owner.",
	"command", "group", "actor", "transport", "outcome")

CommandExecuted is logged when a Command ran on an Alert Group.

View Source
var CommandRefused = newEvent("command_refused", LevelInfo, "C-10",
	"A Command was refused and changed nothing: command is its name, group the public_id of the Alert Group (empty "+
		"for a bulk command refused as a whole), actor the public_id of the User or Service account, transport how "+
		"it reached Muster and code forbidden for a missing Permission or the code of the command-refused problem.",
	"command", "group", "actor", "transport", "code")

CommandRefused is logged when a Command was refused; a refusal writes nothing else.

View Source
var DatabaseConnectionSecurity = newEventAt([]Level{LevelInfo, LevelWarn}, "database_connection_security", "C-02",
	"Whether a database connection (main or session) is encrypted, with the sslmode in effect; WARN when it is not "+
		"encrypted, which prefer allows without an error.",
	"connection", "sslmode", "encrypted")

DatabaseConnectionSecurity reports whether a database connection is encrypted, at WARN when it is not.

View Source
var DatabaseSettingsConflict = newEvent("database_settings_conflict", LevelWarn, "C-02",
	"A database connection is set both as a URL and as fields: the URL is used and the fields are ignored.",
	"used", "ignored")

DatabaseSettingsConflict is logged when a connection is configured both as a URL and as fields.

View Source
var DeliveryAttempt = newEvent("delivery_attempt", LevelInfo, "C-11",
	"The delivery worker called a Destination: destination is its public_id, group the #N of the Alert Group, empty "+
		"for a Storm summary, kind what it sent (publication, update, thread_reply, storm_summary for any call of a "+
		"Storm summary, final_edit for the last edit of a Root message in a Destination it left, or webhook_event for "+
		"an event of an outgoing webhook in the events mode), outcome delivered or the error class of the answer, code "+
		"the HTTP status of an answer that was not delivered, or the error_code a Telegram answer reports, 0 when it "+
		"was delivered or the outcome carries no status, reason the masked error the messenger answered or the call "+
		"failed with, empty when it was delivered, attempt the number of this attempt, duration_ms how long the call "+
		"took and retry_after_ms the wait a RetryAfter asked for, 0 otherwise.",
	"destination", "group", "kind", "outcome", "code", "reason", "attempt", "duration_ms", "retry_after_ms")

DeliveryAttempt is logged for every call of the delivery worker to a Destination (C-11.FR-17).

View Source
var DeliveryNotDelivered = newEvent("delivery_not_delivered", LevelWarn, "C-11",
	"A delivery ended as Not delivered after an answer the adapter could not classify, because no adapter serves "+
		"the Destination type, or because the Connection of its deleted Destination was deleted: destination is the "+
		"public_id of the Destination, group the public_id of the Alert Group, empty for a Storm summary, kind what "+
		"was sent (publication, update, thread_reply, storm_summary or final_edit) and error_class unknown. The next "+
		"change of the Alert Group starts a new delivery.",
	"destination", "group", "kind", "error_class")

DeliveryNotDelivered is logged when a delivery or a Thread reply ends as Not delivered (C-11.FR-10).

View Source
var DeliveryPossibleDuplicate = newEvent("delivery_possible_duplicate", LevelWarn, "C-11",
	"A Publication started again after an earlier start whose outcome was never recorded, such as after a crash, "+
		"or, for a bridge, after a request that got no answer, and the bridge did not replay it: destination is the "+
		"public_id of the Destination and group the public_id of the Alert Group. The messenger may show the Root "+
		"message twice.",
	"destination", "group")

DeliveryPossibleDuplicate is logged when a Publication starts again after an earlier start that was never recorded (C-11.FR-12), or, for a bridge, when such a retry was not replayed (C-22.FR-6).

View Source
var DeliveryWorkFailed = newEvent("delivery_work_failed", LevelWarn, "C-11",
	"The delivery worker could not attempt a delivery or a Thread reply, or probe a Broken Destination (work is "+
		"delivery, thread_reply or probe), or mark the first Publication of an Alert Group once its outcome "+
		"committed (work is mark_published), because of error, such as a lost database connection. Any replica "+
		"attempts it again once its lease runs out, or at the next probe; a first Publication is marked again by "+
		"the next delivered call or event of the Alert Group.",
	"work", "error")

DeliveryWorkFailed is logged when the delivery worker could not attempt a delivery or a Thread reply, or probe a Broken Destination.

View Source
var DestinationBroken = newEvent("destination_broken", LevelWarn, "C-11",
	"A Destination became Broken: destination is its public_id, cause fatal after a Fatal error or unavailable after "+
		"the Transient budget ran out, and reason the masked error the messenger answered. Its deliveries wait, "+
		"MusterDestinationBroken fires and a probe runs every delivery.broken_probe_interval.",
	"destination", "cause", "reason")

DestinationBroken is logged when a Destination becomes Broken (C-11.FR-9).

View Source
var DestinationRecovered = newEvent("destination_recovered", LevelInfo, "C-11",
	"A Broken Destination is healthy again after a successful probe or Destination check: destination is its "+
		"public_id and broken_for_s how long it was Broken, in seconds. Its deliveries resume with the current state.",
	"destination", "broken_for_s")

DestinationRecovered is logged when a Broken Destination becomes healthy again (C-11.FR-9, FR-19).

View Source
var DestinationTested = newEvent("destination_tested", LevelInfo, "C-16",
	"A person tested a Destination: destination is its public_id and steps each step of the test with its error "+
		"class, as name:class separated by commas, such as message:none,press:none; the class none is a step that "+
		"succeeded, limited one that found no limiter token in time and sent nothing. The Audit log entry "+
		"destination.tested records the same with the source.",
	"destination", "steps")

DestinationTested is logged after each Destination test (C-16.FR-5).

View Source
var DevClockLoadFailed = newEvent("dev_clock_load_failed", LevelWarn, "C-01",
	"Development mode only: the development clock could not be read after a change on another replica; this process "+
		"keeps its offset until the next change or the next LISTEN.",
	"error")

DevClockLoadFailed is logged when a process in development mode could not read the development clock after a change.

View Source
var DevClockLoaded = newEvent("dev_clock_loaded", LevelInfo, "C-01",
	"Development mode only: this process runs on the development clock, offset_seconds ahead of the system time, as "+
		"stored in the database for every replica; logged at start and after each advance.",
	"offset_seconds")

DevClockLoaded is logged when a process in development mode reads the development clock: at start and after each change on any replica.

View Source
var DowntimeRecorded = newEvent("downtime_recorded", LevelWarn, "C-02",
	"Muster was unavailable: no Leader wrote the alive mark and no replica refreshed its record for the period "+
		"between started_at and ended_at. The new Leader recorded it and opened the recovery window "+
		"(recovery.banner_duration).",
	"started_at", "ended_at", "duration_seconds")

DowntimeRecorded is logged when a new Leader finds that no replica was running for longer than leader.absence_notice and records the period.

View Source
var FallbackTemplateUsed = newEvent("fallback_template_used", LevelWarn, "C-12",
	"A template of a Route failed while rendering a message, so the message used the Fallback template — every label "+
		"under Muster's heading, footer and buttons: route is the public_id of the Route, group the public_id of the "+
		"Alert Group, template the kind of template and error what failed, with its line and column. The Route shows "+
		"a template error and MusterTemplateError fires until the template renders again. Logged once the change "+
		"committed.",
	"route", "group", "template", "error")

FallbackTemplateUsed is logged when a template of a Route failed while rendering a message and the Fallback template stood in for it (C-12.FR-6, ADR-0012).

View Source
var GroupKeyPreviewed = newEvent("group_key_previewed", LevelInfo, "C-08",
	"A Group key preview read the Stored Snapshots of a period: route is the public_id of the saved Route it "+
		"previewed, empty for a Route that is not saved yet, period_seconds the period, snapshots_read how many "+
		"distinct bodies it read, truncated whether routing.group_key_preview_max_alerts stopped it with Stored "+
		"Snapshots of the period, or Alerts the Route takes, left unread, and duration_ms how long it took.",
	"route", "period_seconds", "snapshots_read", "truncated", "duration_ms")

GroupKeyPreviewed is logged when a Group key preview was computed.

View Source
var HeartbeatLive = newEvent("heartbeat_live", LevelInfo, "C-07",
	"The Heartbeat of an Integration became live: integration is its public_id, and first is true for the first "+
		"signal after the Heartbeat was turned on and false for a signal that ended a loss, which resolves "+
		"MusterHeartbeatLost.",
	"integration", "first")

HeartbeatLive is logged when the Heartbeat of an Integration becomes live: its first signal, or the first after it was lost.

View Source
var HeartbeatLost = newEvent("heartbeat_lost", LevelWarn, "C-07",
	"No Heartbeat signal arrived for an Integration within its Heartbeat timeout, so it is Heartbeat lost and "+
		"MusterHeartbeatLost is raised: integration is its public_id and last_signal_at the time of its last signal.",
	"integration", "last_signal_at")

HeartbeatLost is logged when the Leader's Heartbeat check finds that no signal arrived within the timeout.

View Source
var IngestFailed = newEvent("ingest_failed", LevelError, "C-05",
	"An ingestion or Heartbeat request answered 500 because the database could not look up the token, store the "+
		"Stored Snapshot or record the Heartbeat signal, usually because it was unavailable; Alertmanager retries "+
		"an ingestion request, and the next signal replaces a lost one. integration is the public_id of the token's "+
		"Integration, or unknown when the lookup failed; route_pattern is the route it came by.",
	"integration", "route_pattern", "error")

IngestFailed is logged when the ingestion endpoint could not read the token or store the body and answered 500.

View Source
var IngestRejected = newEvent("ingest_rejected", LevelInfo, "C-05",
	"An ingestion or Heartbeat request was refused: outcome unauthorized (401, a missing, wrong or revoked token, an "+
		"API token, or one of a deleted Integration) or too_large (413, a body above ingest.body_limit). integration "+
		"is the public_id of the token's Integration, or unknown; route_pattern is the route it came by — never the "+
		"path, which may carry the token — and client_address the sender. Refused ingestion requests are also "+
		"counted in muster_ingest_requests_total, which the chart rule MusterIngestRejected reports.",
	"integration", "outcome", "route_pattern", "client_address")

IngestRejected is logged when the ingestion endpoint refused a request: 401 or 413.

View Source
var IngestReplayed = newEvent("ingest_replayed", LevelInfo, "C-06",
	"muster ingest replay set the Stored Snapshots received within the period back to pending, for processing again: "+
		"actor is the --actor name, since the period as given, integration the public_id of the Integration it was "+
		"limited to, empty for all, and count how many Stored Snapshots it set back.",
	"actor", "since", "integration", "count")

IngestReplayed is logged when muster ingest replay set Stored Snapshots back to pending.

View Source
var InternalAlertRaised = newEvent("internal_alert_raised", LevelInfo, "C-06",
	"An Internal alert fired as an Alert of the built-in Muster Integration: alertname names it, fingerprint is the "+
		"Alert's, and entity the public_id of the Integration, Route or Destination it is about, empty when it is "+
		"about none.",
	"alertname", "fingerprint", "entity")

InternalAlertRaised is logged when processing fires an Internal alert of the built-in Integration.

View Source
var InternalAlertResolved = newEvent("internal_alert_resolved", LevelInfo, "C-06",
	"An Internal alert resolved because its condition cleared or its entity was deleted: alertname names it, "+
		"fingerprint is the Alert's, and entity the public_id of the Integration, Route or Destination it is about, "+
		"empty when it is about none.",
	"alertname", "fingerprint", "entity")

InternalAlertResolved is logged when processing resolves an Internal alert of the built-in Integration.

View Source
var KeyActivated = newEvent("key_activated", LevelWarn, "C-20",
	"muster secrets rotate-key activated a master key: every Secret and the key canary are now encrypted with it, the "+
		"replicas switch to it and the Leader re-signs the buttons of the open Root messages. The old key stays in "+
		"MUSTER_SECRET_KEYS until the Keyring shows it as removable.",
	"from", "to", "actor")

KeyActivated is logged once `muster secrets rotate-key` committed the activation of a master key.

View Source
var KeyCanaryFailed = newEvent("key_canary_failed", LevelError, "C-02",
	"The master keys cannot decrypt the key canary: the active key is missing from MUSTER_SECRET_KEYS, or the keys "+
		"belong to another database. The replica stops; set the keys this database was written with.",
	"active_key_id", "key_ids", "error")

KeyCanaryFailed is logged when the Keyring cannot decrypt the key canary; the replica stops.

View Source
var KeySwitched = newEvent("key_switched", LevelInfo, "C-20",
	"This replica switched to the active master key without a restart, after muster secrets rotate-key activated it: "+
		"it now encrypts and signs with that key.",
	"active")

KeySwitched is logged by each replica that switched to a newly activated master key without a restart.

View Source
var KeyringLoaded = newEvent("keyring_loaded", LevelInfo, "C-02",
	"The master keys of MUSTER_SECRET_KEYS were loaded and decrypt the key canary; the ids are derived from the keys "+
		"and never reveal them.",
	"key_ids", "active_key_id")

KeyringLoaded is logged once the key canary decrypts, with the ids of the keys held and of the active key.

View Source
var LeaderTaskFailed = newEvent("leader_task_failed", LevelWarn, "C-02",
	"A run of a Leader task failed, usually because the database was unavailable; it runs again at its next "+
		"interval.",
	"task", "error")

LeaderTaskFailed is logged when a run of a Leader task failed; the task runs again at its next interval.

View Source
var LeadershipAcquired = newEvent("leadership_acquired", LevelInfo, "C-02",
	"This replica took the Leader lock and runs the Leader tasks: partition maintenance, the alive mark, the "+
		"pruning of replica records and the pruning of short-lived state.",
	"replica")

LeadershipAcquired is logged when this replica takes the Leader lock and starts the Leader tasks.

View Source
var LeadershipLost = newEvent("leadership_lost", LevelWarn, "C-02",
	"The Leader could not confirm its lock within leader.fencing_timeout, or its lock session failed: it stopped "+
		"every Leader task, closed the lock connection and competes for the lock again.",
	"replica", "error")

LeadershipLost is logged when the Leader stops leading because its lock session failed or went silent.

View Source
var LibraryMessage = newEvent("library_message", LevelWarn, "C-02",
	"A third-party library wrote a line of its own, such as a failed read of the process metrics.",
	"message")

LibraryMessage is a line a third-party library wrote to the standard library logger, once CaptureStdlib redirected it into the domain logger.

View Source
var LinkRuleFailed = newEvent("link_rule_failed", LevelWarn, "C-12",
	"The URL template of a Link rule failed while computing the links of an Alert Group, so the rule's link is left "+
		"out and muster_template_errors_total{template=\"link_rule\"} grows: link_rule is the public_id of the Link "+
		"rule, route the public_id of the Alert Group's Route, group the public_id of the Alert Group and error what "+
		"failed, with its line and column. Logged once per rule and Alert Group on each replica; the counter grows "+
		"at every failure.",
	"link_rule", "route", "group", "error")

LinkRuleFailed is logged when the URL template of a Link rule failed while computing the links of an Alert Group (C-12.FR-6, FR-9).

View Source
var ListenerFailed = newEvent("listener_failed", LevelError, "C-02",
	"A listener stopped serving with an error; the process stops so that it is restarted.",
	"listener", "error")

ListenerFailed is logged when a listener stops serving while the process runs; the process then stops.

View Source
var ListenersStarted = newEvent("listeners_started", LevelInfo, "C-02",
	"The listeners serve and the process is ready; app and ingest are the same address when one port serves both.",
	"app", "ingest", "internal")

ListenersStarted is logged once the server serves, with the address of each listener.

View Source
var LiveUpdatesListenFailed = newEvent("live_updates_listen_failed", LevelWarn, "C-03",
	"A replica lost the session connection that listens for live-update hints, or could not open it, usually because "+
		"the database was unavailable; it connects again with a growing delay, up to 30 seconds. Until then the "+
		"browsers connected to it miss the hints of changes and see them at their next read.",
	"error")

LiveUpdatesListenFailed is logged when a replica loses, or cannot open, the LISTEN connection of the live-update hints.

View Source
var LiveUpdatesListenRestored = newEvent("live_updates_listen_restored", LevelInfo, "C-03",
	"A replica listens for live-update hints again after live_updates_listen_failed; it sent every connected browser "+
		"the hints of everything, so that they read it again.")

LiveUpdatesListenRestored is logged when a replica listens for live-update hints again after a loss.

View Source
var MattermostPress = newEvent("mattermost_press", LevelInfo, "C-13",
	"The callback of a Mattermost Connection received a button press and answered 200 with a JSON object, never "+
		"with update: connection is the public_id of the Connection, empty when it does not exist; group the "+
		"public_id of the Alert Group and command the Command, once the signed action id is verified; outcome done or "+
		"unchanged for a Command that ran; refused, forbidden, not_linked, disabled or not_verified for a press that "+
		"changed nothing and was answered, a not_verified one only on a post delivered to a Destination of the "+
		"Connection in the channel of the press; expired for a press on a Reminder whose button was signed by a key "+
		"that is no longer in the Keyring, answered that the button has expired; test for a press of a test message "+
		"by a person, answered that nothing changed, and test_press for the bot's own press of it during a "+
		"Destination test, answered with nothing; invalid_request for a body that is not a press, unknown_connection, "+
		"or failed, answered once the press is bound to its post; answer how the person was answered: ephemeral_post "+
		"for an ephemeral post in the channel, or in the Thread of the Root message for a press on a Reminder, "+
		"ephemeral_text for the text in the callback's answer, shown in the "+
		"Thread, when that post was not made, absent when nothing was answered; error why the press failed or why "+
		"its ephemeral post was not sent, masked of secrets, never the 403 of a bot without the permission to make "+
		"ephemeral posts.",
	"connection", "group", "command", "outcome", "answer", "error")

MattermostPress is logged for each request to the callback of Mattermost button presses (C-13.FR-4).

View Source
var MigrationsApplied = newEvent("migrations_applied", LevelInfo, "C-02",
	"Migrations were applied under the migration lock, from one schema version to another.",
	"from", "to")

MigrationsApplied is logged when muster migrate or the start-up migration applied migrations.

View Source
var MigrationsCurrent = newEvent("migrations_current", LevelInfo, "C-02",
	"No migration was applied: the schema already has the newest version this binary knows.",
	"version")

MigrationsCurrent is logged when the schema already has the newest version the binary knows.

View Source
var OIDCCheckFailed = newEvent("oidc_check_failed", LevelWarn, "C-03",
	"A background re-check of an OIDC user at the identity provider found it unavailable — unreachable, a timeout, "+
		"408, 429 or 5xx, or the 10-second budget of the refresh spent — or could not run. Nothing changes for the "+
		"user: sessions and Personal access tokens keep working, and the next attempt comes one "+
		"auth.oidc_recheck_interval later, so an incident at the identity provider never signs everybody out. user is "+
		"the public_id of the user, empty when a round of the worker failed; reason names the step; the error is "+
		"masked and carries no token or secret.",
	"user", "reason", "error")

OIDCCheckFailed is logged when a background re-check of an OIDC user could not reach a decision.

View Source
var OIDCSecretExpiring = newEvent("oidc_secret_expiring", LevelWarn, "C-19",
	"The OIDC client secret expires within oidc.secret_expiry_lead, so MusterOIDCSecretExpiring is raised: "+
		"expires_on is the expiry date entered in the OIDC settings. Logged once per raise.",
	"expires_on")

OIDCSecretExpiring is logged when the Leader raises MusterOIDCSecretExpiring (C-19.FR-5).

View Source
var OIDCSignInFailed = newEvent("oidc_sign_in_failed", LevelWarn, "C-03",
	"An OIDC sign-in ended at the sign-in page, or the linking of an OIDC identity at the profile page, with "+
		"idp_error: the identity provider reported an error, could not be reached through the back channel or its "+
		"proxy, or answered with an ID token that did not verify. The reason names the step, prefixed with link for a "+
		"link; the error is masked and carries no token or secret.",
	"reason", "error")

OIDCSignInFailed is logged when an OIDC sign-in or link ends with idp_error: the identity provider or the way to it failed, or its answer did not verify.

View Source
var OrganizationCreated = newEvent("organization_created", LevelInfo, "C-02",
	"The first start created the Organization with the defaults of its settings and its outbound address policy.",
	"organization")

OrganizationCreated is logged when the first start creates the Organization with its defaults.

View Source
var OrganizationUpdated = newEvent("organization_updated", LevelInfo, "C-20",
	"The Organization's settings changed; fields lists the JSON pointers of the changed fields, and the Audit log "+
		"entry organization.updated has the values before and after (a Secret only as changed).",
	"fields")

OrganizationUpdated is logged when the Organization's settings changed.

View Source
var OutboundBlocked = newEvent("outbound_blocked", LevelWarn, "C-02",
	"The outbound address policy refused a request, which fails without retry; rule names the rule and the address "+
		"or proxy it refused. Correct the configured address, or change the policy and its allowed networks.",
	"client", "rule", "scheme", "host")

OutboundBlocked is logged when the outbound address policy refused a request.

View Source
var OutboundPolicyUpdated = newEvent("outbound_policy_updated", LevelInfo, "C-20",
	"The outbound address policy changed: every replica drops its cached policy and closes its idle outbound "+
		"connections at once, so the next request is checked against the new policy. The Audit log entry "+
		"outbound_policy.updated has the values before and after.")

OutboundPolicyUpdated is logged when the outbound address policy changed.

View Source
var OutboundUnverifiedAddress = newEvent("outbound_unverified_address", LevelInfo, "C-02",
	"A request went through the client's proxy to a host name that Muster cannot resolve itself, so only the name "+
		"was checked against the allowed and denied lists, not its addresses.",
	"client", "scheme", "host")

OutboundUnverifiedAddress is logged when a request through a proxy was sent with only its host name checked.

View Source
var OutgoingHeartbeatFailed = newEvent("outgoing_heartbeat_failed", LevelWarn, "C-19",
	"A send of the outgoing heartbeat to the dead man's switch failed and is not retried; the next interval sends "+
		"again. error says what failed, without the URL. Logged at every failed send.",
	"error")

OutgoingHeartbeatFailed is logged when a send of the outgoing heartbeat failed (C-19.FR-7).

View Source
var OutgoingHeartbeatRecovered = newEvent("outgoing_heartbeat_recovered", LevelInfo, "C-19",
	"A send of the outgoing heartbeat succeeded after a failed one.")

OutgoingHeartbeatRecovered is logged when the outgoing heartbeat succeeded after a failed send (C-19.FR-7).

View Source
var PartitionMaintenanceFailed = newEvent("partition_maintenance_failed", LevelWarn, "C-02",
	"Partition maintenance failed, for example because a lock was not granted within 2 seconds; the Leader retries "+
		"at the next hourly run. A partition that is still missing when its day or month begins makes writes to its "+
		"table fail.",
	"error")

PartitionMaintenanceFailed is logged when partition maintenance failed; it is retried at the next run.

View Source
var PartitionsMaintained = newEvent("partitions_maintained", LevelInfo, "C-02",
	"Partition maintenance created the partitions Muster will need (daily for Stored Snapshots and their bodies, "+
		"monthly for Timeline entries, delivery events and the Audit log) or dropped partitions whose whole range is "+
		"older than their retention period; the fields list the partitions by name.",
	"created", "dropped")

PartitionsMaintained is logged when partition maintenance created or dropped partitions.

View Source
var ProcessStarted = newEvent("process_started", LevelInfo, "C-02",
	"The server process started, with the version and commit of the binary.",
	"version", "commit")

ProcessStarted is the first line of every run of the server.

View Source
var ProcessStopped = newEvent("process_stopped", LevelInfo, "C-02",
	"The server process stopped after a graceful shutdown.")

ProcessStopped is the last line of a run of the server that ended without an error.

View Source
var PublicURLInsecure = newEvent("public_url_insecure", LevelWarn, "C-03",
	"MUSTER_PUBLIC_URL is a plain http:// address on a host other than localhost, a name under .localhost, "+
		"127.0.0.0/8 or ::1. The session cookie is Secure, so browsers drop it there and every sign-in returns to the "+
		"sign-in page. Serve Muster over HTTPS through a reverse proxy or an Ingress, or open it through an SSH tunnel "+
		"to localhost (ssh -L 8080:localhost:8080 to the host, then http://localhost:8080), and set MUSTER_PUBLIC_URL "+
		"to that https:// or http://localhost:port address so that the warning stops. host is the host and port of "+
		"MUSTER_PUBLIC_URL.",
	"host")

PublicURLInsecure is logged at the start of the server when browsers would drop the Secure session cookie on MUSTER_PUBLIC_URL: http on a host that is not a loopback host.

View Source
var ReminderSkipped = newEvent("reminder_skipped", LevelInfo, "C-17",
	"A Reminder came due and was dropped with its timer: group is the public_id of the Alert Group and reason "+
		"not_acknowledged when it is no longer acknowledged or policy_off when its Route's Reminders are off.",
	"group", "reason")

ReminderSkipped is logged when a Reminder came due on an Alert Group that no longer wants it (C-17.FR-4).

View Source
var ReplicaRecordFailed = newEvent("replica_record_failed", LevelWarn, "C-02",
	"A replica could not refresh its record of the keys it holds, usually because the database is unavailable; it "+
		"retries at the next refresh and stops counting as live once the record is older than replica.live_expiry. "+
		"At shutdown, the record could not be deleted; it stops counting as live after replica.live_expiry.",
	"replica", "error")

ReplicaRecordFailed is logged when a replica cannot refresh or, at shutdown, delete its key record.

View Source
var ReplicasPruned = newEvent("replicas_pruned", LevelInfo, "C-02",
	"The Leader removed the records of replicas that had not refreshed them for replica.prune_after.",
	"replicas")

ReplicasPruned is logged when the Leader removed the records of replicas gone for longer than replica.prune_after.

View Source
var RequestLogPruned = newEvent("request_log_pruned", LevelInfo, "C-23",
	"The Leader task request_log_pruning deleted, in batches, records of the Request log older than "+
		"request_log.max_age or past the newest request_log.max_records of their Connection, of their outgoing "+
		"webhook Destination or of the records without an owner: rows is how many it deleted in one run. Not "+
		"logged when a run deleted nothing.",
	"rows")

RequestLogPruned is logged when the Leader task request_log_pruning deleted records of the Request log (C-23.FR-4, FR-7).

View Source
var RequestLogWriteFailed = newEvent("request_log_write_failed", LevelWarn, "C-23",
	"A record of the Request log could not be written — the database refused it, or its write ran past its 2 s "+
		"timeout — and was dropped; the request it records went on unchanged. direction and operation are the "+
		"record's, owner the public_id of its Connection or outgoing webhook Destination, empty without one, and "+
		"error the database error. The headers and bodies of the record are never logged; "+
		"muster_request_log_write_failures_total counts the dropped records.",
	"direction", "operation", "owner", "error")

RequestLogWriteFailed is logged when a record of the Request log could not be written (C-23.FR-4, FR-7).

View Source
var SchemaDirty = newEvent("schema_dirty", LevelError, "C-02",
	"A migration failed halfway and the schema is marked dirty at its version: repair the schema from a backup or "+
		"by hand, then clear the dirty flag in schema_migrations.",
	"database_version")

SchemaDirty is logged when a migration failed halfway and left the schema dirty; the process refuses to run.

View Source
var SchemaTooNew = newEvent("schema_too_new", LevelError, "C-02",
	"The database schema is newer than this binary knows, after an upgrade was rolled back: run a release that "+
		"knows the schema version.",
	"database_version", "known_version")

SchemaTooNew is logged when the database schema is newer than the binary knows; the process refuses to run.

View Source
var SchemaTooOld = newEvent("schema_too_old", LevelError, "C-02",
	"The database schema is older than this binary needs: run muster migrate or set MUSTER_MIGRATE_ON_START.",
	"database_version", "known_version")

SchemaTooOld is logged when the server starts on a schema older than the binary needs, without migrating.

View Source
var ShortLivedPruned = newEvent("short_lived_pruned", LevelInfo, "C-02",
	"The hourly short-lived pruning of the Leader deleted, in batches, rows of a short-lived table that can no "+
		"longer be used, such as sessions that ended or expired auth.session_prune_after ago, sign-in throttles "+
		"without a failure for auth.signin_throttle_prune_after, password setup links that expired "+
		"auth.password_setup_prune_after ago and Account link requests that expired "+
		"account_link.request_prune_after ago; rows is how many it deleted from the table.",
	"table", "rows")

ShortLivedPruned is logged when the short-lived pruning Leader task deleted expired rows from a table.

View Source
var ShutdownGraceExceeded = newEvent("shutdown_grace_exceeded", LevelWarn, "C-02",
	"Requests were still running when the shutdown grace period ended; their connections were closed.",
	"grace_seconds")

ShutdownGraceExceeded is logged when the listeners did not drain within the grace period and were closed.

View Source
var ShutdownRequested = newEvent("shutdown_requested", LevelWarn, "C-02",
	"The server received SIGTERM or an interrupt: readiness answers 503, work in progress finishes and the listeners "+
		"drain within the grace period, in seconds.",
	"grace_seconds")

ShutdownRequested is logged when the server receives SIGTERM or an interrupt and starts its graceful shutdown.

View Source
var SlackPress = newEvent("slack_press", LevelInfo, "C-24",
	"A press of a Slack Connection was handled after Slack had its confirmation — the 200 of the callback in http "+
		"mode: connection is the public_id of the Connection; group the public_id of the Alert Group and command the "+
		"Command, once the signed action id is verified against the pressed message, the command alone for a test "+
		"message; outcome done or unchanged for a Command that ran, which is not answered but \"Still on it\", which "+
		"changes no message; refused, forbidden, not_linked, disabled or not_verified for a press that changed nothing "+
		"and was answered; expired for a press on a Reminder whose button was signed by a key that is no longer in the "+
		"Keyring, answered that the button has expired; test for a press of a test message, answered that nothing "+
		"changed; ignored for another kind of interaction, confirmed and not answered; failed when a read or the "+
		"Command failed, or when the Connection could not be read and the callback answered 500. answer is how the "+
		"person was answered: ephemeral for chat.postEphemeral in the channel of the press, in the Thread of the Root "+
		"message for a press on a Reminder, or response_url for the press's response_url when that failed; absent "+
		"when nothing was answered. error says why the press failed or why its answer was not made, with the tokens, "+
		"the Slack signing secret and the response_url masked; an answer that fails both ways is not made again.",
	"connection", "group", "command", "outcome", "answer", "error")

SlackPress is logged for each press of a Slack Connection that was confirmed (C-24.FR-10, FR-11, FR-17).

View Source
var SlackPressRejected = newEvent("slack_press_rejected", LevelWarn, "C-24",
	"A request to the callback of Slack presses in http mode was refused and changed nothing: connection is the "+
		"public_id of the Connection when it is known; reason why — bad_signature (X-Slack-Signature is missing or "+
		"is not the signature of the body under the Connection's Slack signing secret), stale "+
		"(X-Slack-Request-Timestamp is missing or further than slack.request_tolerance from Muster's real clock, "+
		"either way), unknown_connection (no Slack Connection with this id, or a deleted one) or wrong_mode (the "+
		"Connection receives its presses through Socket Mode), each answered 401 with the same body; no_payload "+
		"(the body has no payload that is a JSON object) or too_large (the body is over 1 MiB), each answered 400. "+
		"Lines that keep coming with bad_signature mean a wrong Slack signing secret or someone else's requests. "+
		"Never carries the signature, the Slack signing secret, the headers or the body.",
	"connection", "reason")

SlackPressRejected is logged when the callback of Slack presses refused a request (C-24.FR-9, AC-11).

View Source
var SlackSocketConnected = newEvent("slack_socket_connected", LevelInfo, "C-24",
	"The Leader's Socket Mode connection of a Slack Connection received its hello: connection is the public_id of the "+
		"Connection, num_connections the connections of the Slack app that Slack counts, this one included, and held "+
		"how many of them the Leader holds for the Connection — two while a planned refresh overlaps the next "+
		"connection with the old one. The count beyond held is stored on the Connection for its check and page, "+
		"and the line is written once it was; error, when present, says that it could not be stored within 5 s, "+
		"and the next hello stores it again. A hello whose count the next hello replaces before it is stored "+
		"has no line: only the next one is stored and logged; nor has a store that the Leader's stop cut "+
		"short.",
	"connection", "num_connections", "held", "error")

SlackSocketConnected is logged at each hello of a Slack Connection's Socket Mode connection (C-24.FR-9, FR-17).

View Source
var SlackSocketFailed = newEvent("slack_socket_failed", LevelWarn, "C-24",
	"A Socket Mode connection of a Slack Connection could not be opened or ended without a planned refresh: "+
		"connection is the public_id of the Connection; reason dial (apps.connections.open failed, the address it "+
		"answered is not Slack's, the WebSocket handshake failed or the Connection's client could not be built), "+
		"hello_timeout (no hello within slack.hello_timeout), link_disabled (Socket Mode was turned off in the app's "+
		"settings), too_many_websockets (the app already has ten connections) or closed (the connection ended, a ping "+
		"got no pong within 10 s or a confirmation could not be written); backoff_seconds the wait before the next "+
		"connection, from 1 s doubling with jitter up to 5 min (slack.socket_backoff), never shorter than the "+
		"Retry-After of a rate-limited apps.connections.open, up to that cap, and reset by a hello once its "+
		"connection has lasted 30 s, or by a planned refresh — absent when the Connection's client could not be "+
		"built; error what failed, with the tokens and the address's query, the ticket among it, masked, absent for "+
		"hello_timeout, link_disabled and too_many_websockets. It counts against nothing and makes no Destination "+
		"Broken; presses made until the next hello are lost.",
	"connection", "reason", "backoff_seconds", "error")

SlackSocketFailed is logged when a Socket Mode connection of a Slack Connection failed or was refused (C-24.FR-9).

View Source
var SlackSocketShared = newEvent("slack_socket_shared", LevelWarn, "C-24",
	"A hello of a Slack Connection's Socket Mode connection counted more connections of the Slack app than the Leader "+
		"holds: another program — usually another Connection or Muster installation on the same app — is connected "+
		"and takes some of its presses at random. connection is the public_id of the Connection and other_connections the "+
		"connections beyond the Leader's. Right after a Leader change Slack may still count the old Leader's "+
		"connection; a later hello clears the count. Use one Slack app for each Connection and share it with no other "+
		"Connection or installation.",
	"connection", "other_connections")

SlackSocketShared is logged when a hello counted connections of the Slack app beyond the Leader's (C-24.FR-2, FR-9).

View Source
var SnapshotAccepted = newEvent("snapshot_accepted", LevelInfo, "C-05",
	"An ingestion request was stored as a pending Stored Snapshot and answered 202: integration and stored_snapshot "+
		"are public_ids, size_bytes the size of the body, route_pattern the route it came by — never the path, which "+
		"may carry the token.",
	"integration", "stored_snapshot", "size_bytes", "route_pattern")

SnapshotAccepted is logged when the ingestion endpoint stored a webhook body as a Stored Snapshot and answered 202.

View Source
var SnapshotFailed = newEvent("snapshot_failed", LevelWarn, "C-06",
	"A Stored Snapshot could not be processed and was marked failed with the error: its body is not JSON, lacks the "+
		"fields of an Alertmanager webhook, or processing failed. It is not retried by itself, the Snapshots behind "+
		"it are processed, and muster ingest replay processes it again after a fix. integration and "+
		"stored_snapshot are public_ids.",
	"integration", "stored_snapshot", "error")

SnapshotFailed is logged when a Stored Snapshot could not be processed and was marked failed.

View Source
var SnapshotProcessed = newEvent("snapshot_processed", LevelInfo, "C-06",
	"A Stored Snapshot was processed: integration and stored_snapshot are public_ids, group_key the Alertmanager "+
		"group it came for, alerts how many Alerts it listed, fired, resolved, gone and continued how many new "+
		"firings, resolutions from Alertmanager or by the deletion of the Integration, Alerts resolved as Gone and "+
		"Continuations it made, dropped the "+
		"resolves of fingerprints that fire nowhere, truncated its truncatedAlerts, routes the public_ids of the "+
		"Routes that took its newly firing Alerts, alert_groups the #N of the Alert Groups it created or changed, "+
		"duration_ms how long processing took, and lane which of the Integration's processing.parallel_groups lanes "+
		"processed it, from 0.",
	"integration", "stored_snapshot", "group_key", "alerts", "fired", "resolved", "gone", "continued", "dropped",
	"truncated", "routes", "alert_groups", "duration_ms", "lane")

SnapshotProcessed is logged once for every Stored Snapshot that processing applied, never once per Alert.

View Source
var SnapshotProcessingInterrupted = newEvent("snapshot_processing_interrupted", LevelWarn, "C-06",
	"The processing worker stopped a round or an Integration because the database failed or the connection was "+
		"lost; the Stored Snapshots stay pending and are processed at the next attempt, after a growing pause. "+
		"integration is the public_id of the Integration, empty when the round failed.",
	"integration", "error")

SnapshotProcessingInterrupted is logged when the processing worker could not finish a round or an Integration because the database failed; the Stored Snapshot stays pending and is processed again.

View Source
var StartupFailed = newEvent("startup_failed", LevelError, "C-02",
	"Startup stopped: the database cannot be reached or fails a check, a migration failed, or a listener cannot "+
		"listen. The error says what to fix.",
	"error")

StartupFailed is logged when the server or a subcommand stops during startup, with the reason.

View Source
var StormEnded = newEvent("storm_ended", LevelInfo, "C-11",
	"A Storm ended after its Route stayed at or below route.storm_threshold for delivery.storm_calm_period: route is the "+
		"public_id of the Route, and alert_groups and urgent are the Storm's own counts at its end, as storm_started "+
		"has them at its start: the new Alert Groups it counted and how many of them were Urgent. The Storm summary "+
		"shows its final state and the Alert Groups still open are posted Quietly.",
	"route", "alert_groups", "urgent")

StormEnded is logged when a Storm ends after delivery.storm_calm_period below the threshold (C-11.FR-6).

View Source
var StormStarted = newEvent("storm_started", LevelInfo, "C-11",
	"The new Alert Groups of a Route exceeded route.storm_threshold within a minute and started a Storm: route is the "+
		"public_id of the Route, and alert_groups and urgent are the Storm's own counts at its start, as storm_ended "+
		"has them at its end: the new Alert Groups it counted, 1 (the one that started it), and how many of them were "+
		"Urgent, 1 or 0. Each Destination of the Route gets a Storm summary and only Urgent Alert Groups are posted "+
		"one by one until it calms down. Logged once the change that started it committed.",
	"route", "alert_groups", "urgent")

StormStarted is logged when a Route's new Alert Groups start a Storm (C-11.FR-6).

View Source
var SystemNoticesCheckFailed = newEvent("system_notices_check_failed", LevelWarn, "C-03",
	"A replica could not read the state of the Organization-wide notices, usually because the database was "+
		"unavailable, so the live-updates streams get no hint of a notice that started or ended; logged once until "+
		"a check succeeds again.",
	"error")

SystemNoticesCheckFailed is logged when a replica cannot read the state of the Organization-wide notices.

View Source
var TelegramPollConflict = newEvent("telegram_poll_conflict", LevelInfo, "C-14",
	"The long poll of a Telegram Connection was refused with 409 Conflict: another process polls the same bot, or a "+
		"webhook is set for it. The poller waits backoff_ms, with jitter, and polls again; it is not a delivery "+
		"outcome and makes nothing Broken. connection is the public_id of the Connection. Lines that keep coming mean "+
		"that a second installation polls the bot, or that its webhook was set elsewhere: the connection check shows it.",
	"connection", "backoff_ms")

TelegramPollConflict is logged when getUpdates of a Telegram Connection was refused with 409 (C-14.FR-1, F-018).

View Source
var TelegramPollFailed = newEvent("telegram_poll_failed", LevelWarn, "C-14",
	"A long poll of a Telegram Connection failed after the retries of the background client class, or an update it "+
		"brought could not be handed to the router: connection is the public_id of the Connection, error what failed, "+
		"with the bot token and the path prefix of the base URL masked. The poller backs off and polls again from the "+
		"stored offset.",
	"connection", "error")

TelegramPollFailed is logged when a long poll of a Telegram Connection failed other than with 409 (C-14.FR-1).

View Source
var TelegramPress = newEvent("telegram_press", LevelInfo, "C-14",
	"A callback_query of a Telegram Connection — a button press — was handled and answered with answerCallbackQuery "+
		"before the Root message was edited: connection is the public_id of the Connection; group the public_id of "+
		"the Alert Group and command the Command, once the button data is verified; outcome done or unchanged for a "+
		"Command that ran; refused, forbidden, not_linked, disabled or not_verified for a press that changed nothing; "+
		"expired for a press on a Reminder whose button was signed by a key that is no longer in the Keyring, "+
		"answered that the button has expired; test for a press of a test message, answered that nothing changed; "+
		"failed when a read or the Command failed. error, when present, says why the press failed or why its answer "+
		"was not made — no limiter token within the interactive budget, or Telegram refusing an answer that came too "+
		"late — masked of the bot token. The update is confirmed whatever the outcome, so that a press never runs "+
		"twice.",
	"connection", "group", "command", "outcome", "error")

TelegramPress is logged for each button press of a Telegram Connection that was not dropped (C-14.FR-4, FR-5).

View Source
var TelegramPressDropped = newEvent("telegram_press_dropped", LevelInfo, "C-14",
	"A button press of a Telegram Connection arrived after the Connection had received no updates for longer than "+
		"telegram.press_max_age — no successful long poll, or Muster not running — and was dropped without an answer: "+
		"Telegram kept it during the gap, and acting on it now could undo what people did since. connection is the "+
		"public_id of the Connection, gap_seconds the gap before the update that carried the press. Nothing changed; "+
		"the person can press again.",
	"connection", "gap_seconds")

TelegramPressDropped is logged when a Telegram button press was dropped as too old (C-14.FR-4, AC-4).

View Source
var TelegramUpdateDropped = newEvent("telegram_update_dropped", LevelInfo, "C-14",
	"An update of a Telegram Connection reached the update router, which has no handler for its kind and drops it: "+
		"connection is the public_id of the Connection, kind one of callback_query, chat_message, private_message, "+
		"my_chat_member or other. Private messages, such as /start, go to the handler of Account links.",
	"connection", "kind")

TelegramUpdateDropped is logged when an update of a Telegram Connection has no handler (C-14.FR-1, FR-8).

View Source
var TelegramUpdateFailed = newEvent("telegram_update_failed", LevelWarn, "C-14",
	"The webhook endpoint of a Telegram Connection could not look up the Connection or hand the update to the "+
		"router, usually because the database was unavailable, and answered 500; Telegram sends the update again. "+
		"connection is the public_id from the path, error what failed.",
	"connection", "error")

TelegramUpdateFailed is logged when the webhook endpoint of a Telegram Connection answered 500 (C-14.FR-1).

View Source
var TelegramWebhookDeleteFailed = newEvent("telegram_webhook_delete_failed", LevelWarn, "C-14",
	"A Telegram Connection in the webhook update mode was deleted, and deleteWebhook, called with its bot and base URL "+
		"as a best effort after the deletion, failed: connection is the public_id of the Connection, error what "+
		"Telegram or the network answered, without the bot token. The deletion stands; Telegram keeps posting the "+
		"bot's updates to Muster, which answers them 401, until the webhook is removed with the bot's token elsewhere.",
	"connection", "error")

TelegramWebhookDeleteFailed is logged when Muster could not remove the webhook of a deleted Telegram Connection (C-14.FR-1).

View Source
var TelegramWebhookDeleted = newEvent("telegram_webhook_deleted", LevelInfo, "C-14",
	"A Telegram Connection in the webhook update mode was deleted and deleteWebhook, called with its bot and base URL "+
		"after the deletion, removed its webhook: connection is the public_id of the Connection.",
	"connection")

TelegramWebhookDeleted is logged when Muster removed the webhook of a deleted Telegram Connection (C-14.FR-1).

View Source
var TelegramWebhookSet = newEvent("telegram_webhook_set", LevelInfo, "C-14",
	"A Telegram Connection was saved in the webhook update mode and setWebhook set its webhook, with a new secret "+
		"token, at MUSTER_INGEST_URL: connection is the public_id of the Connection, host the host of the webhook's URL.",
	"connection", "host")

TelegramWebhookSet is logged when Muster set the webhook of a Telegram Connection (C-14.FR-1).

View Source
var TemplateRecovered = newEvent("template_recovered", LevelInfo, "C-12",
	"A template of a Route that kept failing rendered again: route is the public_id of the Route and template the kind "+
		"of template. The Route's template error is cleared and MusterTemplateError resolves. Logged once the change "+
		"committed.",
	"route", "template")

TemplateRecovered is logged when a template of a Route that kept failing rendered again (C-12.FR-6).

View Source
var TimerFailed = newEvent("timer_failed", LevelWarn, "C-09",
	"A timer could not fire: kind is the timer kind and error what failed. The timer fires again on any replica "+
		"once its lease runs out.",
	"kind", "error")

TimerFailed is logged when a timer worker could not fire a timer; it fires again once its lease runs out.

View Source
var TimerFired = newEvent("timer_fired", LevelInfo, "C-17",
	"A timer of an Alert Group fired: kind is ack_timeout or reminder, group the public_id of the Alert Group, "+
		"notice the number of the notice or Reminder it sent, or of the last one a collapse stands for, and missed "+
		"how many overdue ones collapsed into one notices_missed, 0 when none did.",
	"kind", "group", "notice", "missed")

TimerFired is logged when an ack timeout notice or a Reminder of an Alert Group fired (C-17.FR-2, FR-4, FR-7).

View Source
var WebhookEventNotDelivered = newEvent("webhook_event_not_delivered", LevelWarn, "C-15",
	"An event of an outgoing webhook in the events mode ended as Not delivered after an answer that is not retried "+
		"and does not make the Destination Broken — 400, 413, 422, a redirect, which is never followed, or another "+
		"unknown answer — or because its request template failed: destination is the public_id of the Destination, "+
		"group the public_id of the Alert Group, lifecycle_event the lifecycle event and status the HTTP status of "+
		"the answer, empty without one. The next event of the Alert Group follows.",
	"destination", "group", "lifecycle_event", "status")

WebhookEventNotDelivered is logged when an event of an outgoing webhook ends as Not delivered (C-15.FR-6).

View Source
var WebhookTemplateFailed = newEvent("webhook_template_failed", LevelWarn, "C-15",
	"A request template of an outgoing webhook failed, so that request was not sent and its delivery, Thread reply or "+
		"event ended as Not delivered with no fallback body: destination is the public_id of the Destination, group "+
		"the public_id of the Alert Group, empty for a Storm summary, request the request — create, update, "+
		"open_thread, reply_in_thread or events — and error what failed, with its line and column and every Secret "+
		"masked. The Destination shows a template error and MusterTemplateError fires until one of its requests "+
		"renders again. Logged once the outcome is recorded.",
	"destination", "group", "request", "error")

WebhookTemplateFailed is logged when a request template of an outgoing webhook failed, so the request was not sent (C-15.FR-7, ADR-0012).

View Source
var WebhookValueMissing = newEvent("webhook_value_missing", LevelWarn, "C-15",
	"An extraction rule of the \"create\" or \"open thread\" request of an outgoing webhook found nothing in the "+
		"response: destination is the public_id of the Destination, group the public_id of the Alert Group and rule "+
		"the name of the rule. The request counts as delivered and the Timeline records template_value_missing; a "+
		"later request that reads the value fails as a template error. Logged once the outcome is recorded.",
	"destination", "group", "rule")

WebhookValueMissing is logged when an extraction rule of an outgoing webhook found nothing in a response (C-15.FR-4).

Functions

This section is empty.

Types

type Event

type Event struct {
	// contains filtered or unexported fields
}

Event is a registered log event. Its zero value is not registered, and the logger refuses it.

func (Event) Name

func (e Event) Name() string

Name is the event's name, as written in the event key of its lines.

type EventInfo

type EventInfo struct {
	Name  string
	Level Level
	// Levels are all the levels of the event, Level first; an event with more than one is logged with LogAt.
	Levels      []Level
	Fields      []string
	Capability  string
	Description string
}

EventInfo describes a registered event for the reference page.

func Events

func Events() ([]EventInfo, error)

Events returns the registered events sorted by name, and an error naming every invalid declaration.

type Field

type Field struct {
	// contains filtered or unexported fields
}

Field is one field of a log line; its key must be declared by the event.

func F

func F(key string, value any) Field

F makes a field. Entities are written so that a line is self-contained: group=#412, route=<public_id>.

type Level

type Level int

Level is the level of an event and the threshold of a logger.

func (Level) String

func (l Level) String() string

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

Logger writes registered events at or above its threshold.

func New

func New(w io.Writer, threshold Level) *Logger

New returns a logger that writes JSON lines to w; events below threshold are skipped.

func NewStdout

func NewStdout(threshold Level) *Logger

NewStdout returns the process logger, which writes to stdout.

func (*Logger) CaptureStdlib

func (l *Logger) CaptureStdlib(ctx context.Context)

CaptureStdlib sends what third-party libraries write to the standard library logger, and to the default slog logger, into l as library_message lines logged with ctx.

func (*Logger) Enabled

func (l *Logger) Enabled(ctx context.Context, e Event) bool

Enabled reports whether a line of e would be written.

func (*Logger) Log

func (l *Logger) Log(ctx context.Context, e Event, fields ...Field)

Log writes one line of e with fields at the level of e. An unregistered event, a field e does not declare and a repeated field are refused: they panic in tests and are dropped otherwise.

func (*Logger) LogAt

func (l *Logger) LogAt(ctx context.Context, e Event, level Level, fields ...Field)

LogAt writes one line of e at level, which must be one of the levels e declares; it is refused like Log refuses.

type Secret

type Secret string

Secret is a value that must never reach a log line: it is written as [redacted] by the logger, by fmt and by encoding/json.

func (Secret) Format

func (Secret) Format(f fmt.State, _ rune)

func (Secret) GoString

func (Secret) GoString() string

func (Secret) LogValue

func (Secret) LogValue() slog.Value

func (Secret) MarshalJSON

func (Secret) MarshalJSON() ([]byte, error)

func (Secret) MarshalText

func (Secret) MarshalText() ([]byte, error)

func (Secret) String

func (Secret) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL