August 14, 2024
theguild-bot
released this
14 Aug 11:37
·
40 commits
to main
since this release
@graphql-yoga/[email protected]
Major Changes
-
#3391
0788d8a
Thanks @EmrysMyrddin! - Breaking Change: Rename all metrics
options to their actual metric name to avoid confusion.All metric options have been moved under a mandatory
metrics
key, and the name of each options
have been renamed to match the default metric name.The plugin option argument is also now mandatory.
export const serveConfig = defineConfig({ plugins: pluginCtx => [ usePrometheus({ ...pluginCtx, // Enable all available metrics - http: true - requestSummary: true, - parse: true, - validate: true, - contextBuilding: true, - execute: true, - subscribe: true, - errors: true, - deprecatedFields: true, - requestTotalDuration: true, - schemaChangeCount: true, // Warning: enabling resolvers level metrics will introduce significant overhead - resolvers: true, + metrics: { + graphql_yoga_http_duration: true, + graphql_envelop_request_time_summary: true, + graphql_envelop_phase_parse: true, + graphql_envelop_phase_validate: true, + graphql_envelop_phase_context: true, + graphql_envelop_phase_execute: true, + graphql_envelop_phase_subscribe: true, + graphql_envelop_error_result: true, + graphql_envelop_deprecated_field: true, + graphql_envelop_request_duration: true, + graphql_envelop_schema_change: true, // Warning: enabling resolvers level metrics will introduce significant overhead + graphql_envelop_execute_resolver: true, + } }) ] })
-
#3408
88393b3
Thanks @dotansimha! - By default, the following metrics are now
enabled:graphql_envelop_deprecated_field
graphql_envelop_request
graphql_envelop_request_duration
graphql_envelop_request_time_summary
graphql_envelop_phase_parse
graphql_envelop_phase_validate
graphql_envelop_phase_context
graphql_envelop_error_result
graphql_envelop_phase_execute
graphql_envelop_phase_subscribe
graphql_envelop_schema_change
graphql_yoga_http_duration
Minor Changes
-
#3391
0788d8a
Thanks @EmrysMyrddin! - Add missing labelspath
andphase
ofgraphql_envelop_error_result
metric to the configuration.Add missing labels
method
andstatusCode
ofgraphql_yoga_http_duration
metric to the
configuration.
Patch Changes
- #3391
0788d8a
Thanks @EmrysMyrddin! - dependencies updates:- Updated dependency
@envelop/[email protected]
↗︎
(from^10.0.0
, independencies
)
- Updated dependency