Prometheus Protobuf Servlet

Protobuf formatter and HTTP servlet for Prometheus client

License

License

Categories

Categories

Protobuf Data Data Structures Prometheus Application Testing & Monitoring Monitoring
GroupId

GroupId

su.nlq
ArtifactId

ArtifactId

prometheus-protobuf-servlet
Last Version

Last Version

0.6.0
Release Date

Release Date

Type

Type

jar
Description

Description

Prometheus Protobuf Servlet
Protobuf formatter and HTTP servlet for Prometheus client
Project URL

Project URL

https://github.com/nolequen/prometheus-protobuf-servlet
Source Code Management

Source Code Management

https://github.com/nolequen/prometheus-protobuf-servlet

Download prometheus-protobuf-servlet

How to add to project

<!-- https://jarcasting.com/artifacts/su.nlq/prometheus-protobuf-servlet/ -->
<dependency>
    <groupId>su.nlq</groupId>
    <artifactId>prometheus-protobuf-servlet</artifactId>
    <version>0.6.0</version>
</dependency>
// https://jarcasting.com/artifacts/su.nlq/prometheus-protobuf-servlet/
implementation 'su.nlq:prometheus-protobuf-servlet:0.6.0'
// https://jarcasting.com/artifacts/su.nlq/prometheus-protobuf-servlet/
implementation ("su.nlq:prometheus-protobuf-servlet:0.6.0")
'su.nlq:prometheus-protobuf-servlet:jar:0.6.0'
<dependency org="su.nlq" name="prometheus-protobuf-servlet" rev="0.6.0">
  <artifact name="prometheus-protobuf-servlet" type="jar" />
</dependency>
@Grapes(
@Grab(group='su.nlq', module='prometheus-protobuf-servlet', version='0.6.0')
)
libraryDependencies += "su.nlq" % "prometheus-protobuf-servlet" % "0.6.0"
[su.nlq/prometheus-protobuf-servlet "0.6.0"]

Dependencies

compile (3)

Group / Artifact Type Version
org.jetbrains : annotations jar 16.0.3
com.google.protobuf : protobuf-java jar 3.6.1
io.prometheus : simpleclient jar 0.6.0

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.eclipse.jetty : jetty-servlet jar 9.4.14.v20181114
org.eclipse.jetty : jetty-client jar 9.4.14.v20181114

Project Modules

There are no modules declared in this project.

DEPRECATED

The project is no longer supported due to Prometheus no longer supports the Protobuf exposition format.

No Maintenance Intended Build Status Maven Central Codecov Codebeat

Protobuf exposition format support for Prometheus client.

Usage

You can find latest release on Maven Central.

  • Maven:
<dependency>
  <groupId>su.nlq</groupId>
  <artifactId>prometheus-protobuf-servlet</artifactId>
  <version>0.6.0</version>
</dependency>
  • Gradle:
compile group: 'su.nlq', name: 'prometheus-protobuf-servlet', version: '0.6.0'

The simple way to expose the metrics used in your code using Protobuf format is to add ProtobufMetricsServlet to your HTTP server. For example, you may do it with Jetty server:

final Server server = new Server(8080);
final ServletContextHandler context = new ServletContextHandler();
context.setContextPath("/");
server.setHandler(context);

context.addServlet(new ServletHolder(new ProtobufMetricsServlet()), "/metrics");

It also supports time series restriction using ?name[]= URL parameter.

Furthermore it is possible to use ProtobufFormatter directly and expose the result in any other way.

Versions

Version
0.6.0
0.5.0
0.4
0.3
0.2
0.1.0