Skip to content

Commit

Permalink
Update exporters/prometheus/config.go
Browse files Browse the repository at this point in the history
Co-authored-by: Tyler Yahn <[email protected]>
  • Loading branch information
Alex Boten and MrAlias authored Nov 30, 2023
1 parent 88d070c commit 930ff09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions exporters/prometheus/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,10 @@ func WithNamespace(ns string) Option {
})
}

// WithResourceAsConstantLabels adds resource attributes as metric attributes
// on all metrics exported by the Prometheus Exporter.
// WithResourceAsConstantLabels configures the Exporter to add the resource attributes the
// resourceFilter returns true for as attributes on all exported metrics.
//
// The does not affect the target info generated from resource attributes.
func WithResourceAsConstantLabels(resourceFilter attribute.Filter) Option {
return optionFunc(func(cfg config) config {
cfg.resourceAttributesFilter = resourceFilter
Expand Down

0 comments on commit 930ff09

Please sign in to comment.