Skip to main content

Python binding for dagstack/logger-spec — OTel-compatible structured logging, named loggers hierarchy, context propagation, sinks, scoped overrides

Project description

dagstack-logger

Python binding for dagstack/logger-spec — OTel-compatible structured logging with a named-logger hierarchy, W3C trace context propagation, pluggable sinks, and scoped overrides.

Configured through dagstack-config.

Status: Phase 1 MVP. Console / File / In-memory sinks ship; OTLP, redaction processor chain, and the AI-agent extension pack land in Phase 2+.

Roadmap

  • Phase 1 release (0.1.x) — current. LogRecord / Severity / W3C hex encoding / dagstack JSON-lines wire format; ConsoleSink (JSON/pretty TTY-aware), FileSink (rotation), InMemorySink (ring buffer); Logger hierarchy with context propagation, redaction by suffix, and scoped overrides. Logger.configure(config_section) integrates with dagstack-config. No OTLP sink, no LogProcessor chain, no AI-agent extension pack (§5.5 of logger-spec) yet.
  • Phase 2+OTLPSink, LokiSink, SentrySink, the LogProcessor chain (redaction / sampling), AI-agent conventions.

Spec

The spec lives as a submodule in spec/dagstack/logger-spec. The core decisions are in spec/adr/0001-logger-contract.md.

Local development

git clone --recurse-submodules https://github.com/dagstack/logger-python.git
cd logger-python
uv sync --group dev

make test           # pytest
make lint           # ruff check + format --check
make typecheck      # mypy --strict

Dependencies

  • dagstack-config>=0.4.1 — for configuration.
  • opentelemetry-api>=1.20,<2.0 — for trace / span / baggage context propagation (mandatory per spec §3.4).
  • opentelemetry-sdk + exporter (optional via [otlp] extras) — for OTLPSink in Phase 2+.

Licensing

Apache-2.0.

Related

Project details


Download files

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

Source Distribution

dagstack_logger-0.1.1.tar.gz (123.3 kB view details)

Uploaded Source

Built Distribution

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

dagstack_logger-0.1.1-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dagstack_logger-0.1.1.tar.gz
  • Upload date:
  • Size: 123.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for dagstack_logger-0.1.1.tar.gz
Algorithm Hash digest
SHA256 64fd01e0c7ac1a45e138ca45acb5cb4e9ad5228ee498e6f4407d99ddb1193fe1
MD5 8487c6b77115de28ba61a414b0d16781
BLAKE2b-256 e46013153e1703bc62b35b31ba81265582802ec6829c89a981ac5e292e66a22f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dagstack_logger-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2369769ed41b01c77dcccd69b52623c9c1235a2d4532b3b61685c9a789880ff7
MD5 88d894ed2b0e99c90d3ed9891f17d4dc
BLAKE2b-256 c7b8c1cd3b9969d9dd1c24925d58f8b192ec02e062a77c5eb88320481aec08c6

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 Pingdom Monitoring Sentry Error logging StatusPage Status page