m/n/c/curator: inject Spans into RPCs, log events

This uses the new Span/Trace API in the RPC library to inject some spans
into all Curator RPC handlers, and converts a bunch of TODO: add logging
comments into Trace(ctx).Printf.

Change-Id: Ie480fa7020246b60befa024e000f9e452daabe0c
Reviewed-on: https://review.monogon.dev/c/monogon/+/542
Reviewed-by: Leopold Schabel <leo@nexantic.com>
diff --git a/metropolis/pkg/supervisor/supervisor.go b/metropolis/pkg/supervisor/supervisor.go
index ef7b909..9865279 100644
--- a/metropolis/pkg/supervisor/supervisor.go
+++ b/metropolis/pkg/supervisor/supervisor.go
@@ -187,3 +187,14 @@
 	dn := fmt.Sprintf("%s.%s", node.dn(), name)
 	return node.sup.logtree.LeveledFor(logtree.DN(dn))
 }
+
+// MustSubLogger is a wrapper around SubLogger which panics on error. Errors
+// should only happen due to invalid names, so as long as the given name is
+// compile-time constant and valid, this function is safe to use.
+func MustSubLogger(ctx context.Context, name string) logtree.LeveledLogger {
+	l, err := SubLogger(ctx, name)
+	if err != nil {
+		panic(err)
+	}
+	return l
+}