• /
  • Log in

end_of_transaction (Python agent API)

Syntax

newrelic.agent.end_of_transaction()

Ends the current transaction.

Description

This call ends the current transaction immediately and stops the response timer at the current time. After the transaction ends, the agent does not collect any additional performance breakdown metrics. However, the agent still collects Python exception details.

This call is useful when you have a large response that is streamed back for the web transaction and only the initial part of the transaction is of interest to you. (This also assumes that, for whatever reason, you don't want to flag the transaction as a background task.)

Parameters

None.

Return values

None.

Examples

End a transaction

To end a transaction early:

newrelic.agent.end_of_transaction()

For more help

If you need more help, check out these support and learning resources:

Create issueEdit page
Copyright © 2021 New Relic Inc.