Skip to content
This repository was archived by the owner on Aug 14, 2024. It is now read-only.
This repository was archived by the owner on Aug 14, 2024. It is now read-only.

API suggestion for finishing a transaction/span #245

@marandaneto

Description

@marandaneto

Based on https://develop.sentry.dev/sdk/unified-api/tracing#new-span-and-transaction-classes
to finish a transaction or a span, you need to call finish which is meant to be used either if it's a successful or errored transaction.

one needs to:

transaction.status = OK
// or
transaction.status = INTERNAL_ERROR

// and
transaction.finish()

what's about making it more user friendly:

transaction.success() // infers `status = OK` (200)
// or

transaction.error() // infers `status = UNKNOWN` (500)
// or
transaction.error(status = UNKNOWN) // if Language supports default params.

it'd be easier to use and also reducing boilerplate.

same applies for spans

@rhcarvalho @bruno-garcia @Tyrrrz @maciejwalkowiak @HazAT @brustolin

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions