mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 11:08:10 +00:00
@@ -25,6 +25,7 @@ import (
|
||||
|
||||
"github.com/armon/go-metrics"
|
||||
"github.com/armon/go-metrics/circonus"
|
||||
"github.com/armon/go-metrics/datadog"
|
||||
"github.com/hashicorp/errwrap"
|
||||
"github.com/hashicorp/go-multierror"
|
||||
"github.com/hashicorp/vault/audit"
|
||||
@@ -893,6 +894,21 @@ func (c *ServerCommand) setupTelemetry(config *server.Config) error {
|
||||
fanout = append(fanout, sink)
|
||||
}
|
||||
|
||||
if telConfig.DogStatsDAddr != "" {
|
||||
var tags []string
|
||||
|
||||
if telConfig.DogStatsDTags != nil {
|
||||
tags = telConfig.DogStatsDTags
|
||||
}
|
||||
|
||||
sink, err := datadog.NewDogStatsdSink(telConfig.DogStatsDAddr, metricsConf.HostName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to start DogStatsD sink. Got: %s", err)
|
||||
}
|
||||
sink.SetTags(tags)
|
||||
fanout = append(fanout, sink)
|
||||
}
|
||||
|
||||
// Initialize the global sink
|
||||
if len(fanout) > 0 {
|
||||
fanout = append(fanout, inm)
|
||||
|
||||
Reference in New Issue
Block a user