Skip to content

Commit

Permalink
fix: change set for prometheus is wrong (#2325)
Browse files Browse the repository at this point in the history
  • Loading branch information
EmrysMyrddin authored Nov 12, 2024
1 parent 0977ef7 commit 8e3529c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .changeset/cold-seals-play.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,17 @@ const getEnveloped = envelop({
graphql_yoga_http_duration: createHistogram({
registry,
histogram: {
name: 'graphql_yoga_http_duration',
name: 'graphql_envelop_request_duration',
help: 'Time spent on HTTP connection',
labelNames: ['operation_name']
},
fillLabelsFn: ({ operationName }, _rawContext) => ({
operation_name: operationName,
}),
phases: ['execute', 'subscribe'],

// Here `shouldObserve` control if the request timing should be observed, based on context
shouldObserve: context => TRACKED_OPERATIONS.includes(context?.params?.operationName),
shouldObserve: (_, context) => TRACKED_OPERATIONS.includes(context?.params?.operationName),
})
},
})
Expand Down

0 comments on commit 8e3529c

Please sign in to comment.