2556 Commits

Author SHA1 Message Date
bca482609b Add minimum token permissions for all github workflow files (#3604) 2025-07-24 07:33:31 -08:00
c30b8fa9a5 Migrate from opentelemetrybot to otelbot (#3641) 2025-07-23 09:02:44 -08:00
77f3171bd4 Add "instruments-any" feature: unblock multi-target instrumentations while fixing dependency conflict breakage. (#3610) 2025-07-21 08:24:50 -08:00
f20fa77ad5 refactor: opentelemetry-instrumentation-urllib (#3639)
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-07-16 08:11:46 +00:00
f9453b940a Fix system metrics unit tests on mac (#3638)
* Fix system metrics unit tests on mac

Don't test for system.network.connections on mac

* round
2025-07-14 18:31:33 +02:00
109173fec7 Update version to 1.36.0.dev/0.57b0.dev (#3633) 2025-07-11 14:35:47 +02:00
b63ca133be Update CHANGELOG.md (#3632) 2025-07-11 13:33:10 +02:00
1f78c8acff Sort contributor listings and remove affiliation from emeriti (#3627)
Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-07-11 09:20:33 +00:00
49fa53131d Add tornado WebSocketHandler instrumentation support (#3498)
* Add tornado WebSocketHandler instrumentation support. (https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2761)

* Linting

* Update CHANGELOG.md

* Apply refactor changes from #3582

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-07-10 17:41:36 +02:00
333fc5dcb4 Update opentelemetry-instrumentation-google-genai version to v0.4b0 (#3619) 2025-07-08 14:46:08 -04:00
80c357bb16 pika: added instrumentation for pika.connection.Connection and pika.c… (#3584)
* pika: added instrumentation for pika.connection.Connection and pika.channel.Channel, thus added instrumentation support to all SelectConnection adapters.

* updated changelog.

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-07-07 08:17:31 +00:00
3c4d18cc13 ref(mysql): remove SpanAttributes (#3616)
* ref(mysql): remove SpanAttributes

* fix imports
2025-07-07 09:43:47 +02:00
b74633a552 feat(pymongo): aggregate and getMore capture statements support (#3601)
* feat(pymongo): aggregate and getMore capture statements

* chore: update changelog

* fix: tests

* fix: proper MockCommand and expectations

* chore: ruff-format
2025-07-02 07:23:51 +00:00
b1c2c7941b fix excluded_urls in instrumentation-asgi (#3567)
* fix excluded_urls in instrumentation-asgi

* fix ExcludeList or str

* chhangelog

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-07-01 12:33:01 +00:00
b69ebb7224 Redact specific url query string values and url credentials in instrumentations (#3508)
* Updated the instrumentation with aiohttp-server tests for url redaction

* Updated the aiohttp-server implementation and the query redaction logic

* Updated changelog and moved change to unreleased. Updated test files with license header

* Improved formatting

* Fixed failing tests

* Fixed ruff

* Update util/opentelemetry-util-http/src/opentelemetry/util/http/__init__.py

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

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
2025-07-01 12:26:47 +00:00
6977da3893 Improve asgi instrumentation example (#3576)
* Improve asgi instrumentation example

* Fix indentation of asgi instrumentation example

* Improve type hints of asgi instrumentation example

* Ignore pylint too-many-lines

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-06-30 11:03:50 +02:00
ca079cbc56 feat: change semcov util/opentelemetry-util-http (#3592) 2025-06-30 08:21:28 +00:00
40d8942bf5 Update community member listings (#3595)
* Update community member listings

* Fix outdated community membership link

---------

Co-authored-by: otelbot <197425009+otelbot@users.noreply.github.com>
2025-06-30 08:14:08 +00:00
78300e9642 Update CHANGELOG.md (#3593) 2025-06-26 12:01:51 +02:00
c4347e027c adds NoOpTracerProvider test case for falcon instrumentation (#3382)
Signed-off-by: Shwejan Raj, Bhupathi <Bhupathi.ShwejanRaj@fmr.com>
Signed-off-by: Bhupathi Shwejan Raj <Bhupathi.ShwejanRaj@fmr.com>
2025-06-17 16:16:26 +00:00
0a03c9abf2 refactor(tornado): replaces SpanAttributes by semconv attributes (#3582)
* refactor: fix import paths

* fix imports

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-06-16 12:09:38 +00:00
85dbfe520a Improve grpc instrumentation examples (#3575) 2025-06-16 09:31:12 +00:00
b27225273b Improve wsgi instrumenation example (#3577) 2025-06-16 09:06:34 +00:00
591051f8bb Improve pyramid instrumentation example (#3578)
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-06-16 08:42:59 +00:00
50cdeeee12 resource-detector-containerid: demote failure to read cgroup files to debug (#3579)
* resource-detector-containerid: demote failure to read cgroup files to debug

Make the detection more quiet so we can load it on application not
running on linux machines without spamming logs.

* Add changelog
2025-06-16 10:33:16 +02:00
04f8899252 docs: update redis-py documentation link (#3581) 2025-06-13 10:01:16 -03:00
59cc34e9f3 Update version to 1.35.0.dev/0.56b0.dev (#3556) 2025-06-04 16:53:03 +02:00
b7301823a0 Allow reraising the root exception if instrumentation fails (#3545)
* Allow reraising the root exception if instrumentation fails

I would rather completely fail startup in my services if instrumentation fails for whatever reason instead of just logging an exception and continuing.

Use case:

from opentelemetry import autoinstrumentation

autoinstrumentation.initialize(swallow_exceptions=False)

* Fix lint

* Type hinting, re-raise original exception

* One more type hint to indicate None return

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-06-04 08:44:45 +00:00
4a21b3974b resource-dector-container: package rename to opentelemetry-resource-detector-containerid (#3536)
* resource-dector-container: package rename

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

* fix ruff

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

* change entrypoint

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

* fix

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

* fix test

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

* fix for entrypoint name

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

* add changelog

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

---------

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
2025-06-04 10:41:38 +02:00
85ea8f382d refactor(grpc): replace SpanAttributes with semconv attributes (#3540)
* refactor(grpc): replace SpanAttributes with semconv attributes

* refactor(flask): replace SpanAttributes with semconv attributes (fix ruff linting)

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-06-03 15:31:50 +00:00
8f7bab5337 Fixes container detector for systemd & cgroupv1 with Docker (#3429)
* Fixes container detector for systemd & cgroupv1 with Docker

* Update CHANGELOG

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-06-03 15:27:09 +00:00
ccf9cabeee feat(instrumentation-httpx): Add support for HTTP metrics (#3513)
* Add support for metrics

* Updated changelog

* Update package.py

* generate and lint

* Update

* Update

---------

Co-authored-by: Tammy Baylis <96076570+tammy-baylis-swi@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-06-03 14:00:38 +00:00
701d65b022 feat: support batch (getmany) in aiokafka instrumentation (#3257)
* feat: support batch (getmany) in aiokafka instrumentation

* test: fix unclosed resources and typing

* test: add test_wrap_getmany

* fix: get unique topic list in batch

* fix: update typing, run pyupgrade

* fix: remove json.dumps from SERVER_ADDRESS attribute

* fix pylint

* fix: sync span_kind with spec

* add CHANGELOG entry

* remove changes not from this issue

* move types under TYPE_CHECKING

* move CHANGELOG entry to unreleased

* enable pyright for aiokafka, fix key type

* Update CHANGELOG.md

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
2025-06-03 13:52:00 +00:00
b9a78e7475 opentelemetry-instrumentation-starlette: fix memory leak and double middleware (#3529)
* opentelemetry-instrumentation-starlette: fix memory leak and double middleware

* Changelog

* Update CHANGELOG.md

Co-authored-by: Joe McGinley <116890464+jomcgi@users.noreply.github.com>

---------

Co-authored-by: Joe McGinley <116890464+jomcgi@users.noreply.github.com>
2025-06-03 15:47:35 +02:00
77325aa89a fix: respect supress_instrumentation functionality in sqlalchemy instrumentation (#3477)
* respect supress_instrumentation

* update changelog

* Update CHANGELOG.md

Fix changelog after release

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-05-30 16:00:27 +00:00
6d8becf9ad feat: respect supress_instrumentation functionality in dbapi instrumentation (#3460)
* respect supress_instrumentation

* update CHANGELOG

* fix link

* update CHANGELOG

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
2025-05-30 17:49:29 +02:00
6c89a56da5 replaced all uses of spanattributes in wsgi (#3546)
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-05-29 16:09:04 +00:00
3e0632cb31 opentelemetry-instrumentation-botocore: fix handling of tool input chunked json in bedrock converse_stream (#3544)
* opentelemetry-instrumentation-botocore: fix handling of tool input chunked json in converse_stream

We need to accumulate all the tool input as string before decoding it
otherwise we may end up with invalid json.

* Add changelog

* Remove leftover print

* No need for too-many-statements disable
2025-05-29 09:51:38 +02:00
7bd0895d01 botocore: add dict type check before parsing tool_use from Bedrock messages (#3548)
Amazon Bedrock tool use extraction logic doesn't agree with som of the use cases (conversation construction), such as the case with pre-created assistant message: 

'messages': [{"role": "user", "content": "Placeholder text."}, {"role": "assistant", "content": "{"}],

This PR addresses this by adding a dict type check on the message content before attempting to get the value of `tool_use`from the content.
2025-05-28 14:17:33 +02:00
a912c9e57c feat(instrumentation-aiohttp-client): Add support for HTTP metrics (#3517)
* Add metrics support

* Update instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/__init__.py

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

* Update instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/__init__.py

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

* Update instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/__init__.py

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

* Adding tests, updating changelog

* Adding server address and port to both spans and metrics

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-05-27 20:41:00 +00:00
75c73d1e29 refactor aws lambda span (#3541)
* refactor: migrate http_attributes from SpanAttributes to new semantic conventions and refactor tests

* fix precommit linting

* refactor aws lambda to use new semantics

* refactor tests

* update resourceattributes to cloud attrs

* update main for attrs
2025-05-27 20:30:47 +00:00
a164d37a3c Chore: Drop support for Python 3.8 (#3399)
Python 3.8 was EoL @ 2024-10-07, our 6 month promise for support ended on 2024-04-07.

Changes:
* Updated basline refs to 3.9
* Removed 3.8 sys.version_info checks
* Fixed botocore test failure
* Applied ruff formatting
2025-05-27 17:26:02 +02:00
e2ba6d43c0 starlette: Remove maximum version constraint (#3456)
* ISSUE-3317: Remove maximum version constraint on starlette, by fixing unit tests. Fixed some warnings in unit tests.

* Updae changelog

* Implement code review remarks: update starlette dependencies in bootstrap/test-requirements. Use setUp/tearDown iso decorator on test class

* Increase minimal version of starlette to 0.37.2 to have functional 'oldest' tests.

* add uv.lock

* Revert "add uv.lock"

This reverts commit 08df2bee1ebe6943bcb6c2a66bd1b903f1fa0cde.

* Prevent massive changes of uv.lock due to newer uv which adds upload-time keyword

* Update test-requirements.in file of starlette instrumentation

* fixes

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

* fix tests

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

* increase delta

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

* using same delta as fastapi

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

* commit uv.lock back

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

* Update CHANGELOG.md

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>

* Update CHANGELOG.md

---------

Signed-off-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: emdneto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-05-23 12:22:31 +00:00
4e42ed674a refactor(boto): replace uses of SpanAttributes with opentelemetry.semconv.attributes (#3538)
* refactor: migrate http_attributes from SpanAttributes to new semantic conventions and refactor tests

* fix precommit linting

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-05-23 08:55:13 +00:00
72f437c456 opentelemetry-instrumentation-system-metrics: fix running on Google Cloud Run (#3533)
* opentelemetry-instrumentation-system-metrics: fix running on Google Cloud Run

psutil fails reading context switches fails on Google Cloud Run, so
before setting up the observable counter trying to read the values check
we are actually being able to do so.

* Please pylint
2025-05-23 08:45:33 +00:00
93353660f6 opentelemetry-instrumentation-urllib3: add explicit http duration buckets for stable semconv (#3518)
* opentelemetry-instrumentation-urllib3: add explicit http duration buckets for stable semconv

* Add Changelog

* Update CHANGELOG.md

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
2025-05-23 08:42:18 +00:00
1953d97958 opentelemetry-instrumentation-urllib: add explicit http duration buckets for stable semconv (#3519)
* opentelemetry-instrumentation-urllib: add explicit http duration buckets for stable semconv

* Update CHANGELOG.md

---------

Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
2025-05-23 08:38:15 +00:00
df275921a9 Ensure spans complete on early stream closure for Bedrock Streaming APIs (#3481)
* Ensure spans end on early stream closure for Bedrock Streaming APIs

* Add changelog

* End span only if it's still recording in stream done callbacks. Assert that span status is unset.

* Extract response output and stream content into helper functions

* Update changelog after 1.33.0 release

* Keep track of bedrock stream ending and close spans accordingly

* Move stream output checks to a single method

* Update CHANGELOG.md

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
2025-05-23 08:33:00 +00:00
c1a689507b Refactor redis instrumentation to use semconv incubating attributes (#3534)
* Replaced usage of opentelemetry.semconv.trace with opentelemetry.semconv._incubating.attributes.

* Fixed ruff failure
2025-05-23 08:27:14 +00:00
b3f98ab936 Replaced usage of SpanAttributes with opentelemetry.semconv._incubating.attributes. (#3535) 2025-05-23 08:13:09 +00:00