Prometheus Exporter for AWS clients library

Lightweight Request Handler to add on any AWS client in order to obtain Prometheus metrics.

License

License

Categories

Categories

AWS Container PaaS Providers CLI User Interface Prometheus Application Testing & Monitoring Monitoring
GroupId

GroupId

com.deevvi
ArtifactId

ArtifactId

prometheus-exporter-for-aws-clients
Last Version

Last Version

1.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

Prometheus Exporter for AWS clients library
Lightweight Request Handler to add on any AWS client in order to obtain Prometheus metrics.
Project URL

Project URL

https://github.com/deevvicom/prometheus-exporter-for-aws-clients
Source Code Management

Source Code Management

http://github.com/deevvicom/prometheus-exporter-for-aws-clients

Download prometheus-exporter-for-aws-clients

How to add to project

<!-- https://jarcasting.com/artifacts/com.deevvi/prometheus-exporter-for-aws-clients/ -->
<dependency>
    <groupId>com.deevvi</groupId>
    <artifactId>prometheus-exporter-for-aws-clients</artifactId>
    <version>1.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.deevvi/prometheus-exporter-for-aws-clients/
implementation 'com.deevvi:prometheus-exporter-for-aws-clients:1.0.4'
// https://jarcasting.com/artifacts/com.deevvi/prometheus-exporter-for-aws-clients/
implementation ("com.deevvi:prometheus-exporter-for-aws-clients:1.0.4")
'com.deevvi:prometheus-exporter-for-aws-clients:jar:1.0.4'
<dependency org="com.deevvi" name="prometheus-exporter-for-aws-clients" rev="1.0.4">
  <artifact name="prometheus-exporter-for-aws-clients" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.deevvi', module='prometheus-exporter-for-aws-clients', version='1.0.4')
)
libraryDependencies += "com.deevvi" % "prometheus-exporter-for-aws-clients" % "1.0.4"
[com.deevvi/prometheus-exporter-for-aws-clients "1.0.4"]

Dependencies

compile (4)

Group / Artifact Type Version
com.amazonaws : aws-java-sdk-core jar 1.11.956
io.micrometer : micrometer-registry-prometheus jar 1.5.5
com.google.guava : guava jar 30.0-jre
com.deevvi : http-status-code jar 1.1.0

test (2)

Group / Artifact Type Version
org.junit.jupiter : junit-jupiter-engine jar 5.3.1
org.mockito : mockito-inline jar 2.21.0

Project Modules

There are no modules declared in this project.

Maven Central

Prometheus Exporter for AWS clients

Why:

  • There are never enough metrics.
  • Metrics provided by AWS (usually through CloudWatch) measure server-side latency.

What is:

  • a very simple solution to publish several basics metrics (latency, data transferred) while interacting with AWS

How to use it

  • The recommended way to use this library is through your build tool.

  • The prometheus-exporter-for-aws-clients artifact is published to Maven Central, using the group com.deevvi .

  • Latest stable version is 1.0.4.

Therefore,it can be added to your Gradle project by adding the dependencies:

compile "com.deevvi:prometheus-exporter-for-aws-clients:1.0.4"

and in Maven:

<dependency>
    <groupId>com.deevvi</groupId>
    <artifactId>prometheus-exporter-for-aws-clients</artifactId>
    <version>1.0.4</version>
</dependency>

Code example:

MeterRegistry meterRegistry = new SimpleMeterRegistry();
RequestHandler2 prometheusHandler = new PrometheusExporterRequestHandler(meterRegistry, "my-app-name");

AmazonSQSClientBuilder.standard()
        .withCredentials(new SystemPropertiesCredentialsProvider())
        .withRequestHandlers(prometheusHandler)
        .build();

Configuration parameters:

  • meterRegistry: Prometheus handler
  • metricPrefix: nullable prefix for metrics. Useful in case inside an application, there are multiple clients for the same service created and to distinguish between them.

Versions

Version
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0