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{ sink.Config{
Endpoint: config.Datadog.Endpoint, Endpoint: config.Datadog.Endpoint,
Token: config.Datadog.Token, Token: config.Datadog.Token,
Contact2: config.Server.Email,
License: license.Kind, License: license.Kind,
Licensor: license.Licensor, Licensor: license.Licensor,
Subscription: license.Subscription, Subscription: license.Subscription,

View file

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

View file

@ -68,5 +68,14 @@ func createTags(config Config) []string {
tag := fmt.Sprintf("license:%s", config.License) tag := fmt.Sprintf("license:%s", config.License)
tags = append(tags, tag) 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 return tags
} }