n1ru4l / envelop

Envelop is a lightweight library allowing developers to easily develop, share, collaborate and extend their GraphQL execution layer. Envelop is the missing GraphQL plugin system.
https://envelop.dev
MIT License
787 stars 127 forks source link

Prometheus plugin adds undefined label to histograms when label is excluded from config. #2149

Closed darren-west closed 9 months ago

darren-west commented 9 months ago

When using the Prometheus plugin for envelop when the configuration options are set to exclude operationName or operationType the label gets added as undefined rather than excluded. Because of this line here.

This leaves you with metrics like so

graphql_envelop_phase_execute_bucket{le="0.005",operationName="undefined",operationType="query"} 0

That the metric does not have the operationName when it is filtered via config.

ardatan commented 9 months ago

Fixed in the latest release! Thanks for the feedback!