elastic / elastic/apm-agent-python

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

オープン
#1,885 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
8.12-candidate agent-python bug
主要言語
Python
スター
431
フォーク
239
平均マージ
5日 10時間
マージ済み PR(30日)
7

説明

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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

ソースファイルもテストも特定されていません。まず、Python agent がバージョン 6.18.0 で span.context.destination.port をどのようにシリアライズするかを追跡し、次に出力された payload を仕様と比較して、報告された ECS データについて再現可能なケースを調査してください。数値のポート値が出力され、回帰テストでこの不具合がカバーされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
observability-sre
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。