Giter VIP home page Giter VIP logo

client_java's Introduction

Prometheus JVM Client

It supports Java, Clojure, Scala, JRuby, and anything else that runs on the JVM.

Using

Assets

If you use Maven, you can simply reference the assets below. The latest version can be found on in the maven repository for io.prometheus.

<!-- The client -->
<dependency>
  <groupId>io.prometheus</groupId>
  <artifactId>simpleclient</artifactId>
  <version>0.0.14</version>
</dependency>
<!-- Hotspot JVM metrics-->
<dependency>
  <groupId>io.prometheus</groupId>
  <artifactId>simpleclient_hotspot</artifactId>
  <version>0.0.14</version>
</dependency>
<!-- Exposition servlet-->
<dependency>
  <groupId>io.prometheus</groupId>
  <artifactId>simpleclient_servlet</artifactId>
  <version>0.0.14</version>
</dependency>
<!-- Pushgateway exposition-->
<dependency>
  <groupId>io.prometheus</groupId>
  <artifactId>simpleclient_pushgateway</artifactId>
  <version>0.0.14</version>
</dependency>

Getting Started

There are canonical examples defined in the class definition Javadoc of the client packages.

Documentation

The client is canonically documented with Javadoc. Running the following will produce local documentation in apidocs directories for you to read.

$ mvn package

If you use the Mavenized version of the Prometheus client, you can also instruct Maven to download the Javadoc and source artifacts.

Alternatively, you can also look at the generated Java Client Github Project Page, but the raw Javadoc in Java source in version control should be treated as the canonical form of documentation.

Maintenance of this Library

This suite is built and managed by Maven, and the artifacts are hosted on the Sonatype OSS Asset Repository.

All contributions to this library must follow, as far as practical, the prevalent patterns in the library for consistency and the following style guide: Google Java Style. Depending upon your development environment, you may be able to find an automatic formatter and adherence checker that follows these rules.

Building

$ mvn compile

Testing

$ mvn test

Please note that tests on Travis may be unreliable due to the absence of installed Maven artifacts. Ensure that the current snapshot version is deployed to Sonatype OSS Repository.

Deployment

These steps below are only useful if you are in a release engineering capacity and want to publicize these changes for external users. You will also need to have your local Maven setup correctly along with valid and public GPG key and adequate authorization on the Sonatype OSS Repository to submit new artifacts, be they staging or release ones.

You should read the Sonatype OSS Apache Maven Guide before performing any of the following:

Snapshot Deployment

$ mvn clean deploy

Staging

$ mvn release:clean release:prepare -Prelease
$ mvn release:perform -Prelease

Sonatype creates a staging repository per IP address, so turn off any loadbalancing over IP addresses before running these commands.

Release

Go to https://oss.sonatype.org/#stagingRepositories and Close the ioprometheus-XXX release. Once it's closed, Release it. Wait for the new version to appear in The Central Repository.

Send an email to the developer's mailing list announcing the release.

Documentation

Documentation can also be released to the public via the Github Pages subproduct through the magic gh-pages branch for a Github project. Documentation is generated via the following command:

$ mvn javadoc:aggregate

It will need to be automatically merged into the gh-pages branch, but that is as simple as this:

git checkout master
mvn javadoc:aggregate
git checkout gh-pages
rm -r io src-html
mv target/site/apidocs/* .
git status
# Amend the branch as necessary.
git commit
git push

There is a Maven plugin to perform this work, but it is broken. The javadoc:aggregate step will emit documentation into target/site/apidocs. The reason that we use this aggregate step instead of bare javadoc is that we want one comprehensive Javadoc emission that includes all Maven submodules versus trying to manually concatenate this together.

Output documentation lives in the Java Client Github Project Page.

Historical Note

The version of the Java client in this repository is the "Simpleclient". The previous "Original client" is deprecated, and can be found in the junkyard.

Contact

All of the core developers are accessible via the Prometheus Developers Mailinglist.

Build Status

client_java's People

Contributors

andersschuller avatar beorn7 avatar brian-brazil avatar frankwis avatar fwbrasil avatar jsuchenia avatar juliusv avatar kevinyien avatar matttproud avatar matttproud-soundcloud avatar ming13 avatar ohookins avatar pkubowicz avatar pstibrany avatar tomcz avatar willfleury avatar zimmi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.