Skip to content

spring-metrics-grabber for listing all metrics with value on single endpoint.(just like spring boot 1.x metrics endpoint)

Notifications You must be signed in to change notification settings

csankhala/spring-metrics-grabber

Repository files navigation

spring-metrics-grabber

spring-metrics-grabber publish metrics with value on single endpoint '/metricx'

Building from Source

$ ./gradlew clean build

How to use

  • Add dependency in you application from local repository
compile("org.springframework.boot:spring-metrics-grabber:1.0.0-SNAPSHOT");
compile("org.springframework.boot:spring-boot-starter-actuator");
  • Add MetricxEndpoint.class to @SpringBootApplication scan path
import org.springframework.metricx.controller.MetricxEndpoint;

@SpringBootApplication(scanBasePackageClasses = { MetricxEndpoint.class, YourSpringBootApplication.class })
public class YourSpringBootApplication {
	public static void main(String[] args) {
		new SpringApplication(YourSpringBootApplication.class).run(args);
	}
}
  • Alternatively provide a @Bean of type MetricxEndpoint in your application configuration

  • All Metrics will be published on '/metricx' endpoint with name and value both

  • Pattern search is also supported e.g. '/metricx/jvm.*'

Configuration

  • 'metricx.exposure.prefix' : Default empty so it will publish all metrics.
    if configured, only those metrics will be published which has matches configured prefix.

Example: metricx.exposure.prefix=counter,
only those metrics will be published which are starting with 'counter'

About

spring-metrics-grabber for listing all metrics with value on single endpoint.(just like spring boot 1.x metrics endpoint)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages