Skip to content

Python: expose enable_message_events through enable_instrumentation #8443

Closed

Description

Scope

Python implementation of #8412. Microsoft OTel Distro needs to call enable_instrumentation(enable_message_events=False) without configuring or replacing Agent Framework's OpenTelemetry providers/exporters.

On upstream/main at 999dda7970fe969c0901d524365ce34ecbda6227, enable_instrumentation accepts only enable_sensitive_data and force; configure_otel_providers already supports enable_message_events.

Acceptance criteria

  • Add the keyword-only enable_message_events: bool | None = None parameter to the public Python enable_instrumentation API.
  • Explicit True/False sets the existing message-event control, overriding the value previously obtained from the environment or provider configuration.
  • Omitted/None leaves the current setting unchanged, preserving backward compatibility and prior configuration.
  • Preserve existing sensitive-data gating, sticky disable unless force=True, and external provider/exporter ownership.
  • Add focused regression coverage for the public call, explicit/omitted values, environment precedence, disable/force behavior, actual message emission, and provider preservation; update directly relevant documentation and any required API baseline.

Boundaries

No .NET changes, observability redesign, or unrelated span-metadata fixes. A Python PR should close this subissue and reference #8412 as partially addressed, without closing the parent.

Activity

  1. changed the title [-]Python: expose enable_message_events through enable_instrumentation[/-] [+].NET: Python: expose enable_message_events through enable_instrumentation[/+] on Sep 17, 2026
  2. changed the title [-].NET: Python: expose enable_message_events through enable_instrumentation[/-] [+]Python: expose enable_message_events through enable_instrumentation[/+] on Sep 17, 2026
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

    pythonUsage: [Issues, PRs], Target: Python

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions