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
Is your feature request related to a problem? Please describe.
We are using hive-gateway and the prometheus plugin. We want to conditionally use graphql_yoga_http_duration for certain operations only, but it can only always be used or never be used.
Describe the solution you'd like
metrics: {graphql_yoga_http_duration: createHistogram({
registry,histogram: {name: 'graphql_yoga_http_duration',help: 'Time spent on HTTP connection',labelNames: ['operation_name'],buckets: HISTOGRAM_BUCKET_DIMENSIONS,},fillLabelsFn: ({ operationName },_rawContext)=>({operation_name: operationName,}),// A hook to decide when recording should be madeshouldRecordFn: ({ operationName },_rawContext)=>TRACKED_OPERATIONS.includes(operationName),}),},
Describe alternatives you've considered
Build our own middleware stack mostly duplicating everything
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
We are using
hive-gateway
and the prometheus plugin. We want to conditionally usegraphql_yoga_http_duration
for certain operations only, but it can only always be used or never be used.Describe the solution you'd like
Describe alternatives you've considered
Build our own middleware stack mostly duplicating everything
The text was updated successfully, but these errors were encountered: