Unleash / unleash-proxy

Unleash Proxy is used to safely integrate frontend application with Unleash in a secure and scaleable way.
https://docs.getunleash.io/sdks/unleash-proxy
Apache License 2.0
48 stars 42 forks source link

Add option to expose metrics via prometheus endpoint #138

Open artur-fijalkowski opened 1 year ago

artur-fijalkowski commented 1 year ago

Right now prometheus endpoint is not very useful for actual monitoring because it just responds with

# HELP unleash_proxy_up Indication that the service is up. 
# TYPE unleash_proxy_up counter
unleash_proxy_up 1

But if clients send metrics, then this endpoint could expose those metrics. This would be useful for users using feature flag providers that do not support metrics direclty (eg. gitlab feature flags).

robmonct commented 1 year ago

@artur-fijalkowski How you can get that metric?

evsasha commented 9 months ago

@robmonct The path is not very intuitive: http://unleash-proxy/proxy/internal-backstage/prometheus

https://github.com/Unleash/unleash-proxy/blob/2e73af56571546e2bd78ac50a14a928840f54832/src/test/__snapshots__/openapi.test.ts.snap#L1276

robmonct commented 9 months ago

Thank you @evsasha