Skip to content

chore: sync upstream/main into main#132

Merged
Cirilla-zmh merged 15 commits intomainfrom
sync/upstream-20260305-061907
Mar 5, 2026
Merged

chore: sync upstream/main into main#132
Cirilla-zmh merged 15 commits intomainfrom
sync/upstream-20260305-061907

Conversation

@Cirilla-zmh
Copy link
Collaborator

@Cirilla-zmh Cirilla-zmh commented Mar 5, 2026

Summary

  • Merge upstream upstream/main into main
  • Preserve upstream commit history for incremental future syncs

Notes

  • This PR can be merged into main without conflicts (conflicts were resolved during the upstream merge)
  • Use merge commit (not squash) to preserve upstream commit granularity

Common change logs

Added

  • opentelemetry-instrumentation-logging: Move there the SDK LoggingHandler
    (#4210)
  • Add stale PR GitHub Action
    (#4220)

Fixed

  • opentelemetry-instrumentation-flask: Align http.server.active_requests initialization with semantic convention helpers to ensure consistent names, units, and descriptions.
    (#4094)
  • opentelemetry-instrumentation-asyncio: Fix environment variables not appearing in Read the Docs documentation
    (#4256)
  • opentelemetry-instrumentation-falcon: Refactor _handle_exception to remove pylint disables
    (#4207)
  • opentelemetry-instrumentation-psycopg2: Fix AttributeError by using instrumented connections weakref, instead of mutating connection object
    (#4257)

opentelemetry-instrumentation-openai-v2

  • Add opt-in support for latest experimental semantic conventions (v1.37.0). Set
    OTEL_SEMCONV_STABILITY_OPT_IN to gen_ai_latest_experimental to enable.
    Add dependency on opentelemetry-util-genai pypi package.
    (#3715)

xrmx and others added 15 commits February 27, 2026 08:54
* confluent-kafka: test auto-instrumentation code path

* Add TODO to simpligy the instrumentation

* silence pylint

* Update __init__.py
…NTATION_ENABLED=true (#4263)

The openai-v2 examples predate (2024) the Jan 2025 decouple
(f3b9e6ec96b7cc3717d5c8b529da7a8923810973 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.
* asyncio: fix environment variables not in docs

Fix the docstrings in environment_variables.py so they are correctly
picked up by Sphinx autodoc for Read the Docs.

Previously the docstrings were placed above the variable assignments,
which Sphinx cannot parse. Moved them below and added the
required '.. envvar::' directives, consistent with how other
packages (e.g. opentelemetry-instrumentation) document their
environment variables.

Fixes #4256

* Fix typo from 'determines' to 'determine'

* Apply suggestion from @xrmx

* asyncio: move environment_variables docs to __init__ module docstring for sphinx

* asyncio: keep envvar docs in environment_variables.py with module-level docstring

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* maint: Add stale github action

* add changelog entry

* add exempt PR labels

* increase close days to 14

* update contributing.md for stale PRs

* Update cron schedule

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>

* update stale message

* clean-up

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
…per (#4094)

* fix(flask): correct HTTP metrics handling with semconv opt-in

* fix(flask): avoid hardcoded legacy http.server.duration metric name

* changelog: note flask http server metrics consistency fix

* fix(flask): use semconv constant for legacy http.server.duration metric

* Update instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py

* Update CHANGELOG.md

* fix(flask): explicitly split active requests metric by semconv mode

* fix(flask): align http.server.active_requests metric with semconv helper

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…disables (#4207)

* Fix falcon-instrumentation _handle_exception method to remove pylint disables

* Refactor _handle_exception method for Falcon 3

* try fix

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>

* Add CHANGELOG entry for falcon _handle_exception refactor (#4207)

---------

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
A new hatch release is out and that should work.
…nection object (#4257)

* Fix psycopg2 (un)instrument_connection to use weakref, not mutate object

* Changelog

* conditional import for docs types

* Lint

* SImplify test

* Simplify

* Fix docs

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
* Move logging integrations into auto-instrumentation

* opentelemetry-instrumentation-logging: move the sdk logging handler here

And hook it up via entry point

* Add header and future annotations import

* Rename entry point group to opentelemetry_logging_integrations

* Consider setting up the LoggingHandler as a normal instrumentation

* Fix typo

* Add missing import

* Copy handler tests from core

* More work towards green tests

* Cleanup properly after loggingHandler tests

* Quite hard to expect a mock to setup the handler

* Call removehandler also on local loggers

No change in practice

* Fix wrong noop test

* Move to our own env var for controlling autoinstrumentation

* Copy handler benchmark from sdk

* Document the new environment variables

* Add changelog

* Please pylint

* Added warning about coexistence with sdk code

* Reword a bit

* Assert that the LoggingHandler has not been setup in uninstrumented test

* Add manual handling of auto instrumentation and code attributes logging

* Update instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/constants.py

* Apply suggestions from code review

Co-authored-by: Pablo Collins <pablo.collins@gmail.com>

* Apply more Pablo feedback

---------

Co-authored-by: Pablo Collins <pablo.collins@gmail.com>
…other breaking changes (#3715)

* Support latest experimental conventions in openai

* format

* changelog

* lint

* lint

* update to use new test utils, fix tests

* lint

* review

* address feedback

* review

* feedback: more readable
* Update version to 1.41.0.dev/0.62b0.dev

* Apply suggestions from code review

---------

Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
…es (#4295)

Namely opentelemetry-instrumentation-anthropic and
opentelemetry-instrumentation-claude-agent-sdk
Change-Id: Ic1fbf49e1bf115ebeb35b058a7458bd4a135f231
Co-developed-by: Cursor <noreply@cursor.com>
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 8 committers have signed the CLA.

✅ Cirilla-zmh
❌ xrmx
❌ srikaaviya
❌ MikeGoldsmith
❌ tammy-baylis-swi
❌ otelbot[bot]
❌ lmolkova
❌ rite7sh
You have signed the CLA already but the status is still pending? Let us recheck it.

@Cirilla-zmh Cirilla-zmh added Skip Changelog PRs that do not require a CHANGELOG.md entry synchronize upstream This is a synchronization PR from OpenTelemetry upstream. labels Mar 5, 2026
@Cirilla-zmh Cirilla-zmh merged commit 382176a into main Mar 5, 2026
141 of 142 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry synchronize upstream This is a synchronization PR from OpenTelemetry upstream.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants