apple / apple/swift-distributed-tracing
Ability to set error event metadata when using withSpan
- Dominant language
- Swift
- Stars
- 320
- Forks
- 57
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 1
Description
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.
Contributor guide
Research direction
Start by reading the withSpan methods and the automatic recordError path described in the issue. Determine how a hook or metadata could expose error-event attributes to Tracer backend implementers; done should provide a defined way to set those attributes without manually catching and recording the error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- distributed-systems, observability-sre
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100