Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

Latest commit

 

History

History
137 lines (113 loc) · 5.63 KB

File metadata and controls

137 lines (113 loc) · 5.63 KB

Application Tags

Table of Content

Overview

Many Wavefront SDKs require you to specify application tags that describe the architecture of your application as it is deployed. These tags are associated with the metrics and trace data sent from the instrumented microservices in your application. You specify a separate set of application tags for each microservice you instrument. Wavefront uses these tags to aggregate and filter data at different levels of granularity.

Application tags and their values are encapsulated in an ApplicationTags object in your microservice’s code. Because the tags describe the application’s architecture as it is deployed, your code typically obtains values for the tags from a YAML configuration file, either provided by the SDK or through a custom mechanism implemented by your application.

Required Tags

Required tags enable you to drill down into the data for a particular service:

Tag Description
application Name that identifies your Java application, for example: OrderingApp. All microservices in an application should share the same application name.
service Name that identifies the microservice within your application, for example: inventory. Each microservice should have its own service name.

Optional Tags

Optional tags enable you to use the physical topology of your application to further filter your data:

Tag Description
cluster Name of a group of related hosts that serves as a cluster or region in which the application runs, for example: us-west-2. The default value is none.
shard Name of a subgroup of hosts within a cluster that serve as a partition, replica, shard, or mirror, for example: secondary. The default value is none.

Optionally, you can add custom tags specific to your application in the form of a Map (see example below). You can also add environment variables as custom tags (see example below).

Example

Creating an ApplicationTags instance:

String application = "OrderingApp";
String service = "inventory";
String cluster = "us-west-2";
String shard = "secondary";

Map<String, String> customTags = new HashMap<String, String>() {{
  put("location", "Oregon");
  put("env", "Staging");
}};

ApplicationTags applicationTags = new ApplicationTags.Builder(application, service).
    cluster(cluster).       // optional
    shard(shard).           // optional
    customTags(customTags). // optional
    tagsFromEnv("^MY_.*$"). // optional, add all environment variables with names starting with MY_ as custom tags.
    tagFromEnv("POD_NAME", "pod_name") // optional, add the environment variable POD_NAME as the custom tag with the tag name pod_name. 
    build();

Where to Go Next

To continue, select one of the Wavefront Java SDK links in the table below.

SDK Type SDK Description Java SDKs
OpenTracing SDK Implements the OpenTracing specification. Lets you define, collect, and report custom trace data from any part of your application code.
Automatically derives RED metrics from the reported spans.
Metrics SDK Implements a standard metrics library. Lets you define, collect, and report custom business metrics and histograms from any part of your application code.
Framework SDK Reports predefined traces, metrics, and histograms from the APIs of a supported app framework. Lets you get started quickly with minimal code changes.
Sender SDK Lets you send raw values to Wavefront for storage as metrics, histograms, or traces, e.g., to import CSV data into Wavefront.