• /
  • ログイン
  • 無料アカウント

OpenTelemetry quick start

OpenTelemetry is a flexible toolkit that you can implement in a variety of ways. We recommend a basic four-step approach for setting up OpenTelemetry with New Relic. Here's an overview of the process, followed by details for each step.

  1. Prerequisites
  2. Instrument your service with OpenTelemetry
  3. Export your telemetry data to New Relic
  4. View your data in the New Relic UI

Step 1. Prerequisites

First things first:

Step 2. Instrument your service with OpenTelemetry

To get started, you instrument your service with OpenTelemetry. OpenTelemetry has language-specific products and SDKs to help you. Many languages offer out-the-box instrumentation for common libraries and frameworks. Each language also provides an API for further instrumenting your service manually.

Go to the repository for your language and follow the instructions to instrument your service. When you're done, return here to complete Step 3. Export your telemetry data to New Relic.

Step 3. Export your telemetry data to New Relic

The OpenTelemetry Protocol, or OTLP for short, is a general purpose telemetry data delivery protocol designed for the OpenTelemetry project. This protocol describes how to encode and transmit telemetry data, which makes it a natural choice for data transport. Each language SDK provides an OTLP exporter you can configure to export data over OTLP.

In this step, we focus on how to configure an OTLP exporter in your service to export data directly to New Relic. If you prefer to export your data first to an OpenTelemetry collector, we have separate instructions.

Diagram showing OpenTelemetry using New Relic's OTLP endpoint.

Here's an example of sending data from your service directly to New Relic.

To complete this third step, first familiarize yourself with some required New Relic settings, and then complete the steps in the OTLP exporter documentation for your language.

Review New Relic settings for exports

Before you go to the external OTLP exporter documentation, consult the table below so you're ready to do the following:

  • Configure the OTLP exporter to add a header ( api-key ) whose value is your account license key.
  • Based on your region, configure the endpoint where the exporter sends data to New Relic.

Region

gRPC

HTTP/1.1

Endpoint

API Header Name

API Header Value

TLS encryption required

US

https://otlp.nr-data.net:4317

api-key

License Key

EU

https://otlp.eu01.nr-data.net:4317

api-key

License Key

If you have FedRamp compliance constraints, see FedRAMP-compliant endpoints.

重要

In Node.js, the opentelemetry-collector-grpc library requires additional options to enable TLS.

Complete the export configuration steps

Click on the link below for your language and complete the configuration steps. When you're done, return here to complete Step 4. View your data in the New Relic UI.

Step 4. View your data in the New Relic UI

Once you’ve instrumented your service and configured it to export its data to New Relic, watch the New Relic One user interface for your traces, metrics, and logs!

The UI for OpenTelemetry has some similarities to the APM agent UI, so if you are familiar with that, you can go right to the UI. If you need help understanding your OpenTelemetry UI options or how to make sure your data appears in the UI, see View your OpenTelemetry data in New Relic.

What's next?

After you do your initial setup, check out our best-practices guide for tips about various configurations to improve your use of OpenTelemetry and New Relic.

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.