1234567891011121314151617181920212223242526272829303132333435 |
- // Copyright The OpenTelemetry Authors
- // SPDX-License-Identifier: Apache-2.0
- package activedirectorydsreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver"
- import (
- "time"
- "go.opentelemetry.io/collector/component"
- "go.opentelemetry.io/collector/receiver"
- "go.opentelemetry.io/collector/receiver/scraperhelper"
- "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver/internal/metadata"
- )
- const (
- defaultCollectionInterval = 10 * time.Second
- )
- func NewFactory() receiver.Factory {
- return receiver.NewFactory(
- metadata.Type,
- createDefaultConfig,
- receiver.WithMetrics(createMetricsReceiver, metadata.MetricsStability),
- )
- }
- func createDefaultConfig() component.Config {
- cfg := scraperhelper.NewDefaultScraperControllerSettings(metadata.Type)
- cfg.CollectionInterval = defaultCollectionInterval
- return &Config{
- ScraperControllerSettings: cfg,
- MetricsBuilderConfig: metadata.DefaultMetricsBuilderConfig(),
- }
- }
|