LightStep Metrics Reporter


License

License

Categories

Categories

Java Languages Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

com.lightstep.tracer
ArtifactId

ArtifactId

java-metrics-reporter
Last Version

Last Version

0.1.6
Release Date

Release Date

Type

Type

jar
Description

Description

LightStep Metrics Reporter
LightStep Metrics Reporter
Project URL

Project URL

https://github.com/lightstep/lightstep-metrics-java
Project Organization

Project Organization

LightStep
Source Code Management

Source Code Management

https://github.com/lightstep/lightstep-metrics-java

Download java-metrics-reporter

How to add to project

<!-- https://jarcasting.com/artifacts/com.lightstep.tracer/java-metrics-reporter/ -->
<dependency>
    <groupId>com.lightstep.tracer</groupId>
    <artifactId>java-metrics-reporter</artifactId>
    <version>0.1.6</version>
</dependency>
// https://jarcasting.com/artifacts/com.lightstep.tracer/java-metrics-reporter/
implementation 'com.lightstep.tracer:java-metrics-reporter:0.1.6'
// https://jarcasting.com/artifacts/com.lightstep.tracer/java-metrics-reporter/
implementation ("com.lightstep.tracer:java-metrics-reporter:0.1.6")
'com.lightstep.tracer:java-metrics-reporter:jar:0.1.6'
<dependency org="com.lightstep.tracer" name="java-metrics-reporter" rev="0.1.6">
  <artifact name="java-metrics-reporter" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.lightstep.tracer', module='java-metrics-reporter', version='0.1.6')
)
libraryDependencies += "com.lightstep.tracer" % "java-metrics-reporter" % "0.1.6"
[com.lightstep.tracer/java-metrics-reporter "0.1.6"]

Dependencies

compile (5)

Group / Artifact Type Version
com.google.protobuf : protobuf-java jar 3.9.0
com.google.api.grpc : grpc-google-common-protos jar 1.17.0
com.github.oshi : oshi-core jar 5.6.1
javax.annotation : javax.annotation-api jar 1.3.2
com.squareup.okhttp3 : okhttp jar 4.3.1

test (7)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.2.3
junit : junit jar 4.13.1
org.mockito : mockito-core jar 2.18.3
io.grpc : grpc-protobuf jar 1.23.0
io.grpc : grpc-stub jar 1.23.0
io.grpc : grpc-netty jar 1.23.0
io.netty : netty-tcnative-boringssl-static jar 2.0.25.Final

Project Modules

There are no modules declared in this project.

Lightstep Java Metrics Reporter

Download Circle CI

This library automatically reports a set of predefined host metrics (such as CPU and memory usage) to the Lightstep backend.

Java 8 or newer is required. When running Java 7, no metrics reporting will be performed.

Note: Using this artifact requires tracing being done in the same process and sharing the same service name/version and access token. If not done, the reported metrics will be ignored at the backend.

Maven

<dependency>
   <groupId>com.lightstep.tracer</groupId>
   <artifactId>java-metrics-reporter</artifactId>
   <version>VERSION</version>
</dependency>

Usage

import com.lightstep.tracer.metrics.Metrics;
import com.lightstep.tracer.metrics.OkHttpSender;
import com.lightstep.tracer.metrics.Sender;
...
  // Done once, at application initialization.
  Sender<?,?> sender = new OkHttpSender(
      "MyServiceName", // Service/Component name.
      "MyAccessToken", // Access Token. Nullable
      "1.2.3", // Service version. Nullable
      "https://" // Metrics url
      30000 // connect timeout in milliseconds
  );

  // Metrics inherits from Thread.
  Metrics metrics = new Metrics(
      sender, 
      30 // sample period in seconds
  );

  metrics.setDaemon(true);
  metrics.start();

  // Done at application/reporter shutdown.
  metrics.close();
com.lightstep.tracer

Lightstep

Versions

Version
0.1.6
0.1.5
0.1.4
0.1.3
0.1.2