Sets the URI of the current transaction.
Must be called inside a transaction.
Agent version 6.16 or higher.
This method only works when used within a transaction created using the
Transaction attribute with the
Web property set to
true. (See Instrument using attributes.) It provides support for custom web-based frameworks that the agent does not automatically support.
If you use this call multiple times within the same transaction, each call overwrites the previous call. The last call sets the URI.
Note: as of agent version 8.18, the 'request.uri' attribute's value is set to the value of the
Uri.AbsolutePath property of the
System.Uri object passed to the API.
The URI of this transaction.
var uri = new System.Uri("http://www.mydomain.com/path"); NewRelic.Api.Agent.NewRelic.SetTransactionUri(uri);
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.