mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 18:36:30 +02:00
15 lines
348 B
Go
15 lines
348 B
Go
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
|
|
}
|
|
}
|