Skip to content

Future direction: Non-copyable Span #126

Open
@stevapple

Description

@stevapple

Given that Span should be ended exactly once, and should not be shared between subprocesses or preserved after termination, it seems a potential client of the recently accepted SE-0390. With Swift 5.9+ we can mark Span as non-copyable, and only allow the operation to “borrow” the span. span.end() will consume the span. We can also add span.end() in deinit to automatically terminate the span.

Note that this is unfortunately very breaking. Haven’t thought about if there’s a way to land this safely in the 1.x period.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions