Ensure tag values are strings
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 42/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- observability
Línea de trabajo
Localiza los métodos set_tag del SDK de Python en Scope, Span y cualquier otro punto de entrada relevante; después, inspecciona cómo se almacenan sus valores y se serializan en envelopes. Añade cobertura para casos de cadenas, no cadenas y fallos de conversión. Se considera terminado cuando los valores de las etiquetas cumplen el requisito de la carga útil del evento y las conversiones fallidas no establecen ninguna etiqueta.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Tag values must be strings; however, the Python SDK's methods for setting tags (set_tag on the Scope, on Span, and perhaps elsewhere) are defined as taking type Any for the value, and we do not convert the value to a string before setting the tag.
While this appears to not be a problem for most users (likely our transport handles non-string-valued tags), it becomes a problem for users who wish to serialize the envelopes to send them with another service, like Sentry CLI. Since our spec requires tags to have string values, other services, in particular Sentry CLI, will refuse to accept envelopes created by the Python SDK when they contain a tag with a non-string value. See for example the issue CLI-80 (GitHub getsentry/sentry-cli#2505), which is caused by the Python SDK setting a non-string-valued tag.
My proposed solution is to modify all of our set_tag functions to convert all values to strings before setting them on the tag. If the conversion fails, we don't set the tag.
(Follow up from https://github.com/getsentry/sentry-python/issues/4391 which was done on the potel-base branch)
- Lenguaje dominante
- Python
- Estrellas
- 2.2k
- Forks
- 672
- Merge medio
- 22 h 47 min
- PR fusionados (30 d)
- 224
Guía de contribución
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 getsentry/sentry-python
-
Python
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
getsentry/sentry-python#7569 · 1 comentario ·
-
Python
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
getsentry/sentry-python#7568 · 2 comentarios ·
-
Python
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
getsentry/sentry-python#7567 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsentry/sentry-python#7543 · 2 comentarios · 1 asignado ·
-
Python
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
getsentry/sentry-python#6992 · 1 comentario ·
Todos los issues de getsentry/sentry-python
Issues similares
-
essnmx good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
-
[Feature] 奇物选择添加优先级 Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
syfoud/Simulated_Scepter#174 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Giskard-AI/giskard-oss#2840 · 1 comentario ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Abiertoarea: repo bug perceived difficulty: 2
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
yeti-platform/yeti#1380 ·