Skip to content

Commit

Permalink
Mark prometheus exporter as mutable since it sorts attributes (open-t…
Browse files Browse the repository at this point in the history
…elemetry#16498)

Fixes open-telemetry#16498

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu authored and shalper2 committed Dec 6, 2022
1 parent 2419a13 commit 1da68c3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .chloggen/fixprommuta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: bug_fix

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: prometheusexporter

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Mark prometheus exporter as mutable since it sorts attributes

# One or more tracking issues related to the change
issues: [16499]

3 changes: 2 additions & 1 deletion exporter/prometheusexporter/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ func createMetricsExporter(
set,
cfg,
prometheus.ConsumeMetrics,
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: false}),
// TODO: Consider to revert to non mutable data, need to not modify the incoming data, like sorting when calculating the signature.
exporterhelper.WithCapabilities(consumer.Capabilities{MutatesData: true}),
exporterhelper.WithStart(prometheus.Start),
exporterhelper.WithShutdown(prometheus.Shutdown),
)
Expand Down

0 comments on commit 1da68c3

Please sign in to comment.