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

You instrument your application so that trace data from different parts of the stack are sent to Wavefront. 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 Wavefront observability 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 to Wavefront

Choose one of the following ways to send metrics, histograms, and trace data from your application to the Wavefront service:

  • Direct Ingestion. To get up and running quickly, use direct ingestion to send data directly to the Wavefront service.
  • Wavefront proxy. For any production environment, we recommend a Wavefront proxy to forward data from your application to the Wavefront 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.

To Prepare for Direct Ingestion

  1. Identify the URL of your Wavefront instance. This is the URL you connect to when you log in to Wavefront, typically something like https://mywavefront.wavefront.com.
  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 into Wavefront

Wavefront provides SDKs that implement the OpenTracing specification in many languages. You can use a Wavefront 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 Wavefront 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 to Wavefront via 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 Wavefront 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 Wavefront 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 Wavefront Sender SDKs

For maximum flexibility, you can use the Wavefront Sender SDKs. See SDKs for Sending Raw Data to Wavefront 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
      customTracingListenerPorts=30001
    
  4. When you configure the wavefront 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.