Skip to content

Commit b3e3a9e

Browse files
committed
Merge branch 'main' into genai-utils-metrics
2 parents 8253692 + 3b97e36 commit b3e3a9e

File tree

110 files changed

+27274
-3885
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+27274
-3885
lines changed

.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def get_contrib_job_datas(tox_envs: list) -> list:
143143

144144
contrib_job_datas.append(
145145
{
146-
"ui_name": (f"{groups['name']}" f"{contrib_requirements}"),
146+
"ui_name": (f"{groups['name']}{contrib_requirements}"),
147147
"tox_env": tox_env,
148148
}
149149
)

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
33
# Ruff version.
4-
rev: v0.6.9
4+
rev: v0.14.1
55
hooks:
66
# Run the linter.
77
- id: ruff

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
1212
## Unreleased
1313

14+
### Added
15+
16+
- `opentelemetry-instrumentation-aiohttp-client`: add support for url exclusions via `OTEL_PYTHON_EXCLUDED_URLS` / `OTEL_PYTHON_AIOHTTP_CLIENT_EXCLUDED_URLS`
17+
([#3850](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3850))
18+
- `opentelemetry-instrumentation-httpx`: add support for url exclusions via `OTEL_PYTHON_EXCLUDED_URLS` / `OTEL_PYTHON_HTTPX_EXCLUDED_URLS`
19+
([#3837](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3837))
20+
- `opentelemetry-instrumentation-flask`: improve readthedocs for sqlcommenter configuration.
21+
([#3883](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3883))
22+
- `opentelemetry-instrumentation-sqlalchemy`: improve readthedocs for sqlcommenter configuration.
23+
([#3886](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3886))
24+
- `opentelemetry-instrumentation-mysql`, `opentelemetry-instrumentation-mysqlclient`, `opentelemetry-instrumentation-pymysql`: improve readthedocs for sqlcommenter configuration.
25+
([#3885](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3885))
26+
- `opentelemetry-instrumentation-django`: improve readthedocs for sqlcommenter configuration.
27+
([#3884](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3884))
28+
- `opentelemetry-instrumentation-aiohttp-server`: add support for custom header captures via `OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST` and `OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE`
29+
([#3916](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3916))
30+
31+
### Fixed
32+
33+
- `opentelemetry-instrumentation-botocore`: bedrock: only decode JSON input buffer in Anthropic Claude streaming
34+
([#3875](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3875))
35+
- `opentelemetry-instrumentation-aiohttp-client`, `opentelemetry-instrumentation-aiohttp-server`: Fix readme links and text
36+
([#3902](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3902))
37+
- `opentelemetry-instrumentation-aws-lambda`: Fix ImportError with slash-delimited handler paths
38+
([#3894](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3894))
39+
- `opentelemetry-exporter-richconsole`: Prevent deadlock when parent span is not part of the batch
40+
([#3900](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3900))
41+
- `opentelemetry-instrumentation-psycopg2`, `opentelemetry-instrumentation-psycopg`: improve readthedocs for sqlcommenter configuration.
42+
([#3882](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3882))
43+
- `opentelemetry-instrumentation-aiohttp-server`: delay initialization of tracer, meter and excluded urls to instrumentation for testability
44+
([#3836](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3836))
45+
- Replace Python 3.14-deprecated `asyncio.iscoroutinefunction` with `inspect.iscoroutinefunction`.
46+
([#3880](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3880))
47+
- `opentelemetry-instrumentation-elasticsearch`: Enhance elasticsearch query body sanitization
48+
([#3919](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3919))
49+
- `opentelemetry-instrumentation-pymongo`: Fix span error descriptions
50+
([#3904](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3904))
51+
- build: bump ruff to 0.14.1
52+
([#3842](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3842))
53+
1454
## Version 1.38.0/0.59b0 (2025-10-16)
1555

1656
### Fixed

dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ ruamel.yaml==0.17.21
1515
flaky==3.7.0
1616
pre-commit==3.7.0; python_version >= '3.9'
1717
pre-commit==3.5.0; python_version < '3.9'
18-
ruff==0.6.9
18+
ruff==0.14.1

exporter/opentelemetry-exporter-prometheus-remote-write/tests/test_prometheus_remote_write_exporter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ def test_parse_metric(metric, prom_rw):
122122
"bool_value": True,
123123
}
124124

125-
assert (
126-
len(metric.data.data_points) == 1
127-
), "We can only support a single datapoint in tests"
125+
assert len(metric.data.data_points) == 1, (
126+
"We can only support a single datapoint in tests"
127+
)
128128
series = prom_rw._parse_metric(metric, tuple(attributes.items()))
129129
timestamp = metric.data.data_points[0].time_unix_nano // 1_000_000
130130
for single_series in series:

exporter/opentelemetry-exporter-richconsole/src/opentelemetry/exporter/richconsole/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,17 @@ def spans_to_tree(spans: typing.Sequence[ReadableSpan]) -> Dict[str, Tree]:
173173
trees = {}
174174
parents = {}
175175
spans = list(spans)
176+
span_ids = {s.context.span_id for s in spans}
176177
while spans:
177178
for span in spans:
178-
if not span.parent:
179+
if not span.parent or span.parent.span_id not in span_ids:
179180
trace_id = opentelemetry.trace.format_trace_id(
180181
span.context.trace_id
181182
)
182-
trees[trace_id] = Tree(label=f"Trace {trace_id}")
183-
child = trees[trace_id].add(
183+
tree = trees.setdefault(
184+
trace_id, Tree(label=f"Trace {trace_id}")
185+
)
186+
child = tree.add(
184187
label=Text.from_markup(
185188
f"[blue][{_ns_to_time(span.start_time)}][/blue] [bold]{span.name}[/bold], span {opentelemetry.trace.format_span_id(span.context.span_id)}"
186189
)

exporter/opentelemetry-exporter-richconsole/test-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pluggy==1.5.0
99
py-cpuinfo==9.0.0
1010
Pygments==2.17.2
1111
pytest==7.4.4
12+
pytest-timeout==2.3.1
1213
rich==13.7.1
1314
tomli==2.0.1
1415
typing_extensions==4.12.2

exporter/opentelemetry-exporter-richconsole/tests/test_rich_exporter.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,15 @@ def test_multiple_traces(tracer_provider):
9696
parent_2.name in child.label
9797
for child in trees[traceid_1].children[0].children
9898
)
99+
100+
101+
@pytest.mark.timeout(30)
102+
def test_no_deadlock(tracer_provider):
103+
# non-regression test for https://github.com/open-telemetry/opentelemetry-python-contrib/issues/3254
104+
105+
tracer = tracer_provider.get_tracer(__name__)
106+
with tracer.start_as_current_span("parent"):
107+
with tracer.start_as_current_span("child") as child:
108+
pass
109+
110+
RichConsoleSpanExporter.spans_to_tree((child,))

gen-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
astor==0.8.1
33
jinja2==3.1.6
44
markupsafe==2.0.1
5-
ruff==0.6.9
5+
ruff==0.14.1
66
requests
77
tomli
88
tomli_w

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10+
- Ensure log event is written and completion hook is called even when model call results in exception. Put new
11+
log event (` gen_ai.client.inference.operation.details`) behind the flag `OTEL_SEMCONV_STABILITY_OPT_IN=gen_ai_latest_experimental`.
12+
Ensure same sem conv attributes are on the log and span. Fix an issue where the instrumentation would crash when a pydantic.BaseModel class was passed as the response schema ([#3905](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3905)).
13+
1014
## Version 0.4b0 (2025-10-16)
1115

1216
- Implement the new semantic convention changes made in https://github.com/open-telemetry/semantic-conventions/pull/2179.

0 commit comments

Comments
 (0)