Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion datadog/dogstatsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,17 @@ func NewDogStatsdSink(addr string, hostName string) (*DogStatsdSink, error) {
if err != nil {
return nil, err
}
return NewDogStatsdSinkFromClient(client, hostName), nil
}

// NewDogStatsdSinkFromClient is used to create a new DogStatsdSink with an existing datadog-statsd client
func NewDogStatsdSinkFromClient(client *statsd.Client, hostName string) *DogStatsdSink {
sink := &DogStatsdSink{
client: client,
hostName: hostName,
propagateHostname: false,
}
return sink, nil
return sink
}

// SetTags sets common tags on the Dogstatsd Client that will be sent
Expand Down