/
config.go
29 lines (23 loc) · 1.26 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package diskscraper // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/diskscraper"
import (
"github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter/filterset"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal"
"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/diskscraper/internal/metadata"
)
// Config relating to Disk Metric Scraper.
type Config struct {
// MetricsbuilderConfig allows to customize scraped metrics/attributes representation.
metadata.MetricsBuilderConfig `mapstructure:",squash"`
internal.ScraperConfig
// Include specifies a filter on the devices that should be included from the generated metrics.
// Exclude specifies a filter on the devices that should be excluded from the generated metrics.
// If neither `include` or `exclude` are set, metrics will be generated for all devices.
Include MatchConfig `mapstructure:"include"`
Exclude MatchConfig `mapstructure:"exclude"`
}
type MatchConfig struct {
filterset.Config `mapstructure:",squash"`
Devices []string `mapstructure:"devices"`
}