Ensure tag values are strings
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- observability
Direzione di ricerca
Individua i metodi set_tag dell'SDK Python su Scope, Span e qualsiasi altro punto di ingresso rilevante, quindi esamina come vengono memorizzati i relativi valori e come vengono serializzati negli envelopes. Aggiungi la copertura per i casi di stringhe, non stringhe e conversioni fallite. Il lavoro è completato quando i valori dei tag sono conformi al requisito del payload dell'evento e le conversioni fallite non impostano alcun tag.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- Python
- Stelle
- 2.2k
- Fork
- 672
- Merge medio
- 22h 47m
- PR unite (30g)
- 224
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di getsentry/sentry-python
-
Python
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
getsentry/sentry-python#7569 · 1 commento ·
-
Python
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
getsentry/sentry-python#7568 · 2 commenti ·
-
Python
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
getsentry/sentry-python#7567 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
getsentry/sentry-python#7543 · 2 commenti · 1 assegnatario ·
-
Python
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
getsentry/sentry-python#6992 · 1 commento ·
Tutte le issue di getsentry/sentry-python
Issue simili
-
essnmx good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
-
[Feature] 奇物选择添加优先级 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Giskard-AI/giskard-oss#2840 · 1 commento ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Apertaarea: repo bug perceived difficulty: 2
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
yeti-platform/yeti#1380 ·