Wavefront’s Observability SDKs for Instrumenting Apps with Metrics, Traces, Histograms: Powerful, Flexible, and Open Source

May 2, 2019 Sushant Dewan

Wavefront is a cloud-native monitoring and analytics platform used to alert on, troubleshoot, and optimize the performance of multi-cloud application environments. It delivers 3D Observability by performing analytics from metrics, traces, and histograms gathered on distributed applications, application services, containers, and public/private/hybrid cloud infrastructures.

Getting data into Wavefront is easy and it can be done in multiple ways: you can send data to Wavefront using (a) one of a variety of collection agents for host/infrastructure monitoring, (b) a direct ingestion integration for cloud services monitoring, and (c) the Wavefront Observability SDK for instrumenting applications with metrics, traces, and histograms. In this blog post, we’ll focus on the Wavefront Observability SDKs and how our SDKs provides observability with metrics, histograms and trace out-of-the-box for all the popular frameworks and languages. We’ll also cover the different types of Wavefront Observability SDKs and their corresponding use-cases.

Flexible, Layered SDKs for Different Observability Use Cases

Wavefront has taken a flexible approach to catering to different user needs. To get started quickly, you should start with our Framework SDK that fits your environment. By adding a few lines of code, you’ll be able to collect metrics, traces and histograms from your application. Later on, you could instrument your application further with metrics and/or tracing SDKs.

Wavefront has taken a “layered” approach in designing its Observability SDKs. The SDKs are grouped into multiple levels. Each level SDK builds upon the previous – higher-level SDKs include lower level SDKs capabilities – so developers don’t have to include multiple SDKs. We’ve taken this “layered” approach for all our SDKs in all the popular languages: Java, C#, Python, Go, Ruby, Node.js, C++, etc.

Figure 1: Wavefront’s Layered Approach to Observability SDKs

Table 1: Wavefront Provides Multiple Types of Observability SDKs

Sender SDK: Advanced Users Will Love This

The Wavefront Sender SDK is the backbone of all our other SDKs. The core capability of the Sender SDK is to provide ingestion capabilities for all the pillars of 3D Observability i.e. metrics, histograms, and traces.
The Sender SDK implements the following 3 interfaces:

Table 2: Interfaces Implemented within Wavefront’s Sender SDK

Note: You can send data to Wavefront via the proxy or via direct ingestion. Sending data via the proxy is advisable in most production use cases.

Metrics & Runtime SDK: for Users Who’ve Already Instrumented Their Code

a. Metrics Library
While it makes sense to use the Level 1 SDKs to export data to Wavefront, we do need a first-class metrics library to do this. In Java land, we have two great options to choose from – Dropwizard Metrics library and Spring Micrometer. These libraries take care of metrics collection and reporting by providing first-class constructs for Counters, Gauges, Histograms, Meters, Timers, etc. Wavefront has implemented Level 2 SDKs in various languages for all the popular metrics libraries.

b. Runtime Metrics
Along with metrics and traces, Wavefront also provides an SDK that will collect runtime metrics for your service and report those to Wavefront. For instance, if you’re running your service on a JVM, this Level 2 SDK will collect GC, Heap, Threads, and additional JVM metrics, reporting all of these to Wavefront.

OpenTracing SDK: for Users Wanting OpenTracing Compliant Distributed Tracing

Tracing Library
Along with metrics, when it comes to tracing, OpenTracing has revolutionized this domain by standardizing the process of trace instrumentation. OpenTracing API specification allows us to truly instrument an end to end trace for a polyglot microservices application. Wavefront has support for OpenTracing in all the popular languages.

Framework SDK: for Users New to Distributed Tracing

While metrics and tracing SDKs are a great start to instrument your application, they still involve some manual work since developers have to look at all the APIs and instrument those manually using metrics and OpenTracing libraries.

We wanted to deliver a way to provide a truly out-of-the-box experience with 3D observability (i.e. metrics, traces, histograms). To do so, we looked at the common building blocks of microservices. For instance, a Java web service application is usually Jersey/JAX-RS based and is built using the Dropwizard Java framework for developing ops-friendly, high-performance, RESTful web services. If the application has an RPC service, then most likely it would be built using the gRPC framework. So, we created Level 3 SDKs which include out-of-the-box instrumentation for all popular languages and frameworks including Jersey, JAX-RS, Dropwizard and gRPC.

Our Observability SDKs are Open Source

All of the aforementioned Observability SDKs are open source (contributions welcome!). They are used by several teams inside VMware and are actively maintained by Wavefront. You can find the links to the Github repos below:

SDK Language Github Link
Framework SDKs Java Jersey: https://github.com/wavefrontHQ/wavefront-jersey-sdk-java
Jaxrs: https://github.com/wavefrontHQ/wavefront-jaxrs-sdk-java
gRPC: https://github.com/wavefrontHQ/wavefront-grpc-sdk-java
Dropwizard: https://github.com/wavefrontHQ/wavefront-dropwizard-sdk-java
Metrics SDKs Java Dropwizard metrics library: https://github.com/wavefrontHQ/wavefront-dropwizard-metrics-sdk-java
Spring Micrometer metrics library: https://github.com/micrometer-metrics/micrometer/tree/master/implementations/micrometer-registry-wavefront
Runtime metrics library: https://github.com/wavefrontHQ/wavefront-runtime-sdk-jvm
C# Metrics library: https://github.com/wavefrontHQ/wavefront-appmetrics-sdk-csharp
OpenTracing SDK Java OpenTracing library: https://github.com/wavefrontHQ/wavefront-opentracing-sdk-java
C# OpenTracing library: https://github.com/wavefrontHQ/wavefront-opentracing-sdk-csharp

Sender SDK

Java https://github.com/wavefrontHQ/wavefront-sdk-java
C# https://github.com/wavefrontHQ/wavefront-sdk-csharp
Python https://github.com/wavefrontHQ/wavefront-sdk-python
Go https://github.com/wavefrontHQ/wavefront-sdk-go
Ruby https://github.com/wavefrontHQ/wavefront-sdk-ruby
C++ https://github.com/wavefrontHQ/wavefront-sdk-cpp

Conclusion

In this blog, we detailed the various Wavefront Observability SDKs along with their relevant use-cases. Wavefront has developed these SDKs in all popular languages including Java, Go, Python, C++, and Ruby. Which SDK to choose depends on your use-case. For instance, if you want to get out-of-the-box instrumentation for various application components and frameworks, then Wavefront’s Framework SDKs are the best choice. Give Wavefront’s 3D Microservices Observability a try today. For more product details, please check out the demo and refer to our documentation.

The post Wavefront’s Observability SDKs for Instrumenting Apps with Metrics, Traces, Histograms: Powerful, Flexible, and Open Source appeared first on Wavefront by VMware.

About the Author

Sushant Dewan

Sushant Dewan is a Staff Engineer at VMware and works on Wavefront by VMware. Wavefront by VMware is a monitoring and analytics platform that handles the high-scale requirements of modern cloud-native applications. Currently, Sushant is working on building different pillars of observability to monitor next-generation microservices applications deployed on containers and serverless platforms.

Follow on Twitter More Content by Sushant Dewan
Previous
How to Auto-Detect Cloud App Anomalies with Analytics: 10 Smart Alerting Examples – Part 3
How to Auto-Detect Cloud App Anomalies with Analytics: 10 Smart Alerting Examples – Part 3

When supporting some of the world’s largest and most successful SaaS companies, we at Wavefront by VMware g...

Next
How To Auto-Detect Cloud App Anomalies with Analytics: 10 Smart Alerting Examples – Part 2
How To Auto-Detect Cloud App Anomalies with Analytics: 10 Smart Alerting Examples – Part 2

When supporting some of the world’s largest and most successful SaaS companies, we at Wavefront by VMware g...

SpringOne. Catch all the highlights

Watch now