From d9080b0674d70843cc839c9973f132a679318ff8 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 11 Aug 2022 17:44:15 +0200 Subject: [PATCH] Remove `delay_interval` in telemetry configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It does nothing. It was added in 74b20a3671c1745828f75f93ad36bad305904580 / https://github.com/apollographql/router/pull/782 and was already doing nothing then. I haven’t found someone who can guess what it might have been meant to be. --- NEXT_CHANGELOG.md | 18 +++++++++++++++- ...nfiguration__tests__schema_generation.snap | 21 ------------------- apollo-router/src/plugins/telemetry/config.rs | 2 -- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 3c2ff71e7a..5312651b34 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -23,10 +23,26 @@ Description! And a link to a [reference](http://url) By [@USERNAME](https://github.com/USERNAME) in https://github.com/apollographql/router/pull/PULL_NUMBER --> -# [0.15.1] (unreleased) - 2022-mm-dd +# [0.16] (unreleased) - 2022-mm-dd ## ❗ BREAKING ❗ +### Removed `delay_interval` in telemetry configuration. [PR #FIXME] + +It was doing nothing. + +```yaml title="router.yaml" +telemetry: + metrics: + common: + # Removed, will now cause an error on Router startup: + delay_interval: + secs: 9 + nanos: 500000000 +``` + +By [@SimonSapin](https://github.com/SimonSapin) + ## 🚀 Features ### Add support of global rate limit and timeout. [PR #1347](https://github.com/apollographql/router/pull/1347) diff --git a/apollo-router/src/configuration/snapshots/apollo_router__configuration__tests__schema_generation.snap b/apollo-router/src/configuration/snapshots/apollo_router__configuration__tests__schema_generation.snap index 622c2fa8e1..dd58ee074d 100644 --- a/apollo-router/src/configuration/snapshots/apollo_router__configuration__tests__schema_generation.snap +++ b/apollo-router/src/configuration/snapshots/apollo_router__configuration__tests__schema_generation.snap @@ -1,6 +1,5 @@ --- source: apollo-router/src/configuration/mod.rs -assertion_line: 914 expression: "&schema" --- { @@ -1275,26 +1274,6 @@ expression: "&schema" "additionalProperties": false, "nullable": true }, - "delay_interval": { - "type": "object", - "required": [ - "nanos", - "secs" - ], - "properties": { - "nanos": { - "type": "integer", - "format": "uint32", - "minimum": 0.0 - }, - "secs": { - "type": "integer", - "format": "uint64", - "minimum": 0.0 - } - }, - "nullable": true - }, "resources": { "description": "Resources", "default": {}, diff --git a/apollo-router/src/plugins/telemetry/config.rs b/apollo-router/src/plugins/telemetry/config.rs index 9e65a55ad8..a32e5a54dc 100644 --- a/apollo-router/src/plugins/telemetry/config.rs +++ b/apollo-router/src/plugins/telemetry/config.rs @@ -1,7 +1,6 @@ //! Configuration for the telemetry plugin. use std::borrow::Cow; use std::collections::BTreeMap; -use std::time::Duration; use opentelemetry::sdk::Resource; use opentelemetry::Array; @@ -59,7 +58,6 @@ pub struct Metrics { #[derive(Clone, Default, Debug, Deserialize, JsonSchema)] #[serde(deny_unknown_fields, rename_all = "snake_case")] pub struct MetricsCommon { - pub delay_interval: Option, /// Configuration to add custom labels/attributes to metrics pub attributes: Option, #[serde(default)]