Skip to content

Add error tag to spans on OT endpoint middleware #804

@jlordiales

Description

@jlordiales

Hi!
I think it would be useful for the OpenTracing endpoint middleware (https://github.com/go-kit/kit/blob/master/tracing/opentracing/endpoint.go) to inspect the error returned by the next endpoint and set the error tag to true/false accordingly (it could also optionally set the error.object log field).
In addition to just inspecting the returned error it could also check if the response struct implements endpoint.Failer and apply the same logic.

If you think this would be useful I'd be happy to create a PR, just wanted to get your thoughts first.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions