elastic / elastic/apm-agent-python

decode error when sending span.context.destination.port as string

Abierto
#1,885 1 comentario 0 reacciones 0 asignados Ver en GitHub
8.12-candidate agent-python bug
Lenguaje dominante
Python
Estrellas
431
Forks
239
Merge medio
5 d 10 h
PR fusionados (30 d)
7

Descripción

**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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

No se identifica ningún archivo fuente ni ninguna prueba. Empieza rastreando cómo el Python agent serializa span.context.destination.port en la versión 6.18.0; después, compara el payload emitido con la especificación e investiga un caso reproducible para los datos ECS indicados. Se considera terminado cuando se emiten valores de puerto numéricos y una prueba de regresión cubre el fallo.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
observability-sre
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.