Docs » Set up Splunk APM » Send traces to Splunk APM

Send traces to Splunk APM đź”—

Set up your APM experience by sending traces to APM from your services.

Prerequisites đź”—

Before you begin the setup process, consider the following:

  • If you are using multiple components of Splunk Observability Cloud and want to collect host metrics, logs, or other application data in addition to traces, follow the steps in Get data into Splunk Observability Cloud to get data into Observability Cloud. Then see Verify that your data is coming into Splunk APM in this topic to make sure your data is coming into Splunk APM as you expect.

  • If you have already deployed the OpenTelemetry Collector Contrib project, also known as upstream Collector, you can use your existing deployment to send traces to Splunk APM. See Send telemetry using the OpenTelemetry Collector Contrib project for more information. However, note that using the Splunk Distribution of OpenTelemetry Collector provides a more supported experience, customized for Splunk Observability Cloud.

  • If you want to start sending traces to Splunk APM with Splunk Distribution of OpenTelemetry Collector using the guided setup wizards in Splunk APM, follow the steps in the following sections. To set it up yourself without the guided process, see Get started with the Splunk Distribution of the OpenTelemetry Collector.

Note

Add span tags to your spans

Span tags, known as “attributes” in OpenTelemetry, add crucial context to your spans to enable troubleshooting and analysis. You can add tags to your spans either during instrumentation or in a processor added to the YAML configuration file of the OpenTelemetry Collector you’re using to aggregate data from multiple services. See Use tags or attributes in OpenTelemetry for more information.

The deployment.environment tag is particularly useful because it enables you to filter your Splunk APM by deployment environment. To learn more about the environment tag, see Set up deployment environments in Splunk APM.

See Add context to spans with span tags in Splunk APM to learn how to add span tags to spans.

If you are just setting up Splunk APM and want to use the Splunk Distribution of OpenTelemetry Collector and the guided setup wizards, follow these steps in this order:

Deploy the Splunk Distribution of OpenTelemetry Collector on your hosts đź”—

To send traces to Splunk APM, first deploy the Splunk Distribution of OpenTelemetry Collector on the hosts in which your applications are running. Splunk Observability Cloud offers OpenTelemetry Collector distributions for Kubernetes, Linux, and Windows. These distributions integrate the collection of data from hosts and data forwarding to Observability Cloud.

Note

Benefits of the Splunk Distribution of OpenTelemetry Collector

Although you’re not required to install the Splunk Distribution of OpenTelemetry Collector, doing so gets you the following benefits:

  • The collector can add span metadata associated with the infrastructure in which your applications are running.

  • You establish a single configuration point in which you can specify authorization details.

  • You establish a single configuration point in which you add custom tags and custom processing to your spans.

  • You can batch spans together from many sources. By batching spans, you reduce load on the back end.

To deploy the Splunk Distribution of OpenTelemetry Collector on a host, select Navigation menu > Data Management and search for the host type you’re using. Then follow the steps in the setup wizard.

See the following table for more information about deploying the Splunk Distribution of OpenTelemetry Collector on Kubernetes, Linux, and Windows hosts:

Host type

Collector

Documentation

Kubernetes

Splunk Distribution of OpenTelemetry Collector for Kubernetes

Collect Kubernetes data

Linux

Splunk Distribution of OpenTelemetry Collector for Linux

Collect Linux data

Windows

Splunk Distribution of OpenTelemetry Collector for Windows

Collect Windows data

Instrument your applications and services to get spans into Splunk APM đź”—

Use the autoinstrumentation libraries provided by Splunk Observability Cloud to instrument services in supported programming languages. To get the highest level of support, send spans from your applications to the OpenTelemetry Collector you deployed in the previous step.

To instrument a service, send spans from the service to an OpenTelemetry Collector deployed on the host or Kubernetes cluster in which the service is running. How you specify the OpenTelemetry Collector endpoint depends on the language you are instrumenting.

In the following table, follow the instrumentation steps for the language that each of your applications is running in.

Language

Available instrumentation

Documentation

Java

Splunk Distribution of OpenTelemetry Java

Instrument Java applications for Splunk Observability Cloud

.NET

Splunk Distribution of OpenTelemetry .NET

Instrument .NET applications for Splunk Observability Cloud (OpenTelemetry)

Node.js

Splunk Distribution of OpenTelemetry JS

Instrument Node.js applications for Splunk Observability Cloud

Go

Splunk Distribution of OpenTelemetry Go

Instrument Go applications for Splunk Observability Cloud

Python

Splunk Distribution of OpenTelemetry Python

Instrument Python applications for Splunk Observability Cloud

Ruby

OpenTelemetry instrumentation for Ruby

Instrument Ruby applications for Splunk Observability Cloud (OpenTelemetry)

PHP

OpenTelemetry instrumentation for PHP

Instrument PHP applications for Splunk Observability Cloud

After you instrument your applications, you’re ready to verify that your data is coming in.

Verify that your data is coming into Splunk APM đź”—

After you instrument your applications, wait for Splunk Observability Cloud to process incoming spans. Then select APM in the navigation menu and check that you can see your application data beginning to flow into the APM landing page.

If your data is not appearing in APM as you expect, see Troubleshoot your instrumentation.

Next step đź”—

Once have data flowing into APM, it’s time to do some exploring. See Learn what you can do with Splunk APM.