googlemanagedprometheus

package module
v0.48.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// AddMetricSuffixes controls whether suffixes are added to metric names. Defaults to true.
	AddMetricSuffixes bool `mapstructure:"add_metric_suffixes"`
	// ExtraMetricsConfig configures the target_info and otel_scope_info metrics.
	ExtraMetricsConfig ExtraMetricsConfig `mapstructure:"extra_metrics_config"`
}

Config provides configuration options specific to the GMP translation. It is meant to be embedded in the googlemanagedprometheus configuration.

func DefaultConfig added in v0.43.0

func DefaultConfig() Config

func (Config) ExtraMetrics added in v0.43.0

func (c Config) ExtraMetrics(m pmetric.Metrics)

func (Config) GetMetricName added in v0.43.0

func (c Config) GetMetricName(baseName string, metric pmetric.Metric) (string, error)

GetMetricName returns the metric name with GMP-specific suffixes. The.

func (Config) MapToPrometheusTarget added in v0.43.0

func (c Config) MapToPrometheusTarget(res pcommon.Resource) *monitoredrespb.MonitoredResource

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the exporter configuration is valid.

type ExtraMetricsConfig added in v0.43.0

type ExtraMetricsConfig struct {
	// Add `target_info` metric based on the resource. On by default.
	EnableTargetInfo bool `mapstructure:"enable_target_info"`
	// Add `otel_scope_info` metric and `scope_name`/`scope_version` attributes to all other metrics. On by default.
	EnableScopeInfo bool `mapstructure:"enable_scope_info"`
}

ExtraMetricsConfig controls the inclusion of additional metrics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL