From ed7808e593ef9c0adee8264cf9a2336f7af85174 Mon Sep 17 00:00:00 2001 From: Xander Garbett Date: Mon, 12 Feb 2024 09:50:50 +0000 Subject: [PATCH] Set lowercase names for the profiler to work. (#277) * Set lowercase names for the profiler to work. * Bump versions as well --------- Co-authored-by: Alexander Garbett --- ChangeLog | 4 ++++ VERSION | 2 +- cli/cli.go | 2 +- elan/main.go | 2 +- flair/main.go | 2 +- lucidity/main.go | 2 +- mettle/main.go | 2 +- purity/main.go | 2 +- zeal/main.go | 2 +- 9 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d2bcf2c..77c87da0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Version 11.7.2 +-------------- + * Lower case the service names for the GCP Cloud Profiler to work + Version 11.7.1 -------------- * Use the correct commit of the forked SDK diff --git a/VERSION b/VERSION index 12f895e4..300bd3fe 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -11.7.1 +11.7.2 diff --git a/cli/cli.go b/cli/cli.go index 4a1d4eac..1ad37b14 100644 --- a/cli/cli.go +++ b/cli/cli.go @@ -52,7 +52,7 @@ func ServeAdmin(serviceName string, opts AdminOpts, info logging.LogLevelInfo) { opts.Admin.Logger = logging.MustGetLoggerNamed("github.com.thought-machine.http-admin") opts.Admin.LogInfo = info if opts.EnableGcpProfiling { - setupProfiling(serviceName) + setupProfiling(strings.ToLower(serviceName)) } go admin.Serve(opts.Admin) } diff --git a/elan/main.go b/elan/main.go index ddaff0eb..37d18e8e 100644 --- a/elan/main.go +++ b/elan/main.go @@ -33,6 +33,6 @@ modes are intended for testing only. func main() { _, info := cli.ParseFlagsOrDie("Elan", &opts, &opts.Logging) - go cli.ServeAdmin("Elan", opts.Admin, info) + go cli.ServeAdmin("elan", opts.Admin, info) rpc.ServeForever(opts.GRPC, opts.Storage, opts.Parallelism, opts.DirCacheSize, int64(opts.KnownBlobCacheSize)) } diff --git a/flair/main.go b/flair/main.go index c0c60965..93dcca74 100644 --- a/flair/main.go +++ b/flair/main.go @@ -47,7 +47,7 @@ want to have more than the minimum number of instances of it (hopefully more tha func main() { _, info := cli.ParseFlagsOrDie("Flair", &opts, &opts.Logging) - go cli.ServeAdmin("Flair", opts.Admin, info) + go cli.ServeAdmin("flair", opts.Admin, info) cr := newReplicator(opts.Geometry, opts.Replicas, opts.LoadBalance) ar := newReplicator(opts.AssetGeometry, opts.Replicas, opts.LoadBalance) er := newReplicator(opts.ExecutorGeometry, opts.Replicas, opts.LoadBalance) diff --git a/lucidity/main.go b/lucidity/main.go index aecbf9e6..0825d36d 100644 --- a/lucidity/main.go +++ b/lucidity/main.go @@ -38,6 +38,6 @@ to go along with Zeal, then it could refer to the GTA Lucidity in FreeSpace 2. func main() { _, info := cli.ParseFlagsOrDie("Lucidity", &opts, &opts.Logging) - go cli.ServeAdmin("Lucidity", opts.Admin, info) + go cli.ServeAdmin("lucidity", opts.Admin, info) rpc.ServeForever(opts.GRPC, opts.HTTPPort, time.Duration(opts.MaxAge), opts.MinProportion, opts.IAP.Audience, opts.IAP.Users) } diff --git a/mettle/main.go b/mettle/main.go index c93a5f0f..170fe6c1 100644 --- a/mettle/main.go +++ b/mettle/main.go @@ -157,7 +157,7 @@ updated blobs dominating much of the data downloaded. func main() { cmd, info := cli.ParseFlagsOrDie("Mettle", &opts, &opts.Logging) if cmd != "one" { - go cli.ServeAdmin(fmt.Sprintf("Mettle-%s", cmd), opts.Admin, info) + go cli.ServeAdmin(fmt.Sprintf("mettle-%s", cmd), opts.Admin, info) } if cmd == "dual" { diff --git a/purity/main.go b/purity/main.go index 71499caa..9e8b589e 100644 --- a/purity/main.go +++ b/purity/main.go @@ -64,7 +64,7 @@ retains the "personal characteristics" theme. func main() { cmd, info := cli.ParseFlagsOrDie("Purity", &opts, &opts.Logging) if cmd == "periodic" { - go cli.ServeAdmin("Purity", opts.Admin, info) + go cli.ServeAdmin("purity", opts.Admin, info) } if err := run(cmd); err != nil { log.Fatalf("Failed: %s", err) diff --git a/zeal/main.go b/zeal/main.go index 890254f6..adc73d4a 100644 --- a/zeal/main.go +++ b/zeal/main.go @@ -48,7 +48,7 @@ for the Paladin skill in Diablo II since its job is to bang things down as fast func main() { _, info := cli.ParseFlagsOrDie("Zeal", &opts, &opts.Logging) - go cli.ServeAdmin("Zeal", opts.Admin, info) + go cli.ServeAdmin("zeal", opts.Admin, info) for domain, headers := range opts.Headers { for name, header := range headers {