Skip to content

HTTP Header Logging #4799

Closed
Closed
@zspeaks

Description

@zspeaks

Is your feature request related to a problem? Please describe.
It would be nice to be able to log the contents of the headers of http requests, to assist in tracing the path of a http request, especially when trying to link failed requests on the router with cortex.

Describe the solution you'd like
The proposed solution consists of two parts, a new middleware that adds headers to the context associated with http request, and an addition to the WithContext logging wrapper function. Target headers for logging are user configurable via an addition to the api config.

Describe alternatives you've considered
The idea of creating a factory for the logger instead of adding additional functionality to the WithContext function was also considered.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions