From a7654ff43eaf2f7dcd2c21a36f43f88c6cb177b2 Mon Sep 17 00:00:00 2001 From: Jesse Peterson Date: Mon, 4 Apr 2022 09:52:04 -0700 Subject: [PATCH] Add back trace ID comments --- cmd/nanomdm/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/nanomdm/main.go b/cmd/nanomdm/main.go index d938869..e07ea4d 100644 --- a/cmd/nanomdm/main.go +++ b/cmd/nanomdm/main.go @@ -203,6 +203,10 @@ func main() { logger.Info(logs...) } +// newTraceID generates a new HTTP trace ID for context logging. +// Currently this just makes a random string. This would be better +// served by e.g. https://github.com/oklog/ulid or something like +// https://opentelemetry.io/ someday. func newTraceID() string { b := make([]byte, 8) rand.Read(b)