• /
  • ログイン
  • 無料アカウント

SetTransactionUri (.NET agent API)

Syntax

NewRelic.Api.Agent.NewRelic.SetTransactionUri(Uri $uri)

Sets the URI of the current transaction.

Requirements

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.

Description

Sets the URI of the current transaction. The URI appears in the 'request.uri' attribute of transaction traces and transaction events, and also can affect transaction naming.

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.

Parameters

Parameter

Description

$uri

Uri

The URI of this transaction.

Examples

var uri = new System.Uri("http://www.mydomain.com/path");
NewRelic.Api.Agent.NewRelic.SetTransactionUri(uri);

その他のヘルプ

さらに支援が必要な場合は、これらのサポートと学習リソースを確認してください:

問題を作成するこのページを編集する
Copyright © 2020 New Relic Inc.