python_structlog_config.integrations

Optional integrations for OTel and Sentry.

Per PRD specifications

Functions

setup_otel_logging(→ None)

Setup OpenTelemetry logging integration.

setup_sentry_logging(→ None)

Setup Sentry logging integration.

Module Contents

python_structlog_config.integrations.setup_otel_logging(service_name: str | None = None) None

Setup OpenTelemetry logging integration.

Args:

service_name: Service name for context

Example:
>>> setup_otel_logging("my-api")
python_structlog_config.integrations.setup_sentry_logging(sentry_dsn: str, environment: str | None = None) None

Setup Sentry logging integration.

Args:

sentry_dsn: Sentry DSN environment: Environment name (dev, staging, prod)

Example:
>>> setup_sentry_logging(
...     "https://...@sentry.io/...",
...     environment="production"
... )