Netflix / zuul

Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more.
Apache License 2.0
13.45k stars 2.37k forks source link

How to collect Metrics in Spring-Cloud Zuul #331

Open jcperezamin opened 7 years ago

jcperezamin commented 7 years ago

We wanted our metrics to be captured at ZUUL itself so that a simple counter is implemented in ZUUL and that would provide us the required metrics. Any suggestion in how to implement this would be helpful.

Thanks!

spencergibb commented 7 years ago

This is not the spring cloud issue tracker

jcperezamin commented 7 years ago

Thanks for your feedback. Do you know the exact link to question this?

milon619 commented 7 years ago

@spencergibb basically what we are trying to gather are some key metrics like API hit count per minute, Response time, connection errors and any other such useful info from Zuul. Is there a way to have these stats exposed natively from Zuul ?

For Netflix Eureka I have seen that there are some REST operations supported. Is there a similar feature for Zuul also ?

https://github.com/Netflix/eureka/wiki/Eureka-REST-operations

artgon commented 7 years ago

Internally, we use Atlas for all of our metrics: https://github.com/netflix/atlas

milon619 commented 7 years ago

@artgon , Atlas works by pulling metric data from different microservices or is it a "push" model ? Also what approach is used to expose metrics from Zuul ?

brharrington commented 7 years ago

@milon619 Atlas primarily uses a push model, but in some cases we have "pollers" that pull from sources and do a push. Usually it works by instrumenting the code using spectator (or servo for older libs/apps) and then when running internally our plugin will be connected to the registry and figure out how to send in to the appropriate Atlas backend.

hartmut-pq commented 7 years ago

Hi all, with spring boot 2.0 there's http://micrometer.io/ coming as ~spring-metrics. Are there any plans to support zuul metrics? What kind of metrics are available / are you pushing to atlas currently? Can I find a reference / code sample?

Would be happy to contribute...!

ghost commented 5 years ago

@artgon can you give a code sample about zuul2 work together with Atlas?