OpenTelemetry AWS XRay UDP(用户数据报协议)

huangapple go评论93阅读模式
英文:

OpenTelemetry AWS XRay UDP

问题

我正在尝试将数据写入awsxrayreceiver。数据来自跟踪段。

以下是我所做的步骤:

  • 获取跟踪摘要
  • 使用跟踪摘要中的跟踪ID进行批量获取跟踪
  • 将跟踪段文档转换为[]byte并发送

但是在发送数据时遇到了一些错误。UDP端口已经可访问。

{"kind": "receiver", "name": "awsxray", "pipeline": "traces", "error": "无法将传入数据拆分为头部和段,传入字节:[88]"}
{"kind": "receiver", "name": "awsxray", "pipeline": "traces", "error": "从UDP套接字读取:读取udp [::]:2000:使用已关闭的网络连接"}

甚至尝试检查连接是否成功。

nc -vzu ip_address 2000

结果:连接到ip_address的2000端口 [udp/*] 成功!

我所做的有什么问题吗?

英文:

I'm trying to write data to the awsxrayreceiver. The data is from the trace segment.

Here are the steps that I did:

  • Getting the trace summaries
  • Using the trace IDs from the trace summary to do the batch get traces
  • Sending the trace segment document by converting it to a []byte

But I'm getting some errors when sending data. The UDP port is already accessible.

{"kind": "receiver", "name": "awsxray", "pipeline": "traces", "error": "unable to split incoming data as header and segment, incoming bytes: [88]"}
{"kind": "receiver", "name": "awsxray", "pipeline": "traces", "error": "read from UDP socket: read udp [::]:2000: use of closed network connection"}

Even tried to check if the connection will succeed.

nc -vzu ip_address 2000

Result: Connection to ip_address 2000 port [udp/*] succeeded!

Is there something wrong with what I'm doing?

答案1

得分: 1

第一个问题可能是由于缺少分隔符字符而导致的头部和正文分割错误。错误来自于这个函数,它使用换行符作为分隔符来分割X-Ray段的头部和正文。看起来错误可能是由于发送到X-Ray接收器的数据格式不正确(请参见这些测试的示例)。

第二个错误是在从UDP轮询器读取时可能发生的网络错误。这个问题可能有多个原因,但是请确保连接没有在所有数据发送到接收器之前被提前关闭。

英文:

The first issue is likely due to an error occurring while splitting the header and body due to a missing separator character. The error is coming from this function that separates the X-Ray segment header and body using a newline character as the separator. It seems the error may be caused by incorrectly formatted data being sent to the X-Ray receiver (see these tests for an example).

The second error is a network error that can occur while reading from the UDP poller. There may be multiple reasons behind this issue, but perhaps ensure that the connection is not being closed early or before all the data is sent to the receiver.

huangapple
  • 本文由 发表于 2022年10月18日 18:26:45
  • 转载请务必保留本文链接:https://go.coder-hub.com/74109434.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定