From 714b747f0073d6e1284c8020581bb790af56fdd9 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Thu, 13 Jul 2023 15:15:42 +0000 Subject: [PATCH] prometheusreceiver: remove unused buffer_period and buffer_count configuration options --- .chloggen/prometheus-config-cleanup.yaml | 20 +++++++++++++++++++ receiver/prometheusreceiver/config.go | 2 -- .../prometheusreceiver/testdata/config.yaml | 2 -- ...onfig-prometheus-unsupported-features.yaml | 2 -- 4 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 .chloggen/prometheus-config-cleanup.yaml diff --git a/.chloggen/prometheus-config-cleanup.yaml b/.chloggen/prometheus-config-cleanup.yaml new file mode 100644 index 000000000000..0be0919db425 --- /dev/null +++ b/.chloggen/prometheus-config-cleanup.yaml @@ -0,0 +1,20 @@ +# Use this changelog template to create an entry for release notes. +# If your change doesn't affect end users, such as a test fix or a tooling change, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: 'breaking' + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: prometheusreciever + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Remove unused buffer_period and buffer_count configuration options + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [24258] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: diff --git a/receiver/prometheusreceiver/config.go b/receiver/prometheusreceiver/config.go index 455c758b3cd0..89a1e6e345f3 100644 --- a/receiver/prometheusreceiver/config.go +++ b/receiver/prometheusreceiver/config.go @@ -33,8 +33,6 @@ const ( // Config defines configuration for Prometheus receiver. type Config struct { PrometheusConfig *promconfig.Config `mapstructure:"-"` - BufferPeriod time.Duration `mapstructure:"buffer_period"` - BufferCount int `mapstructure:"buffer_count"` // UseStartTimeMetric enables retrieving the start time of all counter metrics // from the process_start_time_seconds metric. This is only correct if all counters on that endpoint // started after the process start time, and the process is the only actor exporting the metric after diff --git a/receiver/prometheusreceiver/testdata/config.yaml b/receiver/prometheusreceiver/testdata/config.yaml index f767602afcc5..f4169812529a 100644 --- a/receiver/prometheusreceiver/testdata/config.yaml +++ b/receiver/prometheusreceiver/testdata/config.yaml @@ -1,7 +1,5 @@ prometheus: prometheus/customname: - buffer_period: 234 - buffer_count: 45 use_start_time_metric: true start_time_metric_regex: '^(.+_)*process_start_time_seconds$' target_allocator: diff --git a/receiver/prometheusreceiver/testdata/invalid-config-prometheus-unsupported-features.yaml b/receiver/prometheusreceiver/testdata/invalid-config-prometheus-unsupported-features.yaml index 3111f1d38dd1..4ed0892f10b2 100644 --- a/receiver/prometheusreceiver/testdata/invalid-config-prometheus-unsupported-features.yaml +++ b/receiver/prometheusreceiver/testdata/invalid-config-prometheus-unsupported-features.yaml @@ -1,6 +1,4 @@ prometheus: - buffer_period: 234 - buffer_count: 45 use_start_time_metric: true start_time_metric_regex: '^(.+_)*process_start_time_seconds$' config: