Configuring App Analytics via the Agent

このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください
This page describes deprecated features with configuration information relevant to legacy App Analytics, useful for troubleshooting or modifying some old setups. To have full control over your traces, use ingestion controls and retention filters instead.
Migrate to Trace Retention and Ingestion to use the new functionality.

App Analytics is used to filter APM data by user-defined tags such as customer_id, error_type, or app_name to help troubleshoot and filter your requests. To enable it, either:

  • Configure your APM tracer to emit the relevant analytics from your services—either automatically or manually.
  • Configure the Datadog Agent to emit the relevant analytics from your services (instructions below).

Note: To enable App Analytics with the Agent, services must be already flowing into Datadog.

  1. Once your services are set up, navigate to the App Analytics docs page to find a list of services and resource names available for use in Trace Search.
  2. Select the environment and services from which to extract Indexed Spans.
  3. Update your Datadog Agent configuration (based on Agent version) with the information below:

In datadog.yaml, add analyzed_spans under apm_config. For example:

apm_config:
  analyzed_spans:
    <SERVICE_NAME_1>|<OPERATION_NAME_1>: 1
    <SERVICE_NAME_2>|<OPERATION_NAME_2>: 1

In datadog.conf, add [trace.analyzed_spans]. For example:

[trace.analyzed_spans]
<SERVICE_NAME_1>|<OPERATION_NAME_1>: 1
<SERVICE_NAME_2>|<OPERATION_NAME_2>: 1

Add DD_APM_ANALYZED_SPANS to the Agent container environment (compatible with version 12.6.5250+). Format should be a comma-separated regular expressions without spaces. For example:

DD_APM_ANALYZED_SPANS="<SERVICE_NAME_1>|<OPERATION_NAME_1>=1,<SERVICE_NAME_2>|<OPERATION_NAME_2>=1"
`my-express-app|express.request=1,my-dotnet-app|aspnet_core_mvc.request=1`

In Datadog, every automatically instrumented service has an <OPERATION_NAME>, which is used to set the type of request being traced. For example, if you’re tracing a Python Flask application, you might have a flask.request as your operation name. In a Node application using Express, you would have express.request ask your operation name.

Replace both the <SERVICE_NAME> and <OPERATION_NAME> in your configuration with the service name and operation name of the traces you want to add to Trace Search.

For example, if you have a Python service named python-api, and it’s running Flask (operation name flask.request), your <SERVICE_NAME> would be python-api, and your <OPERATION_NAME> would be flask.request.