FillCorrelationId fills the correlation ID in the context.
(c Context)
| 76 | |
| 77 | // FillCorrelationId fills the correlation ID in the context. |
| 78 | func FillCorrelationId(c Context) { |
| 79 | correlationId := c.Request.Header.Get(CorrelationHeaderKey) |
| 80 | if correlationId == "" { |
| 81 | correlationId = uuid.New().String() |
| 82 | } |
| 83 | c.Set(CorrelationIdCtxKey, correlationId) |
| 84 | } |
| 85 | |
| 86 | // SetOutboundHeaders sets the mandatory headers for all outbound requests. |
| 87 | func SetOutboundHeaders(r *http.Request, c Context) { |