apm-agent-python icon indicating copy to clipboard operation
apm-agent-python copied to clipboard

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

Open kruskall opened this issue 2 years ago • 1 comments

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

kruskall avatar Aug 03 '23 21:08 kruskall

Thanks for the report, we'll investigate.

basepi avatar Aug 08 '23 22:08 basepi