Skip to content

Commit 0fa915b

Browse files
authored
Merge branch 'main' into add_redis_client_only_instrumentation
2 parents 533b8a1 + 6114b60 commit 0fa915b

File tree

18 files changed

+4412
-54
lines changed

18 files changed

+4412
-54
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
([#3266](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3266))
2626
- `opentelemetry-instrumentation-botocore` Add support for GenAI choice events
2727
([#3275](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3275))
28+
- `opentelemetry-instrumentation-botocore` Add support for GenAI tool events
29+
([#3302](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3302))
2830
- `opentelemetry-instrumentation` make it simpler to initialize auto-instrumentation programmatically
2931
([#3273](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3273))
32+
- Add `opentelemetry-instrumentation-vertexai>=2.0b0` to `opentelemetry-bootstrap`
33+
([#3307](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3307))
34+
3035

3136
### Fixed
3237

instrumentation-genai/opentelemetry-instrumentation-vertexai/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10-
## Version 2.0b0 (2025-02-21)
10+
## Version 2.0b0 (2025-02-24)
1111

1212
- Added Vertex AI spans for request parameters
1313
([#3192](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3192))

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

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,29 @@
2222
2323
.. code:: python
2424
25+
import asyncio
2526
import aiohttp
2627
from opentelemetry.instrumentation.aiohttp_client import create_trace_config
2728
import yarl
2829
2930
def strip_query_params(url: yarl.URL) -> str:
3031
return str(url.with_query(None))
3132
32-
async with aiohttp.ClientSession(trace_configs=[create_trace_config(
33+
async def get(url):
34+
async with aiohttp.ClientSession(trace_configs=[create_trace_config(
3335
# Remove all query params from the URL attribute on the span.
3436
url_filter=strip_query_params,
35-
)]) as session:
36-
async with session.get(url) as response:
37-
await response.text()
37+
)]) as session:
38+
async with session.get(url) as response:
39+
await response.text()
40+
41+
asyncio.run(get("https://example.com"))
3842
3943
Instrumenting all client sessions:
4044
4145
.. code:: python
4246
47+
import asyncio
4348
import aiohttp
4449
from opentelemetry.instrumentation.aiohttp_client import (
4550
AioHttpClientInstrumentor
@@ -49,9 +54,12 @@ def strip_query_params(url: yarl.URL) -> str:
4954
AioHttpClientInstrumentor().instrument()
5055
5156
# Create a session and make an HTTP get request
52-
async with aiohttp.ClientSession() as session:
53-
async with session.get(url) as response:
54-
await response.text()
57+
async def get(url):
58+
async with aiohttp.ClientSession() as session:
59+
async with session.get(url) as response:
60+
await response.text()
61+
62+
asyncio.run(get("https://example.com"))
5563
5664
Configuration
5765
-------------

instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/bedrock.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ def before_service_call(
248248
messages = self._get_request_messages()
249249
for message in messages:
250250
event_logger = instrumentor_context.event_logger
251-
event_logger.emit(message_to_event(message, capture_content))
251+
for event in message_to_event(message, capture_content):
252+
event_logger.emit(event)
252253

253254
if not span.is_recording():
254255
return

0 commit comments

Comments
 (0)