• /
  • ログイン

newrelic_capture_params (PHP agent API)

Syntax

newrelic_capture_params([bool $enable_flag])

Enable or disable the capture of URL parameters.

Requirements

Compatible with all agent versions.

Description

Enable or disable the capture of URL parameters (everything after the ? in the URL). This overrides the newrelic.capture_params config file setting.

重要

If you pass sensitive information directly in the URL, keep this disabled.

Parameters

Parameter

Description

$enable_flag

boolean

Optional. Defaults to true.

If true or omitted, enables the capture of URL parameters.

If false, disables the capture of URL parameters.

Examples

Enable capture of URL parameters

function example() {
    if (extension_loaded('newrelic')) { // Ensure PHP agent is available
        newrelic_capture_params();
    }
    ...
}

Disable capture of URL parameters

function example() {
    if (extension_loaded('newrelic')) { // Ensure PHP agent is available
        newrelic_capture_params(false);
    }
    ...
}

For more help

If you need more help, check out these support and learning resources:

その他のヘルプ

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

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