Skip to content

instrumentation-genai: stop setting OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true#4263

Merged
xrmx merged 2 commits intoopen-telemetry:mainfrom
xrmx:drop-logging-handler-setup-genai
Feb 27, 2026
Merged

instrumentation-genai: stop setting OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true#4263
xrmx merged 2 commits intoopen-telemetry:mainfrom
xrmx:drop-logging-handler-setup-genai

Conversation

@xrmx
Copy link
Copy Markdown
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.
@xrmx xrmx requested a review from a team as a code owner February 25, 2026 16:43
@xrmx xrmx added Skip Changelog PRs that do not require a CHANGELOG.md entry gen-ai Related to generative AI labels Feb 25, 2026
@tammy-baylis-swi tammy-baylis-swi moved this to Ready for review in Python PR digest Feb 25, 2026
Copy link
Copy Markdown
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
Copy Markdown
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 Python PR digest Feb 26, 2026
@xrmx xrmx enabled auto-merge (squash) February 27, 2026 08:58
@xrmx xrmx merged commit 367e5e0 into open-telemetry:main Feb 27, 2026
771 checks passed
@github-project-automation github-project-automation Bot moved this from Approved PRs to Done in Python PR digest Feb 27, 2026
shuningc pushed a commit to shuningc/opentelemetry-python-contrib that referenced this pull request Mar 5, 2026
…NTATION_ENABLED=true (open-telemetry#4263)

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.
etserend pushed a commit to etserend/opentelemetry-python-contrib that referenced this pull request Mar 6, 2026
…NTATION_ENABLED=true (open-telemetry#4263)

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.
sightseeker added a commit to sightseeker/opentelemetry-python-contrib that referenced this pull request Mar 11, 2026
…NTATION_ENABLED=true (open-telemetry#4263)

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.
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: Done

Development

Successfully merging this pull request may close these issues.

5 participants