Skip to content

Commit

Permalink
Remove hyphens from uuid generated correlation id
Browse files Browse the repository at this point in the history
  • Loading branch information
coolwednesday committed Sep 26, 2024
1 parent 94f33bf commit f568a40
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/gofr/http/middleware/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ func getIDs(requestCtx context.Context) (ctx context.Context, correlationID, spa
correlationID = requestSpan.TraceID().String()
spanID = trace.SpanFromContext(requestCtx).SpanContext().SpanID().String()
} else {
correlationID = uuid.New().String()
uuid := uuid.New().String()
correlationID = strings.Replace(uuid, "-", "", -1)
}

// revive:disable
Expand Down

0 comments on commit f568a40

Please sign in to comment.