• English日本語한국어
  • Log inStart now

SetTransactionName (.NET agent API)


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 AddCustomAttribute() call.


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.


NewRelic.Api.Agent.NewRelic.SetTransactionName("Other", "MyTransaction");
Copyright © 2024 New Relic Inc.

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