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
- 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>.wavefront.com
. - Obtain an API token.
To Prepare for Using a Wavefront Proxy
- On the host that will run the proxy, install the proxy.
- On the proxy host, open the proxy configuration file
wavefront.conf
for editing. The path to the file depends on the host OS. - In the
wavefront.conf
file, uncomment or define an HTTP listener port to send your metrics, histograms, and tracing spans.pushListenerPorts=2878 ... histogramDistListenerPorts=2878 ... traceListenerPorts=2878
- Consider setting up trace sampling by configuring the proxy with a sampling strategy.
- Save the
wavefront.conf
file. - 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.
You can use OpenTracing or OpenTelemetry (OpenTracing and OpenCensus have merged to form OpenTelemetry) to send traces to Operations for Applications.
If your application uses OpenTelemetry, see OpenTelemetry to send trace data to Operations for Applications.
The valid characters in an application and service name are: a-z, A-Z, 0-9, hyphen ("-"), underscore ("_"), dot ("."), forward slash ("/") and comma (",").
If your application or service names have any other characters other than the valid characters, Operations for Applications replaces each of those characters with a hyphen ("-").
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:
-
Collect traces and send them to Operations for Applications using the following integrations.
-
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.
- Prepare to send data via the Wavefront proxy.
- Configure your application to send data via the Wavefront proxy. See the SDK’s README file for details.
- 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
- 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.
- See Application Status to get an overview of your applications.
- See Service Dashboard to see the RED metrics of an application.
- See Traces Browser to examine the traces of your application.