Skip to content

Commit 1cfef5f

Browse files
authored
Merge branch 'main' into toshok/span-status-requires-str-description
2 parents 859d1f4 + 4f89e75 commit 1cfef5f

File tree

33 files changed

+394
-279
lines changed

33 files changed

+394
-279
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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4646
([#3919](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3919))
4747
- `opentelemetry-instrumentation-pymongo`: Fix span error descriptions
4848
([#3904](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3904))
49+
- build: bump ruff to 0.14.1
50+
([#3842](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3842))
4951

5052
## Version 1.38.0/0.59b0 (2025-10-16)
5153

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:

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: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## Unreleased
99

10-
- Minor change to check LRU cache in Completion Hook before acquiring semaphore/thread ([#3907](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3907)).
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)).
1113

1214
## Version 0.4b0 (2025-10-16)
1315

instrumentation-genai/opentelemetry-instrumentation-google-genai/src/opentelemetry/instrumentation/google_genai/dict_util.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ def _flatten_compound_value_using_json(
151151
)
152152

153153

154-
def _flatten_compound_value(
154+
def _flatten_compound_value( # pylint: disable=too-many-return-statements
155155
key: str,
156156
value: Any,
157157
exclude_keys: Set[str],
@@ -189,13 +189,16 @@ def _flatten_compound_value(
189189
flatten_functions=flatten_functions,
190190
)
191191
if hasattr(value, "model_dump"):
192-
return _flatten_dict(
193-
value.model_dump(),
194-
key_prefix=key,
195-
exclude_keys=exclude_keys,
196-
rename_keys=rename_keys,
197-
flatten_functions=flatten_functions,
198-
)
192+
try:
193+
return _flatten_dict(
194+
value.model_dump(),
195+
key_prefix=key,
196+
exclude_keys=exclude_keys,
197+
rename_keys=rename_keys,
198+
flatten_functions=flatten_functions,
199+
)
200+
except TypeError:
201+
return {key: str(value)}
199202
return _flatten_compound_value_using_json(
200203
key,
201204
value,

0 commit comments

Comments
 (0)