spring boot shows all the possible metrics in /metrics
endpoint. on the other hand, internally it uses metrics exporters. for example when you add dropwizard metrics (current de facto standard?) it gets registered automatically but not all spring-boot metrics are exported to dropwizard. in order to have more/all metrics, one has to manually register different metric sets. and it has to be maintained in parallel to what spring-boot does for /metrics
endpoint.
so the question is: how it should be done properly? should i use metrics exporters and maintain it for each of dozens microservices or use Collection<PublicMetrics>
used by /metrics
endpoint and maintained by spring?
Use only dropwizard metrics to instrument your code since it has a more intuitive API then the Spring.
With the spring-dropwizard ( http://metrics.ryantenney.com/ ) integration, all dropwizard metrics are getting exposed to the endpoint /metrics, so you do not need to register anything manually.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.