• 로그인무료 계정

Set up the trace observer

If you are following the steps to set up distributed tracing and are continuing with the steps for the advanced option called Infinite Tracing, you need to set up a trace observer. The trace observer is an AWS-based service for Infinite Tracing that provides you with a low-latency and low-cost way to send your telemetry data to New Relic. As it receives your tracing data, the trace observer uses tail-based sampling to decide what to keep and send to New Relic.

Complete the trace observer setup up that fits your types of data sources (services, apps, or entities). You may need to do steps in more than one section if you have a variety of types:

Do some of your requests communicate with services that are still using standard distributed tracing? To avoid configuration conflicts, you should ideally enable Infinite Tracing for all associated services.

Services instrumented with APM agents and third-party telemetry tools

To create a new trace observer if you're using New Relic APM agents or third-party integrations:

  1. Go to one.newrelic.com and click Apps, and then under Your apps, click New Relic Edge.

  2. Select an account in the upper-left dropdown. If you have access to multiple accounts, make sure you're in the account where you want Infinite Tracing enabled. If you can't add an observer, it's likely because we allow only one observer per region, per account family.

  3. If no trace observers are already present, click New trace observer to add one, fill out the information, and click Create. Note that we offer the following regions:

    • us-east-1 (US)
    • us-west-2 (US)
    • eu-central-1 (EU): Select this region if you are collecting data from EU requests and you have an EU-based New Relic account that reports in EU data centers.
    • eu-west-1 (US): Select this region if you are collecting data from EU requests and you have a US-based New Relic account that reports in US data centers.
    • ap-southeast-1 (US)
    • ap-southeast-2 (US)
    • us-east-2 (US, FedRAMP)
  4. Under the Endpoints dropdown, copy the endpoint value under For other integrations and have it ready. This value is referenced in our code examples as YOUR_TRACE_OBSERVER_URL. This is used to test the trace observer, as well as to configure our telemetry integrations and for sending data via the Trace API.

  5. If you are setting up an APM agent, you should also copy the endpoint value under For language agents and have it ready. This value is referenced in our code examples as YOUR_TRACE_OBSERVER_HOST. This is used for configuring our language agents to send data to the trace observer.

  6. (Optional) To verify the trace observer is working, we recommend sending a sample trace payload. If you're using our Trace API directly, this will help you learn how the API works.

  7. Bookmark the optional configurations below so you can return to them after you experiment with Infinite Tracing.

  8. Return to your original distributed tracing setup instructions for your agent or third-party telemetry tool and insert your new endpoint value in the configuration for each service.

  9. If you also have services instrumented with New Relic browser, mobile, and Lambda, follow the steps in that section to select your data sources (services, apps, or entities) in the trace observer.

Services instrumented with New Relic browser, mobile, and Lambda

To create a new trace observer if you're using New Relic browser, mobile, or Lambda, you follow similar steps to those for APM agents and third-party integrations. Where this setup differs is that you don't need to insert a new trace observer endpoint in each service's configuration. Instead, you complete a separate configuration in the trace observer that specifies which data sources (services, apps, or entities) should have their data sent to the Infinite Tracing trace observer.

If you already created a trace observer while setting up another type of service (for example, an APM agent), you can skip the steps about creating the trace observer and go right to Initial trace observer configuration for browser, mobile, and Lambda to select your data sources.

Create a trace observer

If you haven't already set up a trace observer, complete the following:

  1. Go to one.newrelic.com and click Apps, and then under Your apps, click New Relic Edge.

  2. Select an account in the upper-left dropdown. If you have access to multiple accounts, make sure you're in the account where you want Infinite Tracing enabled. If you can't add an observer, it's likely because we allow only one observer per region, per account family.

  3. If no trace observers are already present, click New trace observer to add one, fill out the information, and click Create. Note that we offer the following regions:

    • us-east-1 (US)
    • us-west-2 (US)
    • eu-central-1 (EU): Select this region if you are collecting data from EU requests and you have an EU-based New Relic account that reports in EU data centers.
    • eu-west-1 (US): Select this region if you are collecting data from EU requests and you have a US-based New Relic account that reports in US data centers.
    • ap-southeast-1 (US)
    • ap-southeast-2 (US)
    • us-east-2 (US, FedRAMP)
  4. Under the Endpoints dropdown, copy the endpoint value under For other integrations and have it ready. This value is referenced in our code examples as YOUR_TRACE_OBSERVER_URL. This is used to test the trace observer.

  5. (Optional) To verify the trace observer is working, we recommend sending a sample trace payload.

Initial trace observer configuration for browser, mobile, and Lambda

Once you have a trace observer, you need to specify which data sources (services, apps, or entities) should have their data sent to the Infinite Tracing trace observer. Before you select your data sources, familiarize yourself with the following:

The procedure below is for using the New Relic UI, but if you prefer a programmatic approach, you can specify data sources with GraphQL. If you use GraphQL, return to this procedure and continue with step 4 (optional configurations) below.

To finish the configuration for browser, mobile, and Lambda in the UI:

  1. Return to the trace observer app (one.newrelic.com > Apps > Your Apps > New Relic Edge).

  2. For your trace observer, go to the end of the row, click the three dots, and then click Edit mobile, browser, lambda sources.

    Screenshot showing menu when you click the three dots next to your trace observer
  3. Select the data sources you want to include, keeping the following in mind:

    • You can use the filter to narrow your options.
    • If your browser app is connected to an APM agent that has multiple names, you can can only choose one name.
    • If an entry is gray, it is already being used by another trace observer.
    Screenshot showing the list of data sources you want to send tracing data
  4. Bookmark the optional configurations below so you can return to them after you experiment with Infinite Tracing.

  5. View your Infinite Tracing data in the New Relic distributed tracing UI.

  6. If you also have services instrumented with APM agents or third-party telemetry tools follow the steps in that section to ensure their data is reported to New Relic.

(Optional) Additional configuration for all service types

You may want to postpone these optional configurations until after you've worked with this feature for a while.

You can control the behavior of the trace observer with various configurations. Here are some of the features you can configure:

Copyright © 2022 New Relic Inc.