Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.prometheus:client_java:1.3.1'
}
dependencies {
implementation("com.github.prometheus:client_java:1.3.1")
}
<dependency>
<groupId>com.github.prometheus</groupId>
<artifactId>client_java</artifactId>
<version>1.3.1</version>
</dependency>
libraryDependencies += "com.github.prometheus" % "client_java" % "1.3.1"
:dependencies [[com.github.prometheus/client_java "1.3.1"]]
<a href="#"><img src="https://img.shields.io/badge/JDK%20compatibility-8+-blue.svg" alt="java 8+"></a> <a href="#"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="Apache 2.0"></a> # editorconfig-checker-disable-line
https://prometheus.github.io/client_java
See CONTRIBUTING.md and the community section of the Prometheus homepage.
The Prometheus Java community is present on the CNCF Slack on
#prometheus-java
, and we have a fortnightly community call in
the Prometheus public calendar.
The source code for 0.16.0 and older is on the simpleclient branch.
Apache License 2.0, see LICENSE.