func generateCorrelationID()

in internal/mode/advanced/advanced.go [226:239]


func generateCorrelationID() string {
	var err error

	cid := os.Getenv(envCorrelationIDKey)
	if cid == "" {
		if cid, err = correlation.RandomID(); err != nil {
			// Should never happen since correlation.RandomID() should not fail,
			// but if it does we return empty string, which is fine.
			logkit.WithError(err).Error("Unable to generate random correlation ID")
		}
	}

	return cid
}