Skip to content

instrumentation-genai: stop setting OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true#4263

Open
xrmx wants to merge 1 commit intoopen-telemetry:mainfrom
xrmx:drop-logging-handler-setup-genai
Open

instrumentation-genai: stop setting OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true#4263
xrmx wants to merge 1 commit intoopen-telemetry:mainfrom
xrmx:drop-logging-handler-setup-genai

Conversation

@xrmx
Copy link
Contributor

@xrmx xrmx commented Feb 25, 2026

Description

The openai-v2 examples (that the other instrumentation followed) predate (2024) the Jan 2025 decouple of the log machinery setup from the LoggingHandler setup (f3b9e6e in core). So unless I'm missing something and you really want to see OpenTelemetry logs shipped from Python logging module usage in these genai examples, I think we can drop these.

We're moving the logging handler from the sdk to the opentelemetry-instrumentation-logging and deprecating that environment variable.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

…NTATION_ENABLED=true

The openai-v2 examples predate (2024) the Jan 2025 decouple
(f3b9e6e in core) of the log machinery setup from
the LoggingHandler setup. So unless I'm missing something and you
really want to see OpenTelemetry logs shipped from Python logging module
usage in these genai examples I think we can drop these.

We're moving the logging handler from the sdk to the opentelemetry-instrumentation-logging and
deprecating that environment variable.
Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me from logging stabilization standup. Would be good to get thoughts from a regular genai contributor/approver.

Copy link
Member

@emdneto emdneto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to update all examples later to include the installation of the opentelemetry-instrumentation-logging package, i believe we are just installing opentelemetry-distro

@tammy-baylis-swi tammy-baylis-swi moved this from Ready for review to Approved PRs in @xrmx's Python PR digest Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gen-ai Related to generative AI Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

5 participants