You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been trying to get this going with Koa, but I'm unsure how to proceed based on the README. Doing just this as per the README doesn't seem to expose the /metrics endpoint and results in a 404 error:
I figured it out. Unlike other middleware which intercepts and exposes /metrics regardless of what we have in our router filters, this one appears to prevent us from doing something like:
///Return 404s for all other paths
apiRouter.get('/(.*)', async ctx => {
ctx.body = '404: Not found'
ctx.response.status = 404
})
We would have to specifically accommodate /metrics in our router config. I'm unclear why this doesn't work when something like @echo-health/koa-prometheus-exporter exposes the endpoint regardless of what we have in the rest of our router config.
I've been trying to get this going with Koa, but I'm unsure how to proceed based on the README. Doing just this as per the README doesn't seem to expose the
/metrics
endpoint and results in a 404 error:Doing this:
Also results in a 404 error.
A more fully fleshed out example would be much appreciated.
The text was updated successfully, but these errors were encountered: