Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Introduce Transaction and Hub.start_transaction #747

Merged
merged 1 commit into from
Jun 29, 2020

Commits on Jun 29, 2020

  1. feat: Introduce Transaction and Hub.start_transaction

    This aligns the tracing implementation with the current JS
    tracing implementation, up to a certain extent.
    
    Hub.start_transaction or start_transaction are meant to be used when
    starting transactions, replacing most uses of Hub.start_span /
    start_span.
    
    Spans are typically created from their parent transactions via
    transaction.start_child, or start_span relying on the transaction being
    in the current scope.
    
    It is okay to start a transaction without a name and set it later.
    Sometimes the proper name is not known until after the transaction has
    started.
    
    We could fail the transaction if it has no name when calling the finish
    method. Instead, set a default name that will prompt users to give a
    name to their transactions. This is the same behavior as implemented in
    JS.
    
    Span.continue_from_headers, Span.continue_from_environ,
    Span.from_traceparent and the equivalent methods on Transaction always
    return a Transaction and take kwargs to set attributes on the new
    Transaction.
    
    Rename Span.new_span to Span.start_child (and Transaction.start_child)a,
    aligning with JS / tracing API spec. The old name is kept for backwards
    compatibility.
    
    Co-authored-by: Markus Unterwaditzer <markus@unterwaditzer.net>
    rhcarvalho and untitaker committed Jun 29, 2020
    Configuration menu
    Copy the full SHA
    9389f49 View commit details
    Browse the repository at this point in the history