WithRequestID
Gets a new context with RequestID set.
def WithRequestID(
ctx: context.Context,
requestID: string
) - > context.Context
Gets a new context with RequestID set. This function is used to propagate a request identifier through the context for tracing or logging purposes.
Parameters
| Name | Type | Description |
|---|---|---|
| ctx | context.Context | The parent context to which the request ID will be added. |
| requestID | string | The unique identifier for the request to be associated with the context. |
Returns
| Type | Description |
|---|---|
context.Context | A new context with the provided request ID associated with it. |