Skip to content

expose BytesWritten via LogExtraAttrs #63

@techfg

Description

@techfg

Currently, there is no way to access the bytes written that is tracked by httplog. The only approach is to have a separate middleware that wraps the response writer but this results in duplicating logic/processing that httplog already contains.

The use case around this is enriching logs based on the response size and/or performing usage based tracking.

Would solicit input on the preferred approach to implement, but happy to submit a PR if there is an appetite to add this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions