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

IAgent

Syntax

public interface IAgent

Provides access to agent artifacts and methods, such as the currently executing transaction.

Requirements

Agent version 8.9 or higher.

Compatible with all app types.

Description

Provides access to agent artifacts and methods, such as the currently executing transaction. To obtain a reference to IAgent, use GetAgent.

Properties

Name

Description

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.

Examples

IAgent agent = NewRelic.Api.Agent.NewRelic.GetAgent();
ITransaction transaction = agent.CurrentTransaction;
Copyright © 2024 New Relic Inc.

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