Set up your application to send metrics, histograms, and trace data.

You instrument your application so that trace data from different parts of the stack are sent to Operations for Applications. Instrumentation enables you to trace a request from end to end across multiple distributed services, guided by key metrics from your application. After instrumentation, you can use our tracing UI to visualize a request as a trace that consists of a hierarchy of spans. This visualization helps you pinpoint where the request is spending most of its time and discover problems.

You instrument each microservice in your application with one or more Operations for Applications SDKs. This page:

  • Helps you choose the SDK(s) or corresponding integration
  • Directs you to the setup steps for each SDK or integration

Step 1. Prepare to Send Data

Choose one of the following ways to send metrics, histograms, and trace data from your application to Operations for Applications:

  • Direct Ingestion. To get up and running quickly, use direct ingestion to send data directly to Operations for Applications.
  • Wavefront proxy. For any production environment, we recommend a Wavefront proxy to forward data from your application to your Operations for Applications service. Using a proxy provides resilience to internet outages, control over data queuing and filtering, and more.

Watch this video for some background on proxy vs. direct ingestion. Note that this video was created in 2019 and some of the information in it might have changed.

To Prepare for Direct Ingestion

  1. Identify the URL of your Operations for Applications service. This is the URL you use when you log in, typically something like https://<your_instance>
  2. Obtain an API token.

To Prepare for Using a Wavefront Proxy

  1. On the host that will run the proxy, install the proxy.
  2. On the proxy host, open the proxy configuration file wavefront.conf for editing. The path to the file depends on the host OS.
  3. In the wavefront.conf file, uncomment or define an HTTP listener port to send your metrics, histograms, and tracing spans.
  4. Consider setting up trace sampling by configuring the proxy with a sampling strategy.
  5. Save the wavefront.conf file.
  6. Start the proxy.

Step 2. Get Data Flowing

We support SDKs that implement the OpenTracing specification in many languages. You can use a Operations for Applications OpenTracing SDK to collect custom trace data that you define for your service, for example, to augment an auto-instrumented framework or to replace a 3rd party OpenTracing-compliant library.

Instrument Your Application with OpenTracing SDKs

Choose the Operations for Applications OpenTracing SDK for your microservice’s programming language, and click the link to go to its README file on GitHub:

Instrument Your OpenTracing Java Application Without Writing Code

If you need application observability, but don’t want to instrument code for your Java microservices, use the Wavefront Java Tracing Agent. For more information, see this blog post on the Wavefront Java Tracing Agent.

Send Trace Data from Applications Integrated with Jaeger or Zipkin

If you have already instrumented your application with Jaeger or Zipkin follow these steps:

  1. Collect traces and send them to Operations for Applications using the following integrations.

  2. Optionally, add custom tags, applications names, or use an alternative for the Jaeger or Zipkin integration. See Using Jaeger or Zipkin with Tanzu Observability for details.

After your recompiled application starts running, start exploring your custom trace data on the Traces Browser and exploring the RED metrics and histograms that are automatically derived on the Service Dashboard from your trace data.

Instrument Your Application with Sender SDKs

For maximum flexibility, you can use the Sender SDKs. See Operations for Applications SDKs for Sending Raw Data for background.

When you use a Sender SDK, you won’t see span-level RED metrics by default. This section explains how to send span-level RED metrics using a custom tracing port.

  1. Prepare to send data via the Wavefront proxy.
  2. Configure your application to send data via the Wavefront proxy. See the SDK’s README file for details.
  3. Specify the port or a comma-separated list of ports that you want to send the trace data using the customTracingListenerPorts configuration in your <wavefront_config_path>/wavefront.conf file.
      ## port for sending custom spans using the sender sdk
      ## you can use a port that you prefer. in this example port 30001 is used
  4. When you configure the sender on your application as explained in the SDK’s README file, define the port so that span level RED metrics will be gathered from your application.

Next Steps

Examine traces, spans, and RED metric sent by your application.