1.45.0's stop-decoding-bytes-attributes change silently breaks downstream instrumentation that relied on the old coercion
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 1/5
- Tiempo estimado
- Menos de una hora
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Documentación
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- observability
Línea de trabajo
Comienza con la entrada del changelog de la versión 1.45.0 y comprueba dónde se mantienen las notas de migración. Documenta que los atributos cuyo valor es bytes ahora siguen siendo bytes y pueden aparecer como AnyValue.bytes_value en lugar de como cadenas JSON decodificadas, y enlaza el issue relacionado de LangSmith como criterio de finalización.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Not a bug report — flagging a compatibility edge the 1.45.0 changelog entry
didn't call out, in case it's worth a line in the migration notes for anyone
who greps for it later.
If a
bytestype is set as an attribute value in the SDK, it will no longer
be utf-8 decoded to a string, instead it will be passed along as is in
accordance with the OTEL spec.
Before 1.45.0, Span.set_attribute(key, some_bytes) silently coerced
some_bytes to str via utf-8 decode. After 1.45.0, the same call now
exports AnyValue.bytes_value on the wire. That's the documented, correct,
spec-compliant behaviour, and I'm not asking for it to change.
What I ran into: at least one popular instrumentation library
(langchain-ai/langsmith-sdk's OTel exporter — reported separately, langchain-ai/langsmith-sdk#3602)
has, across every version I checked, called set_attribute with a bytes
value for its main prompt/completion payload, apparently unintentionally,
relying on the old SDK behaviour to turn it back into readable text. Upgrading
only opentelemetry-sdk/opentelemetry-api (no code change, no langsmith
version change) silently turned every one of those attributes from a JSON
string into an opaque binary blob for anyone reading the exported traces —
no error, no warning, same span count, same attribute keys, just a different
wire type carrying the same bytes.
Nothing to fix here since the change is correct per spec, and it's the
instrumentation library's bug for passing bytes when it meant str. Just
noting it in case it's useful to link from the 1.45.0 changelog entry or the
migration guide, since this specific failure mode (payload silently becomes
unreadable, no exception anywhere) seems like exactly the kind of thing that's
hard for an instrumentation-library author to notice in their own tests if
they only assert on in/substring checks against the in-memory exporter
rather than the attribute's actual type.
- Lenguaje dominante
- Python
- Estrellas
- 2.6k
- Forks
- 1k
- Merge medio
- 5 d 7 h
- PR fusionados (30 d)
- 27
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de open-telemetry/opentelemetry-python
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
open-telemetry/opentelemetry-python#5695 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
open-telemetry/opentelemetry-python#5661 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
open-telemetry/opentelemetry-python#5638 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
open-telemetry/opentelemetry-python#5624 ·
Los mantenedores suelen responder en 2 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
open-telemetry/opentelemetry-python#5574 · 1 comentario ·
Los mantenedores suelen responder en 2 días
Todos los issues de open-telemetry/opentelemetry-python
Issues similares
-
Claiming namespace `apoint`Abiertonamespace operations
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
EclipseFdn/open-vsx.org#13573 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
collective/icalendar#1854 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
rancher/rancher-ai-agent#412 ·
Los mantenedores suelen responder en 6 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
TUDelftGeodesy/DePSI#134 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
HenriquesLab/rxiv-maker#335 ·