Skip to main content

yaol

Yet another observability library. Wires OpenTelemetry traces, metrics and logs plus structlog and Pyroscope profiling from a single config object.

Usage

from yaol import ObservabilityConfig, setup, shutdown, instrument_asyncpg

config = ObservabilityConfig(
    service_name="bot",
    service_version="0.1.7",
    environment="prod",
    otlp_endpoint="http://172.17.0.1:4317",
    logger_levels={"sqlalchemy.engine": "WARNING"},
)

setup(config)
instrument_asyncpg()
...
shutdown()

from_env builds the same object from environment variables: ENV, OTEL_EXPORTER_OTLP_ENDPOINT, LOG_LEVEL, YAOL_JSON_LOGS, YAOL_EXPORT_LOGS, YAOL_EXPORT_METRICS, YAOL_METRIC_INTERVAL_MILLIS, YAOL_PROFILING_ENABLED, PYROSCOPE_ADDRESS, PYROSCOPE_SAMPLE_RATE.

Signals

  • Traces — OTLP gRPC, BatchSpanProcessor.
  • Metrics — OTLP gRPC, PeriodicExportingMetricReader.
  • Logs — OTLP gRPC alongside the stdout handler; both are attached to the root logger.
  • Profiles — Pyroscope push, off by default.

shutdown() flushes every provider, which the previous ad-hoc setup did not do.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yaol-0.1.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yaol-0.1.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file yaol-0.1.0.tar.gz.

File metadata

  • Download URL: yaol-0.1.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for yaol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 95f5888323efaa1dd9f8fbd09155ac80f9242ab374f09f27cc8ef15442332a0c
MD5 2a67050667e1fbbda65ce5b323ae9dc7
BLAKE2b-256 30162366ffaa6e33e25ea474f6d0c3640deaf90340d1e0586acf8c58af2e9887

See more details on using hashes here.

File details

Details for the file yaol-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: yaol-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for yaol-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36dfd6a16ec4d4b263a7c073b8423b9ff50d25199a896290b88ad3cc692ea30e
MD5 f4dfc8c7744ad3de15fd712035c7810c
BLAKE2b-256 fdf2255377a55939a4085debefeffe9cdd838e27be6a0798149e1b804a32705e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page