• EnglishEspañol日本語한국어Português
  • Log inStart now

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()
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.