public interface IAgent
Provides access to Agent artifacts and methods, such as the currently executing transaction.
Agent version 8.9 or higher.
Compatible with all app types.
Provides access to agent artifacts and methods, such as the currently executing transaction. To obtain a reference to
|CurrentTransaction||Property providing access to the currently executing transaction via the ITransaction interface. Must be called inside a transaction.|
|CurrentSpan||Property providing access to the currently executing span via the ISpan interface.|
IAgent agent = NewRelic.Api.Agent.NewRelic.GetAgent(); ITransaction transaction = agent.CurrentTransaction;