config

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package config is the pure value-type definition of the stackdriver_exporter configuration. It has no dependencies on the collectors package or any GCP client libraries.

Index

Constants

View Source
const (
	DefaultUniverseDomain       = "googleapis.com"
	DefaultMaxRetries           = 0
	DefaultHTTPTimeout          = 10 * time.Second
	DefaultMaxBackoff           = 5 * time.Second
	DefaultBackoffJitter        = 1 * time.Second
	DefaultMetricsInterval      = 5 * time.Minute
	DefaultMetricsOffset        = 0 * time.Second
	DefaultMetricsIngest        = false
	DefaultFillMissing          = true
	DefaultDropDelegated        = false
	DefaultAggregateDeltas      = false
	DefaultDeltasTTL            = 30 * time.Minute
	DefaultDescriptorTTL        = 0 * time.Second
	DefaultDescriptorGoogleOnly = true
)

Variables

View Source
var DefaultRetryStatuses = []int{http.StatusServiceUnavailable}

DefaultRetryStatuses must be treated as immutable after declaration.

Functions

This section is empty.

Types

type Config

type Config struct {
	ProjectIDs                []string
	ProjectsFilter            string
	UniverseDomain            string
	MaxRetries                int
	HTTPTimeout               time.Duration
	MaxBackoff                time.Duration
	BackoffJitter             time.Duration
	RetryStatuses             []int
	MetricsPrefixes           []string
	MetricsInterval           time.Duration
	MetricsOffset             time.Duration
	MetricsIngestDelay        bool
	FillMissingLabels         bool
	DropDelegatedProjects     bool
	Filters                   []string
	AggregateDeltas           bool
	AggregateDeltasTTL        time.Duration
	DescriptorCacheTTL        time.Duration
	DescriptorCacheOnlyGoogle bool
	// contains filtered or unexported fields
}

func NewConfigWithDefaults

func NewConfigWithDefaults() *Config

NewConfigWithDefaults returns a Config populated with package defaults. Fields without a default (project IDs, metrics prefixes, filters) are left zero and must be set by the caller before Validate succeeds.

func (*Config) Validate

func (c *Config) Validate() error

Validate reports configuration errors that prevent the exporter from starting and marks the Config as validated.

func (*Config) Validated

func (c *Config) Validated() bool

Validated reports whether Validate has been called successfully on c.

Jump to

Keyboard shortcuts

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