Skip to content

'SentryTransaction' throws if 'getSpanId()' is called and there's no 'contexts' or 'trace' #1160

@marandaneto

Description

@marandaneto

We'd need to revisit every method call and annotation, as we can't annotate getSpanId() with @NotNull if contexts and trace are @Nullable.
The same issue applies to a few other methods.

Adding throws to the method signature is also ugly, we don't want the user's code handling exception on every method call, ideally, we'd return something similar to NoOp if possible.

cc @maciejwalkowiak

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIssue typeperformancePerformance API issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions