Send Metrics and Traces to Both Lightstep and Datadog

To send metrics and traces to Lightstep and to Datadog, you need to add or update the endpoints. The endpoints take a key value pair, where the key for metrics is the Lightstep metrics ingest domain (https://metricingest.lightstep.com) and the key for trace data is the endpoint to your Microsatellite environment (where the data is collected). The value for both is your Lightstep access token. You can configure this using either YAML or environment variables.

Use YAML to Configure the Agent

  1. In your datadog.yml file, add the additional_endpoints property below the apm_config section.
    Replace <EXISTING_DATADOG_API_KEY>with your value.

If your environment uses public Microsatellites, use the values shown in the example for the trace endpoint. For on-premise Microsatellites, use the Microsatellite’s IP address.

Start tabs

Public Microsatellites

1
2
3
4
5
6
7
8
9
10
api_key: <EXISTING_DATADOG_API_KEY>

additional_endpoints:
  'https://metricingest.lightstep.com':
    - <LIGHTSTEP_ACCESS_TOKEN> 

apm_config:
  additional_endpoints:
    'https://ingest.lightstep.com':
      - <LIGHTSTEP_ACCESS_TOKEN>

On-Premise Microsatellites

1
2
3
4
5
6
7
8
9
10
11
api_key: <EXISTING_DATADOG_API_KEY>

additional_endpoints:
  'https://metricingest.lightstep.com':
    - <LIGHTSTEP_ACCESS_TOKEN>

apm_config:
  additional_endpoints:
    '<MICROSATELLITE_ENDPOINT>':
      - <LIGHTSTEP_ACCESS_TOKEN>
    

End code tabs

  1. Redeploy the configuration file and restart the Datadog Agent.
    At startup, look for a log message containing Forwarder started;. This lists the destinations the agent is sending to (which should include both Datadog and Lightstep).

Use Environment Variables to Configure the Agent

To send traffic to Lightstep from the Datadog Agent using environment variables, you need to set the DD_APM_ADDITIONAL_ENDPOINTS environment variable. The environment variable value should be formatted as a JSON object with the endpoint as the key and the Lightstep access token as a string.

Replace <LIGHTSTEP_ACCESS_TOKEN> with your value.

  1. Set the DD_APM_ADDITIONAL_ENDPOINTS variable with the appropriate endpoint for your Microsatellite environment. If your environment uses public Microsatellites, use the values shown in the example. For on-premise Microsatellites, use the Microsatellite’s IP address for the trace endpoint.
    Replace <LIGHTSTEP_ACCESS_TOKEN> with your value.

Start tabs

Public Microsatellites

1
export DD_APM_ADDITIONAL_ENDPOINTS='{"https://metricingest.lightstep.com": ["<LIGHTSTEP_ACCESS_TOKEN>"], "https://ingest.lightstep.com": ["<LIGHTSTEP_ACCESS_TOKEN>"]}'

On-Premise Microsatellites

1
export DD_APM_ADDITIONAL_ENDPOINTS='{"https://metricingest.lightstep.com": ["<LIGHTSTEP_ACCESS_TOKEN>"], "<MICROSATELLITE_ENDPOINT>": ["<LIGHTSTEP_ACCESS_TOKEN>"]}'

End code tabs

  1. Restart the Datadog Agent.
    At startup, look for a log message containing Forwarder started;. This lists the destinations the agent is sending to (which should include both Datadog and Lightstep).

What Did We Learn?

  • To send metric and trace data to Lightstep, you need to update the endpoints in your Datadog configuration.