Path: blob/main/component/prometheus/exporter/statsd/statsd.go
4095 views
package statsd12import (3"fmt"45"github.com/grafana/agent/component"6"github.com/grafana/agent/component/prometheus/exporter"7"github.com/grafana/agent/pkg/integrations"8)910func init() {11component.Register(component.Registration{12Name: "prometheus.exporter.statsd",13Args: Arguments{},14Exports: exporter.Exports{},15Build: exporter.New(createExporter, "statsd"),16})17}1819func createExporter(opts component.Options, args component.Arguments) (integrations.Integration, error) {20a := args.(Arguments)21statsdConfig, err := a.Convert()22if err != nil {23return nil, fmt.Errorf("failed to create statsd exporter: %w", err)24}25return statsdConfig.NewIntegration(opts.Logger)26}272829