From d2e4557f7db8a5b3cef0c816f71480109102d1d9 Mon Sep 17 00:00:00 2001 From: TheGuildBot <59414373+theguild-bot@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:32:46 +0300 Subject: [PATCH] Upcoming Release Changes (#3407) Co-authored-by: github-actions[bot] --- ...oga_plugin-prometheus-3391-dependencies.md | 7 -- .changeset/chilly-ladybugs-smoke.md | 53 ----------- .changeset/clever-doors-listen.md | 7 -- .changeset/cuddly-needles-cry.md | 18 ---- packages/plugins/prometheus/CHANGELOG.md | 93 +++++++++++++++++++ packages/plugins/prometheus/package.json | 2 +- 6 files changed, 94 insertions(+), 86 deletions(-) delete mode 100644 .changeset/@graphql-yoga_plugin-prometheus-3391-dependencies.md delete mode 100644 .changeset/chilly-ladybugs-smoke.md delete mode 100644 .changeset/clever-doors-listen.md delete mode 100644 .changeset/cuddly-needles-cry.md diff --git a/.changeset/@graphql-yoga_plugin-prometheus-3391-dependencies.md b/.changeset/@graphql-yoga_plugin-prometheus-3391-dependencies.md deleted file mode 100644 index 22b73bcfc7..0000000000 --- a/.changeset/@graphql-yoga_plugin-prometheus-3391-dependencies.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@graphql-yoga/plugin-prometheus': patch ---- -dependencies updates: - - Updated dependency [`@envelop/prometheus@11.0.0` - ↗︎](https://www.npmjs.com/package/@envelop/prometheus/v/11.0.0) (from `^10.0.0`, in - `dependencies`) diff --git a/.changeset/chilly-ladybugs-smoke.md b/.changeset/chilly-ladybugs-smoke.md deleted file mode 100644 index dd64446a19..0000000000 --- a/.changeset/chilly-ladybugs-smoke.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -'@graphql-yoga/plugin-prometheus': major ---- - -**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. - -```diff -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, -+ } - }) - ] -}) -``` - diff --git a/.changeset/clever-doors-listen.md b/.changeset/clever-doors-listen.md deleted file mode 100644 index c21e6f4d93..0000000000 --- a/.changeset/clever-doors-listen.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@graphql-yoga/plugin-prometheus': minor ---- - -Add missing labels `path` and `phase` of `graphql_envelop_error_result` metric to the configuration. - -Add missing labels `method` and `statusCode` of `graphql_yoga_http_duration` metric to the configuration. diff --git a/.changeset/cuddly-needles-cry.md b/.changeset/cuddly-needles-cry.md deleted file mode 100644 index 1d265ef805..0000000000 --- a/.changeset/cuddly-needles-cry.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@graphql-yoga/plugin-prometheus': major ---- - -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` diff --git a/packages/plugins/prometheus/CHANGELOG.md b/packages/plugins/prometheus/CHANGELOG.md index 43f2200107..2e2dfec571 100644 --- a/packages/plugins/prometheus/CHANGELOG.md +++ b/packages/plugins/prometheus/CHANGELOG.md @@ -1,5 +1,98 @@ # @graphql-yoga/plugin-prometheus +## 6.0.0 + +### Major Changes + +- [#3391](https://github.com/dotansimha/graphql-yoga/pull/3391) + [`0788d8a`](https://github.com/dotansimha/graphql-yoga/commit/0788d8ab90642a87af0623cfacfdb85aa9f38500) + Thanks [@EmrysMyrddin](https://github.com/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. + + ```diff + 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](https://github.com/dotansimha/graphql-yoga/pull/3408) + [`88393b3`](https://github.com/dotansimha/graphql-yoga/commit/88393b3fae602c969ce99a0075439e1322c896d3) + Thanks [@dotansimha](https://github.com/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](https://github.com/dotansimha/graphql-yoga/pull/3391) + [`0788d8a`](https://github.com/dotansimha/graphql-yoga/commit/0788d8ab90642a87af0623cfacfdb85aa9f38500) + Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - Add missing labels `path` and `phase` + of `graphql_envelop_error_result` metric to the configuration. + + Add missing labels `method` and `statusCode` of `graphql_yoga_http_duration` metric to the + configuration. + +### Patch Changes + +- [#3391](https://github.com/dotansimha/graphql-yoga/pull/3391) + [`0788d8a`](https://github.com/dotansimha/graphql-yoga/commit/0788d8ab90642a87af0623cfacfdb85aa9f38500) + Thanks [@EmrysMyrddin](https://github.com/EmrysMyrddin)! - dependencies updates: + - Updated dependency + [`@envelop/prometheus@11.0.0` ↗︎](https://www.npmjs.com/package/@envelop/prometheus/v/11.0.0) + (from `^10.0.0`, in `dependencies`) + ## 5.3.3 ### Patch Changes diff --git a/packages/plugins/prometheus/package.json b/packages/plugins/prometheus/package.json index 5e8dc063ec..83ed38268a 100644 --- a/packages/plugins/prometheus/package.json +++ b/packages/plugins/prometheus/package.json @@ -1,6 +1,6 @@ { "name": "@graphql-yoga/plugin-prometheus", - "version": "5.3.3", + "version": "6.0.0", "type": "module", "description": "Prometheus plugin for GraphQL Yoga.", "repository": {