Skip to content

Commit b483bd0

Browse files
dependabot[bot]cursoragenthassiebp
authored
chore(deps): bump opentelemetry-api from 1.45.0 to 1.45.1 (#2054)
* chore(deps): bump opentelemetry-api from 1.45.0 to 1.45.1 Bumps [opentelemetry-api](https://github.com/open-telemetry/opentelemetry-python) from 1.45.0 to 1.45.1. - [Release notes](https://github.com/open-telemetry/opentelemetry-python/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python/blob/main/CHANGELOG.md) - [Commits](open-telemetry/opentelemetry-python@v1.45.0...v1.45.1) --- updated-dependencies: - dependency-name: opentelemetry-api dependency-version: 1.45.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * fix(otel): type SDK attribute mappings for opentelemetry 1.45.1 Co-authored-by: hassieb.pakzad <hassieb.pakzad@clickhouse.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: hassieb.pakzad <hassieb.pakzad@clickhouse.com> Co-authored-by: Hassieb Pakzad <68423100+hassiebp@users.noreply.github.com>
1 parent 6d93728 commit b483bd0

2 files changed

Lines changed: 28 additions & 17 deletions

File tree

‎langfuse/_client/span_exporter.py‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult:
112112
span,
113113
self._process_media_attributes(
114114
span=span,
115-
attributes=dict(span.attributes or {}),
115+
attributes=_attributes_dict(span.attributes),
116116
),
117117
)
118118
for span in spans
@@ -574,10 +574,21 @@ def _create_otel_span_data(
574574
if instrumentation_scope
575575
else None,
576576
attributes=MappingProxyType(dict(attributes)),
577-
resource_attributes=MappingProxyType(dict(span.resource.attributes or {})),
577+
resource_attributes=MappingProxyType(
578+
_attributes_dict(span.resource.attributes)
579+
),
578580
)
579581

580582

583+
def _attributes_dict(
584+
attributes: Optional[MappingCollection[str, Any]],
585+
) -> Dict[str, AttributeValue]:
586+
# The SDK types attribute values as the recursive ``AnyValue``, which also
587+
# allows bytes, mappings and None. The exporter passes such values through
588+
# unchanged, so they are treated as opaque ``AttributeValue``s here.
589+
return cast(Dict[str, AttributeValue], dict(attributes or {}))
590+
591+
581592
def _clean_attribute_value(*, key: str, value: Any) -> Optional[AttributeValue]:
582593
cleaned_attributes = BoundedAttributes(maxlen=1, immutable=False)
583594

‎uv.lock‎

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)