SignalFx (Stats)
Introduction
SignalFx is a real-time monitoring solution for cloud and distributed applications. SignalFx ingests that data and offers various visualizations on charts, dashboards and service maps, as well as real-time anomaly detection.
OpenCensus Java has support for this exporter available through the package:
This guide makes use of SignalFx. You’ll need to have:
- A SignalFx account
- The corresponding data ingest token
Creating the exporter
Insert the following snippet in your pom.xml
:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<opencensus.version>0.15.0</opencensus.version> <!-- The OpenCensus version to use -->
</properties>
<dependencies>
<dependency>
<groupId>io.opencensus</groupId>
<artifactId>opencensus-api</artifactId>
<version>${opencensus.version}</version>
</dependency>
<dependency>
<groupId>io.opencensus</groupId>
<artifactId>opencensus-exporter-stats-signalfx</artifactId>
<version>${opencensus.version}</version>
</dependency>
<dependency>
<groupId>io.opencensus</groupId>
<artifactId>opencensus-impl</artifactId>
<version>${opencensus.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Instrument your application code with the following snippet:
package io.opencensus.tutorial.signalfx;
import io.opencensus.common.Duration;
import io.opencensus.exporter.stats.signalfx.SignalFxStatsConfiguration;
import io.opencensus.exporter.stats.signalfx.SignalFxStatsExporter;
public class SignalFxTutorial {
public static void main(String ...args) {
String signalFxToken = "<this is my token>";
SignalFxStatsExporter.create(
SignalFxStatsConfiguration.builder()
.setToken(signalFxToken)
.setExportInterval(Duration.create(3, 2))
.build();
);
}
}
References
Resource | URL |
---|---|
SignalFx stats exporter JavaDoc | https://www.javadoc.io/doc/io.opencensus/opencensus-exporter-stats-signalfx |