Syntax
newrelic.agent.ignore_transaction(flag=True)
Ignores the current transaction.
Description
This call ignores the current transaction. The agent does not report any data from the transaction.
Tip
You can also ignore a web transaction in the WSGI environ dictionary. To do so, set the newrelic.ignore_transaction
key for the specific request in the WSGI environ dictionary passed by the WSGI server into your WSGI application.
Parameters
Parameter | Description |
---|---|
boolean | Optional. Default is |
Return values
None.
Examples
Ignore a transaction
To ignore a transaction that you don't want to show up in the New Relic One, you would run the following where a transaction is being generated in your app code. This example illustrates using the API to ignore a Flask route:
@app.route("/")def process_results(): newrelic.agent.ignore_transaction(flag=True) return 'hello world'
For more help
If you need more help, check out these support and learning resources:
- Browse the Explorers Hub to get help from the community and join in discussions.
- Find answers on our sites and learn how to use our support portal.
- Run New Relic Diagnostics, our troubleshooting tool for Linux, Windows, and macOS.
- Review New Relic's data security and licenses documentation.