Prometheus Endpoint is not available #1543
-
I set the Prometheus by adding the plugin like }) with graph-mesh, but i cannot see the metrics in /metrics path. What is the right way to expose the metrics info to an endpoint? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @chengyak ! With the pure Envelop plugin
In GraphQL-Mesh, we have a configuration to set this up automatically for you, so you don't need to use the raw Envelop plugin, and you should use the Mesh plugin for Prom (see https://www.the-guild.dev/graphql/mesh/docs/plugins/prometheus). |
Beta Was this translation helpful? Give feedback.
Hi @chengyak !
With the pure Envelop plugin
usePrometheus
, we do not provide the service or the runtime for the Prom server.Since this plugin only hooks to your
prom-client
instance, you should use the same instance, and just return it over JSON response, something like:In GraphQL-Mesh, we have a configuration to set this up automatically for you, so you don't need to use the raw Envelop plugin, and you should use the Mesh plugin for Prom (see https://www.the-guild.dev/graphql/mesh/docs/plugins/prome…