Skip to content

Configuring APM in OpenSearch Dashboards

After ingesting telemetry data using the OpenTelemetry Collector and Data Prepper, you need to configure APM in OpenSearch Dashboards. You’ll create datasets, configure index patterns, attach a Prometheus data source, and configure APM settings in your workspace.

You can configure APM with the setup wizard or manually.

The Set up Application Monitoring wizard checks for the data APM needs, reuses what already exists, and creates what’s missing. When you finish, it saves the same configuration as the manual steps below.

Set up Application Monitoring wizard overview step

To use the wizard, follow these steps:

  1. Navigate to APM > Services in an Observability workspace that doesn’t have APM configured yet.
  2. On the empty state, select Get started.
  3. Complete the four steps:
    • Overview: Review what the wizard sets up and the data it expects.
    • Traces: Select the data source. If the wizard finds trace data in otel-v1-apm-span* (and correlated logs in logs-otel-v1*), select Auto-create traces dataset. Otherwise, select an existing traces dataset. Required fields: traceId, spanId, serviceName.
    • Services: Select an existing service map dataset, or select Auto-create service map dataset if the wizard finds data in otel-v2-apm-service-map*. Required fields: sourceNode, targetNode, sourceOperation, targetOperation, nodeConnectionHash, timestamp.
    • RED metrics: Select a Prometheus data source that exposes the request, fault, and latency_seconds_bucket metrics. The wizard lists only data sources that expose all three.
  4. Select Finish.

You can’t move to the next step until the current step is valid, so the wizard can’t save a broken configuration.

Services step of the setup wizard showing a service map dataset that is created and ready to use

Note: One-click creation works only when your indexes follow the OpenTelemetry naming conventions. If your datasets use different names, select them in the wizard or use the manual steps below.

Tip: If your indexes follow the OpenTelemetry naming conventions (otel-v1-apm-span* for traces and logs-otel-v1* for logs), OpenSearch Dashboards can automatically create datasets and correlations for you. Navigate to Discover > Traces and select the Create Trace Datasets button when prompted. This skips Steps 1 and 2 below. For more details, see Automatic dataset creation.

Step 1: Create datasets for logs and traces

Section titled “Step 1: Create datasets for logs and traces”

If your indexes use custom naming conventions and automatic creation is not available, create datasets manually in your Observability workspace:

  1. Navigate to your Observability workspace.
  2. Select Datasets and then select Create dataset.
  3. Create a traces dataset pointing to your trace data index (for example, otel-v1-apm-span-*).
  4. Create a logs dataset pointing to your application logs index (for example, logs-otel-v1-*).

For detailed instructions on creating and configuring datasets, see Datasets.

Step 2: Create a correlation between trace and log datasets

Section titled “Step 2: Create a correlation between trace and log datasets”

If you created datasets manually in Step 1, link the trace and log datasets so that APM can display related logs when you investigate traces:

  1. Navigate to Datasets > Correlations.
  2. Select the trace dataset you created in Step 1.
  3. Add the logs dataset as a correlated dataset.
  4. Save the correlation.

This enables in-context log correlations throughout the APM interface, including the Services and Application Map pages. For detailed instructions, see Correlations.

Step 3: Create an index pattern for the service map

Section titled “Step 3: Create an index pattern for the service map”

APM requires an index pattern for the service map data generated by the otel_apm_service_map processor in Data Prepper. To create an index pattern, follow these steps:

  1. Navigate to Dashboards Management > Index patterns.
  2. Select Create index pattern.
  3. Enter otel-v2-apm-service-map* as the index pattern name.
  4. Select the appropriate time field and save.

This index pattern is used by APM to display service topology data and dependency information.

Step 4: Attach a Prometheus data source to your workspace

Section titled “Step 4: Attach a Prometheus data source to your workspace”

APM uses Prometheus to store and query Rate, Errors, Duration (RED) metrics. To add a Prometheus data source to your workspace, follow these steps:

  1. Navigate to Dashboards Management > Data sources.
  2. Select Create data source and choose Prometheus.
  3. Enter the connection details for your Prometheus instance (for example, http://prometheus:9090).
  4. Save the data source and attach it to your Observability workspace.

For detailed instructions on configuring a Prometheus data source, see Discover Metrics.

To configure APM settings, follow these steps:

  1. Navigate to APM > Services or APM > Application Map.

  2. Select the APM Settings button in the upper-right corner. The Application monitoring settings dialog appears, as shown in the following image.

    APM settings modal

  3. In the Application monitoring settings dialog, configure the following settings:

    • Traces: Select the trace dataset you created in Step 1 (for example, Trace Dataset - Local Cluster). The number of correlated logs is displayed below the selection.
    • Services: Select the service map index pattern you created in Step 3 (for example, otel-v2-apm-service-map*).
    • RED Metrics: Select the Prometheus data source you configured in Step 4 (for example, ObservabilityStack_Prometheus).
  4. Select Update to save your configuration.

After completing this setup, APM will display service topology, RED metrics, and in-context correlations across the Services and Application Map pages.

  • Services: View service performance metrics and dependencies.
  • Application Map: Explore the service topology visualization.