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.1rc2.tar.gz (123.2 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.1rc2-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dagstack_logger-0.1.1rc2.tar.gz
  • Upload date:
  • Size: 123.2 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.1rc2.tar.gz
Algorithm Hash digest
SHA256 709beead43a89e75b381cdbf524e8e12ed03b7b9833d311d5787fb7c549d9b2e
MD5 983a7ef343bcdcc29e23522b769a6a4e
BLAKE2b-256 2d9908b58d1af98c7d5e276a819fe04a4983ffc6210cd1533850f8fd0e0d6278

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dagstack_logger-0.1.1rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 26a570430019689f02610b746c6b6b4461db23a33d1a44106af452b881574888
MD5 00c39fe120161c4989aeccedcabb5603
BLAKE2b-256 25cfca6ddd13d6d8b15fdbe86c625b5b1fb1875e409ddcddee8c93eed71f3e5d

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