AppOptics Metrics API Java Library

A set of libraries to facilitate posting data to the AppOptics Metrics Api

License

License

Categories

Categories

Java Languages Metrics Application Testing & Monitoring Monitoring
GroupId

GroupId

com.appoptics.metrics
ArtifactId

ArtifactId

appoptics-api-java
Last Version

Last Version

1.0.5
Release Date

Release Date

Type

Type

jar
Description

Description

AppOptics Metrics API Java Library
A set of libraries to facilitate posting data to the AppOptics Metrics Api
Project URL

Project URL

https://github.com/appoptics/appoptics-api-java
Source Code Management

Source Code Management

https://github.com/appoptics/appoptics-api-java

Download appoptics-api-java

How to add to project

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

Dependencies

compile (4)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-core jar 2.9.8
com.fasterxml.jackson.core : jackson-databind jar 2.9.8
com.fasterxml.jackson.core : jackson-annotations jar 2.9.8
org.slf4j : slf4j-api jar 1.7.25

test (4)

Group / Artifact Type Version
org.slf4j : slf4j-simple jar 1.7.25
junit : junit jar 4.12
org.mockito : mockito-core jar 1.10.19
org.assertj : assertj-core jar 2.7.0

Project Modules

There are no modules declared in this project.

appoptics-api-java

Java language bindings for the AppOptics Metrics API.

Maven Dependency

Find the latest version here.

<dependency>
    <groupId>com.appoptics.metrics</groupId>
    <artifactId>appoptics-api-java</artifactId>
    <version>1.0.2</version>
</dependency>

Setup

You must first initialize the client:

AppopticsClient client = AppopticsClient.builder(apiToken)
    // these are optional
    .setConnectTimeout(new Duration(5, SECONDS))
    .setReadTimeout(new Duration(5, SECONDS))
    .setAgentIdentifier("my app name")
    // and finally build
    .build();

Once your client has been built, you can submit measures to the AppOptics API:

PostMeasuresResult result = client.postMeasures(new Measures()
    .add(new Measure(name, value, tag, tag))
    .add(new Measure(name, sum, count, min, max, tag, tag ,tag)));

for (PostResult postResult : result.results) {
    if (result.isError()) {
        log.error(result.toString);
    }
}
com.appoptics.metrics

AppOptics

Seamless application performance management and infrastructure monitoring

Versions

Version
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1