telemetry: service label updates (#802)

This commit is contained in:
Travis Groth 2020-05-29 15:16:22 -04:00 committed by GitHub
parent 49c323ae73
commit 6761cc7a14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 133 additions and 23 deletions

View file

@ -0,0 +1,15 @@
package telemetry
// ServiceName turns a pomerium service option into the appropriate external label for telemetry purposes
//
// Ex:
// service 'all' -> 'pomerium'
// service 'proxy' -> 'pomerium-proxy'
func ServiceName(service string) string {
switch service {
case "all", "":
return "pomerium"
default:
return "pomerium-" + service
}
}