如何将生成的跟踪发送到OpenTelemetry收集器?

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

How to send traces generated to OpenTelemetry collector?

问题

我已经在代码中添加了追踪功能,并将其打印到终端上。现在,我该如何在OpenTelemetry Collector中接收这些追踪信息,并将其导出到NewRelic?使用的语言是Golang。

英文:

I have instrumented the code to generate traces and print them in the terminal. Now, how do I receive them in OpenTelemetry Collector to export them to NewRelic? Language used: Golang

答案1

得分: 0

我也对OpenTelemetry不太熟悉,但也许这个链接会有帮助。请查看"Local"部分,你会在那里找到opentelemetry-collector-contrib仓库的链接,在examples/demo/client目录下可以找到一个示例。

英文:

I'm also new to OpenTelemetry, but maybe this link would be useful. Checkout the "Local" section. There you will find the link to opentelemetry-collector-contrib repository, where in examples/demo/client you can find an example.

答案2

得分: 0

根据New Relic文档,你可以在Go代码中简单地配置OTLP gRPC导出器,使用https://otlp.nr-data.net作为端点,并在标头中添加API密钥。

或者,你可以使用作为单独服务运行的Opentelemetry收集器,将数据导出到NewRelic。示例配置

英文:

As per the New Relic Docs you can simply configure the OTLP gRPC exporter in Go code with https://otlp.nr-data.net as endpoint. Also API Key in header.

Or

You can use an Opentelemetry collector running as a separate service with NewRelic as exporter. sample config

huangapple
  • 本文由 发表于 2022年7月4日 09:18:14
  • 转载请务必保留本文链接:https://go.coder-hub.com/72850939.html
匿名

发表评论

匿名网友

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

确定