Skip to content

Commit

Permalink
prometheusreceiver: remove unused buffer_period and buffer_count conf…
Browse files Browse the repository at this point in the history
…iguration options (#24257)

**Description:**

Fixes #24258

Found while adding documentation for
#24256.
The prometheus receiver had two config options that AFAICT have never
been used.

The config options have existed since the very first commit ever for the
Prometheus receiver:
7c728ef


Co-authored-by: Dmitrii Anoshin <[email protected]>
  • Loading branch information
dashpole and dmitryax authored Jul 21, 2023
1 parent 1c36f05 commit 20b3071
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
20 changes: 20 additions & 0 deletions .chloggen/prometheus-config-cleanup.yaml
Original file line number Diff line number Diff line change
@@ -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:
2 changes: 0 additions & 2 deletions receiver/prometheusreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ const (
type Config struct {
PrometheusConfig *promconfig.Config `mapstructure:"-"`
TrimMetricSuffixes bool `mapstructure:"trim_metric_suffixes"`
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
Expand Down
2 changes: 0 additions & 2 deletions receiver/prometheusreceiver/testdata/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
prometheus:
prometheus/customname:
buffer_period: 234
buffer_count: 45
trim_metric_suffixes: true
use_start_time_metric: true
start_time_metric_regex: '^(.+_)*process_start_time_seconds$'
Expand Down
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 20b3071

Please sign in to comment.