elastic / elastic/apm-agent-python
decode error when sending span.context.destination.port as string
Personne n'a encore pris cette issue.
- Langage dominant
- Python
- Étoiles
- 431
- Forks
- 239
- Merge moyen
- 5 j 10 h
- PR mergées (30 j)
- 7
Description
**Describe the bug**:
According to the specification, span.context.destination.port must be a number.
As part of the ops KPI review we've been investigating the following errors in ecs logs:
```
decode error: data read error: v2.spanRoot.Span: v2.span.Context: v2.spanContext.Destination: v2.spanContextDestination.Port: readUint64: unexpected character: �, error found in #10 byte of ...| "port": "9243", "se|..., bigger context ...|redacted", "port": "9243", "service": {"resource": "elasticsearch/aaaa|...
```
```
decode error: data read error: v2.spanRoot.Span: v2.span.Context: v2.spanContext.Destination: v2.spanContextDestination.Port: readUint64: unexpected character: �, error found in #10 byte of ...| "port": "9|..., bigger context ...|: "redacted", "port": "9|...
```
`"port": "9243"` is not valid format and the apm-server will fail to ingest those transactions.
**To Reproduce**
I don't have steps to reproduce, this is part of the ops KPI review and was observed in the ecs logs.
**Environment (please complete the following information)**
Most of the errors are coming from the following user agent: apm-agent-python/6.18.0
This happens on multiple apm-server versions. Both 7.x and 8.x, including the latest 8.9.0.
**Additional context**
none
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Aucun fichier source ni test n’est identifié. Commencez par retracer la manière dont le Python agent sérialise span.context.destination.port dans la version 6.18.0, puis comparez le payload émis à la spécification et recherchez un cas reproductible pour les données ECS signalées. Le travail est terminé lorsque des valeurs de port numériques sont émises et qu’un test de régression couvre le problème.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- observability-sre
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 30/100