end_transaction() function is used to end a transaction. This will be used along with "begin_transaction".

Compatibility

Compatible with all Python agent versions.

Syntax

copy
icon/buttons/copy
client.end_transaction()

Parameter

end_transaction() does not accept any parameters.

Example

copy
icon/buttons/copy
import atatus
client = atatus.get_client()

def handle_request():

    client.begin_transaction("request")
    atatus.set_transaction_name("/books/create")  # your transaction name
    # TODO: your operations
    client.end_transaction()

See also