observability/

directory
v0.0.0-...-83d1dff Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT

README

observability

Observability subsystem for the Atlas framework. Provides metrics collection, distributed tracing, structured logging, health checks, and application statistics — all behind abstract interfaces with pluggable backends.

Packages

Package Description
appstats CPU, memory, network I/O, and goroutine metrics with background caching
health Transport-agnostic health check coordination with subscriptions
metrics Abstract metrics (Counter, Gauge, Histogram, Timer) with adapters
slog Nil-safe slog helpers, context integration, and composable handlers
tracing Abstract distributed tracing with adapters and sampling

Design principles

  • Backend-agnostic — components depend on abstract interfaces; concrete backends are injected via adapters.
  • Optional by default — every subsystem provides a Noop() implementation so consumers can default to zero-cost no-ops.
  • Factory-driven — each subsystem includes a factory subpackage for configuration-based instantiation.
  • Allocation-aware — object pooling for labels, attributes, and buffers to reduce GC pressure.
  • Composable — slog handlers chain together (colorize → prefix → mask → buffer); tracing and metrics support scoped naming.

Directories

Path Synopsis
Package appstats provides high-performance application statistics monitoring.
Package appstats provides high-performance application statistics monitoring.
Package health provides transport-agnostic health check coordination and monitoring.
Package health provides transport-agnostic health check coordination and monitoring.
factory
Package factory provides configuration-based creation of health health.Coordinator instances.
Package factory provides configuration-based creation of health health.Coordinator instances.
internal
shared
Package shared provides common types and utilities for observability packages.
Package shared provides common types and utilities for observability packages.
Package metrics provides an abstract metrics collection system that is not tied to any specific format (Prometheus, StatsD, OpenTelemetry, etc.).
Package metrics provides an abstract metrics collection system that is not tied to any specific format (Prometheus, StatsD, OpenTelemetry, etc.).
adapters
Package adapters defines the Adapter interface for metrics backends.
Package adapters defines the Adapter interface for metrics backends.
adapters/prometheus
Package prometheus provides a Prometheus adapters.Adapter for the metrics system.
Package prometheus provides a Prometheus adapters.Adapter for the metrics system.
factory
Package factory provides configuration-based creation of metrics.Collector instances from config.Metrics.
Package factory provides configuration-based creation of metrics.Collector instances from config.Metrics.
Package slog provides nil-safe attribute helpers, context integration, and advanced handlers for Go's log/slog.
Package slog provides nil-safe attribute helpers, context integration, and advanced handlers for Go's log/slog.
factory
Package factory provides configuration-based creation of slog loggers.
Package factory provides configuration-based creation of slog loggers.
handler/buffered
Package buffered provides an asynchronous slog.Handler that buffers log records and writes them via a background goroutine.
Package buffered provides an asynchronous slog.Handler that buffers log records and writes them via a background goroutine.
handler/colorized
Package colorized provides a slog.Handler with color-coded terminal output.
Package colorized provides a slog.Handler with color-coded terminal output.
handler/internal/base
Package base provides a base implementation for slog handler middlewares.
Package base provides a base implementation for slog handler middlewares.
handler/masking
Package masking provides a slog.Handler that masks sensitive data in log records.
Package masking provides a slog.Handler that masks sensitive data in log records.
handler/prefixed
Package prefixed provides a slog.Handler middleware that adds prefixes to log messages.
Package prefixed provides a slog.Handler middleware that adds prefixes to log messages.
Package tracing provides an abstract distributed tracing system that is not tied to any specific format (Jaeger, Zipkin, OpenTelemetry, etc.).
Package tracing provides an abstract distributed tracing system that is not tied to any specific format (Jaeger, Zipkin, OpenTelemetry, etc.).
adapters
Package adapters defines the Adapter interface for tracing backends.
Package adapters defines the Adapter interface for tracing backends.
adapters/console
Package console provides a console adapters.Adapter for tracing.
Package console provides a console adapters.Adapter for tracing.
adapters/otlp
Package otlp provides an OTLP adapters.Adapter for tracing.
Package otlp provides an OTLP adapters.Adapter for tracing.
factory
Package factory provides a factory for creating tracing.Tracer instances from config.Tracing configuration.
Package factory provides a factory for creating tracing.Tracer instances from config.Tracing configuration.
propagation
Package propagation provides context propagation for distributed tracing.
Package propagation provides context propagation for distributed tracing.
sampler
Package sampler provides sampling strategies for distributed tracing.
Package sampler provides sampling strategies for distributed tracing.

Jump to

Keyboard shortcuts

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