graphql-mesh icon indicating copy to clipboard operation
graphql-mesh copied to clipboard

How to run Prometheus with mesh start without giving an error?

Open jaksonlima opened this issue 4 months ago • 1 comments

🕸️ Mesh - Worker 4 💥 Error: A metric with the name graphql_mesh_fetch_duration has already been registered.

configuração

# ...
serve:
  hostname: 0.0.0.0
  playground: true
  fork: 2
# cors:
#   origin: http://localhost:4001

# ...
sources:
  - name: API-V1
    handler:
      graphql:
        endpoint: ${API_V1:http://localhost:3004/graphql}
  - name: API-V2
    handler:
      graphql:
        endpoint: ${API_V2:http://localhost:3005/graphql}

plugins:
  - prometheus:
      skipIntrospection: true
      requestCount: true
      requestSummary: true
      parse: true
      validate: true
      contextBuilding: true
      execute: true
      errors: true
      delegation: true
      fetch: true
      fetchRequestHeaders: true
      fetchResponseHeaders: true
      http: gateway
      httpRequestHeaders: true
      httpResponseHeaders: true
      deprecatedFields: true
      endpoint: /metrics

jaksonlima avatar Feb 07 '24 19:02 jaksonlima

I get the same issue. My dependencies are as follows:

"@graphql-mesh/plugin-prometheus":` "^0.98.2",
"prom-client": "^15.1.0"

cgpoh avatar Mar 20 '24 08:03 cgpoh