Skip to content

Support pluggable logging for structured output and correlation IDs #1741

Description

@maxisbey

Summary

Allow users to inject their own logger for structured logging, correlation IDs, and integration with their logging infrastructure.

Problem

The SDK uses standard Python logging.getLogger(__name__) which produces unstructured, multi-line output that's hard to correlate in log aggregation systems.

  • Can't correlate logs from a single request when debugging
  • Multi-line log entries break standard log parsing
  • No built-in support for correlation IDs across request lifecycle

Goal

Let users configure a custom logger factory so they can use structured logging (JSON), add correlation IDs, and integrate with tools like structlog.


AI Disclaimer

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Moderate issues affecting some users, edge cases, potentially valuable featureenhancementRequest for a new feature that's not currently supportedv2Affects the v2 line (2.x on main)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions