Librato Metrics API Java Library

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

Лицензия

Лицензия

Категории

Категории

Java Языки программирования Metrics Тестирование приложения и мониторинг Monitoring
Группа

Группа

com.librato.metrics
Идентификатор

Идентификатор

librato-java
Последняя версия

Последняя версия

2.1.3
Дата

Дата

Тип

Тип

jar
Описание

Описание

Librato Metrics API Java Library
A set of libraries to facilitate posting data to the Librato Metrics Api
Ссылка на сайт

Ссылка на сайт

https://github.com/librato/librato-java
Система контроля версий

Система контроля версий

https://github.com/librato/librato-java

Скачать librato-java

Как подключить последнюю версию

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

Зависимости

compile (4)

Идентификатор библиотеки Тип Версия
com.fasterxml.jackson.core : jackson-core jar 2.8.8
com.fasterxml.jackson.core : jackson-databind jar 2.8.8
com.fasterxml.jackson.core : jackson-annotations jar 2.8.8
org.slf4j : slf4j-api jar 1.7.25

test (4)

Идентификатор библиотеки Тип Версия
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

Модули Проекта

Данный проект не имеет модулей.

DEPRECATED: If you are using AppOptics please refer to appoptics-api-java.

librato-java

Java language bindings for the Librato Metrics API.

Looking for a previous version?

You can find documentation for versions < 2.x.x here.

Maven Dependency

<dependency>
    <groupId>com.librato.metrics</groupId>
    <artifactId>librato-java</artifactId>
    <version>2.1.0</version>
</dependency>

Setup

You must first initialize the client:

LibratoClient client = LibratoClient.builder(email, 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 Librato API:

PostMeasuresResult result = client.postMeasures(new Measures()
    .add(new GaugeMeasure(name, value))
    .add(new GaugeMeasure(name, value).setSource("uid:43"))
    .add(new GaugeMeasure(name, sum, count, min, max))
    .add(new GaugeMeasure(name, sum, count, min, max, sumSquares))
    .add(new CounterMeasure(name, value))
    .add(new TaggedMeasure(name, value, tag, tag))
    .add(new TaggedMeasure(name, sum, count, min, max, tag, tag ,tag)));

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

Note that if you wish to submit tagged measures you need to first contact support@librato.com to get early access to this new feature.

com.librato.metrics

Librato

Версии библиотеки

Версия
2.1.3
2.1.2
2.1.0
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
1.0.13
1.0.12
1.0.11
1.0.10
1.0.9
1.0.8
1.0.7
1.0.6
1.0.5
1.0.4
1.0.2
1.0.1
1.0.0
0.1.2
0.1.1
0.1.0
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1