Skip to content

Ability to set error event metadata when using withSpan #166

@czechboy0

Description

@czechboy0

When using swift-distributing-tracing with the withSpan methods, you get the benefit of having recordError automatically being called on the span if an error was raised. However, you do not get the opportunity to annotate the error event attributes. In particular, OpenTelemetry has specific attributes that should be set of the error event attributes. There's no easy way for those to be set currently, and an adopter needs to drop down to catching the error and calling recordError manually.

We could consider adding some hook or exposing some metadata to recordError to make this specific information available to the implementers of a Tracer backend.

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