mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
telemetry: service label updates (#802)
This commit is contained in:
parent
49c323ae73
commit
6761cc7a14
13 changed files with 133 additions and 23 deletions
15
internal/telemetry/util.go
Normal file
15
internal/telemetry/util.go
Normal 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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue