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.1.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.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: yaol-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 13e6579b8ecdad286f06f4ef14f00ab32ff1ad662d28c81098d9774bc5f87c84
MD5 1ef33a9928fd1b24997201cdfaffdbe8
BLAKE2b-256 497f6d05f4e879b1be75bcc5c3102e1d88af314b562f9e6e5fd430f47f851bd3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: yaol-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6c99c0d834dbb5909ff6eafc3d6fae88c86074474ad030d28e2526dce6b5426b
MD5 31cbaff0366efbfd397563caf2edc379
BLAKE2b-256 4ad9fe54afd18c4ca51684f3467aa0cc1188c96af64a5cc9d5fc58e71eb62420

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