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 для dagstack/logger-spec — OTel-compatible structured logging с named loggers hierarchy, W3C trace context propagation, pluggable sinks, scoped overrides.

Конфигурируется через dagstack-config.

Status: Phase A (skeleton). Реализация в прогрессе.

Roadmap

  • Phase A (this PR) — repo skeleton, pyproject, CI, spec submodule, empty package.
  • Phase B — core primitives: LogRecord dataclass, Severity enum, W3C hex encoding, dagstack JSON-lines canonical serializer.
  • Phase CSink Protocol + Phase 1 sinks: ConsoleSink (JSON/pretty TTY-aware), FileSink (rotation), InMemorySink (ring-buffer).
  • Phase DLogger class (hierarchy, context propagation, redaction, subscriptions), scoped overrides, Logger.configure(config_section) интеграция с dagstack-config.
  • Phase 1 release (0.1.0) — MVP без OTLP sink, без LogProcessor chain, без AI-agent extension pack (§5.5 logger-spec).
  • Phase 2+ — OTLPSink, LokiSink, SentrySink, LogProcessor chain (redaction/sampling), AI-agent conventions.

Spec

Spec submodule в spec/dagstack/logger-spec. Основные decisions — spec/adr/0001-logger-contract.md.

Local development

git clone --recurse-submodules git@git.goldix.org: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.1.0.dev0 — для конфигурирования.
  • opentelemetry-api>=1.20,<2.0 — для trace/span/baggage context propagation (mandatory per spec §3.4).
  • opentelemetry-sdk + exporter (optional via [otlp] extras) — для OTLPSink в 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.1rc1.tar.gz (123.5 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.1rc1-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dagstack_logger-0.1.1rc1.tar.gz
  • Upload date:
  • Size: 123.5 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.1rc1.tar.gz
Algorithm Hash digest
SHA256 49d5546bfff2aee20b7cf1e8be35eeaa99f9c99fdecc29364131c9b657b1f41d
MD5 da8c1e3b9af718bbf875aa68f1ab5bda
BLAKE2b-256 5c78af8580a0dc4010822fca7c128b78c0e2faf2b29b54bb09f0cc9469c6dd79

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dagstack_logger-0.1.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 3cbd7b1bea7569599582fefdf0398c8e8618103355f07158cfd6c099bb6861b7
MD5 8301a9fd71baa2bcd41dcdabf30b26e2
BLAKE2b-256 5e2ea9d4ae8c4a8dceaf3cd39ebba228740b7cc5c99ebf6d209944c5c786dc96

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