logevent

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package logevent is the vocabulary of the log contract (docs/logging.md): the `event` names a line carries when it is a signal rather than narration. A dashboard or an alert keys on these names, never on message text, so every name is a constant here, every constant is documented, and a test keeps the code, this catalog and the docs page in step.

Index

Constants

View Source
const AuditPrefix = "audit."

AuditPrefix is what an audit action's mirror line is named under: the audit action catalog (internal/audit) supplies the rest.

View Source
const Key = "event"

Key is the attribute the name is written under.

Variables

All lists every catalogued name, for the completeness test and the docs.

Functions

This section is empty.

Types

type Event

type Event string

Event is one catalogued signal name: dotted, lowercase, stable.

const (
	// HTTPRequest is the access line: one per request the server handled.
	HTTPRequest Event = "http.request"
	// HTTPRateLimited is a request refused by a rate class.
	HTTPRateLimited Event = "http.rate_limited"
	// AuthSocialRejected is a sign-in through the OpenID provider the server
	// rejected.
	AuthSocialRejected Event = "auth.social_rejected"
	// SSRFRefused is an outbound target the private-range guard refused.
	SSRFRefused Event = "ssrf.refused"
	// GateVerdict is the gate deciding a version: published, rejected or
	// routed to review.
	GateVerdict Event = "gate.verdict"
	// GateError is a version routed to review because the platform's own
	// machinery failed — a stage error, an unusable policy, the watchdog.
	GateError Event = "gate.error"
	// ScanStage is one scanner stage finishing, with its outcome.
	ScanStage Event = "scan.stage"
	// FailOpenAuditStreamDrop is an audit archive record dropped on a full
	// buffer.
	FailOpenAuditStreamDrop Event = "failopen.audit_stream_drop"
	// FailOpenHistoryNotScanned is a git history the S2 stage could not
	// scan.
	FailOpenHistoryNotScanned Event = "failopen.history_not_scanned"
	// FailOpenOSVNotChecked is a dependency set S7 did not check against OSV.
	FailOpenOSVNotChecked Event = "failopen.osv_not_checked"
	// FailOpenOSVError is an OSV lookup that errored.
	FailOpenOSVError Event = "failopen.osv_error"
	// FailOpenVersionNotChecked is a declared MCP server version S7 did not
	// check against its package registry.
	FailOpenVersionNotChecked Event = "failopen.version_not_checked"
	// FailOpenDirectoryErasure is an account erasure whose directory half
	// did not happen after its retries.
	FailOpenDirectoryErasure Event = "failopen.directory_erasure"
	// GitPushRefused is a submission the git door refused after a tag push.
	GitPushRefused Event = "git.push_refused"
	// MailSuppressed is a notification withheld from an unverified address.
	MailSuppressed Event = "mail.suppressed"
	// WebhookDelivered is one webhook delivery attempt finishing, with its
	// outcome.
	WebhookDelivered Event = "webhook.delivered"
	// ModelInput is one call to a model-input route finishing: a scan of
	// text a model is about to read, or a brokered web search, with its
	// verdict and counts, never the text, the query or an address.
	ModelInput Event = "model_input.call"
)

func Audit

func Audit(action string) Event

Audit is the mirror line's event for one audit action.

func (Event) Attr

func (e Event) Attr() slog.Attr

Attr is the attribute to pass to a slog call.

func (Event) String

func (e Event) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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