Skip to content

Fix risk of unfinished span when panic occurred in http handlerΒ #46

@njspok

Description

@njspok

Last fixes 2b2d270#diff-3fde75a8887529bd00893a052634c273 require in handler h(sct.wrappedResponseWriter(), r) call WriteHeader. If not call WriteHeader defer mark span as error.

I use echo http server and dont call WriteHeader in my handlers - echo server alone make this call. In result all my spans in this middleware marked as errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions