简体   繁体   English

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

[英]How to send traces generated to OpenTelemetry collector?

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?现在,我如何在 OpenTelemetry Collector 中接收它们以将它们导出到 NewRelic? Language used: Golang使用语言:Golang

I'm also new to OpenTelemetry, but maybe this link would be useful.我也是 OpenTelemetry 的新手,但也许 这个链接会很有用。 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.在那里,您将找到 opentelemetry-collector-contrib 存储库的链接,在示例/演示/客户端中您可以找到一个示例。

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.根据New Relic Docs ,您可以简单地在 Go 代码中配置OTLP gRPC 导出器,并将https://otlp.nr-data.net作为端点。 Also API Key in header.也是标头中的 API 密钥。

Or或者

You can use an Opentelemetry collector running as a separate service with NewRelic as exporter.您可以使用作为单独服务运行的 Opentelemetry 收集器,并将 NewRelic 作为导出器。 sample config 示例配置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM