Files
Carles GarciaandGitHub 7c8b1bd83f generator: extract validation to reusable package (#5854)
* generator: extract validation to reusable package

We will also use these functions for the config Controller

* wip

* update deprecated label validation

* fix intrinsic dimensions

* add span metrics subprocessor comments
2025-11-12 13:43:50 +01:00

23 lines
611 B
Go

package hostinfo
import (
"flag"
)
const (
defaultHostInfoMetric = "traces_host_info"
)
type Config struct {
// HostIdentifiers defines the list of resource attributes used to derive
// a unique `grafana.host.id` value. In most cases, this should be [ "host.id" ]
HostIdentifiers []string `yaml:"host_identifiers"`
// MetricName defines the name of the metric that will be generated
MetricName string `yaml:"metric_name"`
}
func (cfg *Config) RegisterFlagsAndApplyDefaults(string, *flag.FlagSet) {
cfg.HostIdentifiers = []string{"k8s.node.name", "host.id"}
cfg.MetricName = defaultHostInfoMetric
}