obs

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 8 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 obs holds runeward's observability wiring: structured logging and Prometheus metrics. It has no dependency on the control plane, so any package can record metrics without creating an import cycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IncSandboxCreated

func IncSandboxCreated()

IncSandboxCreated bumps the sandbox-creation counter.

func MetricsHandler

func MetricsHandler() http.Handler

MetricsHandler serves the Prometheus exposition endpoint.

func NewLogger

func NewLogger() *slog.Logger

NewLogger builds the structured logger for the operator-facing services. $RUNEWARD_LOG_FORMAT selects "json" or "text" (default text); $RUNEWARD_LOG_LEVEL selects debug/info/warn/error (default info). Logs go to stderr.

func RecordAction

func RecordAction(tool, verdict string, durationMS int64)

RecordAction records one governed action outcome. durationMS <= 0 (denied or non-executed actions) skips the duration observation.

func SetBuildInfo

func SetBuildInfo(version string)

SetBuildInfo publishes the running version as a build_info gauge.

func StdLogger

func StdLogger(l *slog.Logger) *log.Logger

StdLogger adapts an slog.Logger to a *log.Logger, so packages that still take the stdlib logger emit through the same structured pipeline.

Types

This section is empty.

Jump to

Keyboard shortcuts

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