metrics sink update

This commit is contained in:
Brad Rydzewski 2021-05-04 19:11:57 -04:00
parent eaadd82a83
commit e44aae58b4
3 changed files with 12 additions and 0 deletions

View file

@ -211,6 +211,7 @@ func provideDatadog(
sink.Config{
Endpoint: config.Datadog.Endpoint,
Token: config.Datadog.Token,
Contact2: config.Server.Email,
License: license.Kind,
Licensor: license.Licensor,
Subscription: license.Subscription,

View file

@ -19,6 +19,8 @@ type Config struct {
Endpoint string
Token string
Contact1 string
Contact2 string
License string
Licensor string
Subscription string

View file

@ -68,5 +68,14 @@ func createTags(config Config) []string {
tag := fmt.Sprintf("license:%s", config.License)
tags = append(tags, tag)
}
if config.Contact1 != "" {
tag := fmt.Sprintf("contact1:%s", config.Contact1)
tags = append(tags, tag)
}
if config.Contact2 != "" {
tag := fmt.Sprintf("contact2:%s", config.Contact2)
tags = append(tags, tag)
}
return tags
}