Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
NewFactory returns the component factory for the awscloudwatchreceiver
Types ¶
type AutodiscoverConfig ¶
type AutodiscoverConfig struct {
Prefix string `mapstructure:"prefix"`
Pattern string `mapstructure:"pattern"`
Limit int `mapstructure:"limit"`
Streams StreamConfig `mapstructure:"streams"`
AccountIdentifiers []string `mapstructure:"account_identifiers"`
IncludeLinkedAccounts *bool `mapstructure:"include_linked_accounts"`
}
AutodiscoverConfig is the configuration for the autodiscovery functionality of log groups
type Config ¶
type Config struct {
Region string `mapstructure:"region"`
Profile string `mapstructure:"profile"`
IMDSEndpoint string `mapstructure:"imds_endpoint"`
Logs LogsConfig `mapstructure:"logs"`
Metrics MetricsConfig `mapstructure:"metrics"`
StorageID *component.ID `mapstructure:"storage"`
}
Config is the overall config structure for the awscloudwatchreceiver
type GroupConfig ¶
type GroupConfig struct {
AutodiscoverConfig *AutodiscoverConfig `mapstructure:"autodiscover,omitempty"`
NamedConfigs map[string]StreamConfig `mapstructure:"named"`
}
GroupConfig is the configuration for log group collection
type LogsConfig ¶
type LogsConfig struct {
StartFrom string `mapstructure:"start_from"`
InitialLookback time.Duration `mapstructure:"initial_lookback"`
PollInterval time.Duration `mapstructure:"poll_interval"`
MaxEventsPerRequest int `mapstructure:"max_events_per_request"`
Groups GroupConfig `mapstructure:"groups"`
}
LogsConfig is the configuration for the logs portion of this receiver
type MetricQuery ¶ added in v0.153.0
type MetricQuery struct {
Namespace string `mapstructure:"namespace"`
MetricName string `mapstructure:"metric_name"`
Dimensions map[string]string `mapstructure:"dimensions"`
Stats []string `mapstructure:"stats"`
}
MetricQuery defines a single CloudWatch metric to scrape via GetMetricData. When Stats is empty all four statistics (Sum, SampleCount, Minimum, Maximum) are fetched and combined into an OpenTelemetry Summary metric aligned with the CloudWatch Metric Streams OpenTelemetry 1.0.0 format. When Stats is set, each named statistic is fetched and emitted as a separate Gauge data point on the same metric, with a "stat" attribute identifying the statistic. CloudWatch statistic names: Sum, Average, Minimum, Maximum, SampleCount, p99, p95, etc.
type MetricsConfig ¶ added in v0.153.0
type MetricsConfig struct {
scraperhelper.ControllerConfig `mapstructure:",squash"`
// Period is the CloudWatch statistics aggregation window. Defaults to 5m.
Period time.Duration `mapstructure:"period"`
// Delay shifts the query window back from now to account for CloudWatch metric publication latency.
// CloudWatch metrics are typically available within 3–10 minutes of being recorded.
// Defaults to 10m.
Delay time.Duration `mapstructure:"delay"`
Queries []MetricQuery `mapstructure:"queries"`
Discovery *MetricsDiscoveryConfig `mapstructure:"discovery"`
}
MetricsConfig is the configuration for the metrics (GetMetricData) portion of this receiver. Either Metrics (explicit list) or Discovery (ListMetrics-based) may be set, not both. Collection interval and scraper behavior are controlled via the embedded ControllerConfig.
func (*MetricsConfig) Validate ¶ added in v0.153.0
func (m *MetricsConfig) Validate() error
Validate overrides the embedded ControllerConfig.Validate so that a zero CollectionInterval does not cause a validation error when metrics collection is not configured. The scraper framework requires a positive CollectionInterval only when the metrics controller is started.
type MetricsDiscoveryConfig ¶ added in v0.153.0
type MetricsDiscoveryConfig struct {
Filters configoptional.Optional[MetricsDiscoveryFilters] `mapstructure:"filters"`
Limit int `mapstructure:"limit"` // max metrics to discover and scrape (default 100)
// Stats selects which CloudWatch statistics to fetch for all discovered metrics.
// Same semantics as MetricQuery.Stats.
Stats []string `mapstructure:"stats"`
}
MetricsDiscoveryConfig configures automatic discovery of metrics via ListMetrics. Discovered metrics are then scraped with GetMetricData. Mutually exclusive with metrics (explicit list).
type MetricsDiscoveryFilters ¶ added in v0.153.0
type MetricsDiscoveryFilters struct {
Namespace string `mapstructure:"namespace"`
MetricName string `mapstructure:"metric_name"`
}
MetricsDiscoveryFilters optionally narrows which metrics are discovered. When absent, all metrics in all namespaces are discovered.
type StreamConfig ¶
type StreamConfig struct {
Prefixes []*string `mapstructure:"prefixes"`
Names []*string `mapstructure:"names"`
}
StreamConfig represents the configuration for the log stream filtering