NewRelic.Api.Agent.NewRelic.SetTransactionName(string $category, string $name)
Sets the name of the current transaction.
Compatible with all agent versions.
Must be called inside a transaction.
Sets the name of the current transaction. Before you use this call, ensure you understand the implications of metric grouping issues.
If you use this call multiple times within the same transaction, each call overwrites the previous call and the last call sets the name.
Do not use brackets
[suffix] at the end of your transaction name. New Relic automatically strips brackets from the name. Instead, use parentheses
(suffix) or other symbols if needed.
Unique values like URLs, page titles, hex values, session IDs, and uniquely identifiable values should not be used in naming your transactions. Instead, add that data to the transaction as a custom parameter with the
Do not create more than 1000 unique transaction names (for example, avoid naming by URL if possible). This will make your charts less useful, and you may run into limits New Relic sets on the number of unique transaction names per account. It also can slow down the performance of your application.
Required. The category of this transaction, which you can use to distinguish different types of transactions. Defaults to Custom. Only the first 255 characters are retained.
Required. The name of the transaction. Only the first 255 characters are retained.
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.