Skip to content

This is an implementation of a HystrixMetricsPublisher that publishes metrics using the Prometheus java client.

License

Notifications You must be signed in to change notification settings

benzvan/prometheus-hystrix

 
 

Repository files navigation

prometheus-hystrix-metrics-publisher

This is an implementation of a HystrixMetricsPublisher that publishes metrics using Prometheus' SimpleClient.

prometheus hystrix prometheus hystrix

See the Netflix Metrics & Monitoring Wiki for more information.

This continues the work started at SoundCloud. The roadmap is the following:

USAGE

Include the most recent release from Maven Central in your build configuration.

<dependency>
    <groupId>de.ahus1.prometheus.hystrix</groupId>
    <artifactId>prometheus-hystrix</artifactId>
    <version>3.x.x</version>
</dependency>

Register the metrics publisher for your application’s namespace and the default Prometheus CollectorRegistry with Hystrix.

import com.soundcloud.prometheus.hystrix.HystrixPrometheusMetricsPublisher;

// ...

HystrixPrometheusMetricsPublisher.register("application_name");

Register the publisher for your application’s namespace with your own Prometheus CollectorRegistry with Hystrix.

import com.soundcloud.prometheus.hystrix.HystrixPrometheusMetricsPublisher;
import io.prometheus.client.CollectorRegistry;

// ...

CollectorRegistry registry = // ...
HystrixPrometheusMetricsPublisher.register("application_name", registry);

DEVELOPMENT

Run ./mvnw package to compile, test and JARs locally.

The most recent development version (based on the master branch on GitHub) is available from the Sonatype OSS Snapshot Repository. To use it, include the following repository in your pom.xml.

<repositories>
    <repository>
        <id>snapshots-repo</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <releases><enabled>false</enabled></releases>
        <snapshots><enabled>true</enabled></snapshots>
    </repository>
</repositories>

LICENSE

Copyright 2014-2017 SoundCloud, Inc., Alexander Schwartz and Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

This is an implementation of a HystrixMetricsPublisher that publishes metrics using the Prometheus java client.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 82.6%
  • Shell 9.8%
  • Batchfile 7.6%