Skip to content

More precise span error in gin middleware #2815

@theo303

Description

@theo303

Hello !
First of all, excuse me if I'm using the wrong tool/place to ask a question, I'm not used to this.

I'm wondering if I can improve how errors are displayed in datadog for my http requests (I'm using gin). Now I have this:
image
I would like ideally to have a full go error displayed here.

I guess it's the default behavior because the gin middleware calls FinishRequestSpan(). Since this function is deferred after all handlers have finished, it will override the error in the span if I try to set it before ?

Is this the desired behavior ?
Should I make my own middleware and stop using the one in contrib/gin-gonic ?

Thanks !

Metadata

Metadata

Assignees

No one assigned

    Labels

    apm:ecosystemcontrib/* related feature requests or bugs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions