All Products
Search
Document Center

Application Real-Time Monitoring Service:SaveTraceAppConfig

Last Updated:Aug 27, 2026

Modifies Application Monitoring settings, such as trace sampling and agent switches.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

Pid

string

Yes

The process ID (PID) of the application.

Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Application List. On the Application List page, click the name of an application. The URL in the address bar contains the PID in the pid=xxx format. The PID is usually percent-encoded as xxx%40xxx. You must decode this value. For example, if the PID in the URL is xxx%4074xxx, replace %40 with an at sign (@) to obtain xxx@74xxx.

a2n80plglh@745eddxxx

Settings

array<object>

No

The Application Monitoring settings.

object

No

Key

string

No

The key of the setting to modify. For more information, see the following sections.

  • Trace sampling settings

  • Agent switch settings

  • Threshold settings

  • Advanced settings

  • Thread settings

  • Memory snapshot settings

  • URL convergence settings

  • Business log association settings

sampling.enable

Value

string

No

The value of the setting to modify. For more information, see the following sections.

  • Trace sampling settings

  • Agent switch settings

  • Threshold settings

  • Advanced settings

  • Thread settings

  • Memory snapshot settings

  • URL convergence settings

  • Business log association settings

true

Trace sampling settings

Key Description Value
sampling.enable Specifies whether to enable sampling. Valid values:- true: enables sampling- false: disables sampling
sampling.rate The sampling rate. Valid values: 0 to 100. Default value: 10.

Agent switch settings

Key Description Value
enable Specifies whether to enable the agent. Valid values:- true: enables the agent- false: disables the agent

Threshold settings

Key Description Value
thresholds.limit The throttling threshold. Default value: 100.
thresholds.interface The response time threshold for API calls. Default value: 500. Unit: ms.
thresholds.sql The slow SQL query duration threshold. Default value: 500. Unit: ms.

Advanced settings

Key Description Value
defined.excludeurl The API calls to exclude from monitoring. Separate multiple API calls with commas (,).Default value: /**/*.jpg,/**/*.png,/**/*.js,/**/*.jpeg.Example: /service/taobao,/service/status.
callstack.maxLength The maximum length of method stacks. Default value: 128. Maximum value: 400.
exception.stacktrace The stack depth used to identify the same type of exceptions. Default value: 2. Exceptions are identified as the same type based on this stack depth. Changing this value may cause unexpected statistics. Proceed with caution.
callsql.maxLength The maximum length of collected SQL statements. Valid values: 256 to 4096. Default value: 1024.
jdbc.tracesqlbindvalue Specifies whether to capture variables bound to the PrepareStatement parameter. Valid values:-true: captures bound variables- false: does not capture bound variables
jdbc.tracesqlraw Specifies whether to capture raw SQL statements. Valid values:- true: captures raw SQL statements- false: does not capture raw SQL statements
exception.whitelist The exceptions to exclude. The value must be a regular expression that matches exception class names. Separate multiple exception classes with commas (,). Example: java.lang.InterrupetedException,java.lang.IndexOutOfBoundsException. Matching exceptions are excluded from the charts on the Application Details and Exceptions Diagnosis pages.
error.skip The HTTP status codes to exclude from error counting. By default, all HTTP status codes greater than 400 are counted as errors. Specify status codes to exclude from error counting. Separate multiple HTTP status codes with commas (,). Examples: 429 and 429,512. Supported by agent version 2.5.7.2 or later.
compress.enable Specifies whether to enable trace compression. Valid values:- true: enables trace compression- false: disables trace compression
param.maxLength The maximum length of request parameters. Default value: 512. Higher values consume additional system resources. Exercise caution when you configure this key.
quantile.enable Specifies whether to enable quantile statistics. Valid values:- true: enables quantile statistics- false: disables quantile statistics
threadpoolmonitor.enable Specifies whether to enable thread pool and connection pool monitoring. The configuration of this key takes effect after the application is restarted.Valid values:- true: enables thread pool and connection pool monitoring- false: disables thread pool and connection pool monitoring
async.autoTransmit Specifies whether to enable automatic asynchronous propagation. This key is valid only when the agent version is 2.8.3 or later.The configuration of this key takes effect after the application is restarted. This feature wraps Runnable and Callable tasks submitted to the thread pool to propagate context. Potential risks may arise. Exercise caution when you configure this key.Valid values:-true: enables automatic asynchronous propagation- false: disables automatic asynchronous propagation
thread.match.package The package name for asynchronous propagation. This key is valid only when the agent version is 2.7.1.3 or later.The configuration of this key takes effect after the application is restarted. When a Runnable, Callable, or Supplier under the specified package is created, the trace context is automatically captured and propagated to the new thread. Separate multiple package names with commas (,).
responseInject.enable Specifies whether to return the trace ID in the request. Valid values:- true: returns the trace ID- false: does not return the trace ID

Thread settings

Key Description Value
tprof.enableThreadProfiler Specifies whether to enable thread profiling. Valid values:- true: enables thread profiling- false: disables thread profilingIf you turn on this switch, the native method stacks of slow API calls are automatically saved.
tprof.threadProfilerSlowInteractionRt The slow API call duration threshold. Default value: 2000. If the duration of an API call exceeds this threshold, thread profiling is triggered. We recommend that you set this value to the 99th percentile of API call durations. Values smaller than 2000 increase CPU consumption. We recommend that you set a value greater than or equal to 500.
tprof.enableThreadStackRecorder Specifies whether to enable thread profiling for method stacks. Valid values:- true: enables thread profiling for method stacks- false: disables thread profiling for method stacksIf you enable thread profiling, method stacks are collected every 5 minutes.

Business log association settings

Key Description Value
logging.enable Specifies whether to associate trace IDs with business logs. Valid values:- true: turns on the switch- false: turns off the switchIf you turn on this switch, trace IDs are automatically injected into business logs. This setting takes effect after you restart the application. Log4j, Log4j2, and Logback are supported. You must add %X{EagleEye-TraceID} to the log layout to generate trace IDs.
SLS.project The Simple Log Service project that stores business logs in the current region. Specify the name of the Simple Log Service project that stores business logs in the current region.
SLS.logStore The Simple Log Service Logstore that stores business logs in the current region. Specify the name of the Simple Log Service Logstore that stores business logs in the current region.
SLS.index The index type for business logs in the current region. Valid values:- If you want to use full-text indexes, do not set this key.- If you want to use a field-specific index, set the value to the field name. Example: SLS.index: tag.For more information about the differences between field-specific indexes and full-text indexes, see Configure indexes.

URL convergence settings

Key Description Value
convergence.enable Specifies whether to enable the URL convergence feature. Valid values:- true: enables the URL convergence feature- false: disables the URL convergence feature
convergence.minServerSize The convergence threshold. If the threshold is exceeded, convergence is performed.
convergence.pattern The regular expression of convergence rules. You can use regular expressions to configure convergence rules. Separate multiple regular expressions with commas (,). Enter a URL in the original text to indicate that the URL is not converged. Example: /service/(.*?)/demo.

Arthas diagnostics settings

Note: The Arthas diagnostics settings take effect only when the agent version is 2.7.1.3 or later. For more information about other prerequisites, see Arthas diagnostics.

Key Description Value
arthas.enable Specifies whether to enable the Arthas diagnostics feature. Valid values:- true: enables Arthas diagnostics- false: disables Arthas diagnostics
arthas.enableIps The IP addresses on which Arthas diagnostics is enabled. If configured, Arthas diagnostics takes effect only on the specified IP addresses. If not configured, it takes effect on all IP addresses by default. Separate multiple IP addresses with commas (,).

Continuous profiling settings

Note: The continuous profiling settings take effect only when the agent version is 2.7.3.5 or later. For more information about other prerequisites, see Continuous profiling.

Key Description Value
cp.enable Specifies whether to enable continuous profiling. Valid values:- true: enables continuous profiling- false: disables continuous profiling* If you turn on this switch, you must configure the IP addresses on which the switch takes effect. Otherwise, the switch does not take effect. You can configure the IP addresses in the following two modes.
Mode Key Description Value
IP address whitelist cp.allowIPs IP address whitelist The IP addresses of the instances for which continuous profiling is enabled. Separate multiple IP addresses with commas (,).Example: 192.168.0.1,192.168.0.2
cp.allowNetwork CIDR block Specify an empty string. Otherwise, continuous profiling does not work properly.
CIDR block cp.allowIPs IP address whitelist Specify an empty string. Otherwise, continuous profiling does not work properly.
cp.allowNetwork CIDR block The CIDR block of the instances for which continuous profiling is enabled.Example: 192.168.2.0/24/24

Data masking settings Note: The data masking settings take effect only when the agent version is 2.9.0 or later.

Key Description Value
sanitizer.enable Specifies whether to enable data masking. Valid values:- true: enables data masking- false: disables data masking
sanitizer.keys The data masking rules. You can specify data masking rules. The specified rules are used as keys for exact matching. For example, specifying password is equivalent to the regular expression .*password.*. Keys are case-insensitive. Separate multiple rules with commas (,).Example: password,secret,key,token, and credentials

Response elements

Element

Type

Description

Example

object

Data

string

Indicates whether the call was successful.

success

RequestId

string

The ID of the request.

78901766-3806-4E96-8E47-CFEF59E4****

Message

string

The returned message.

message

Code

integer

The HTTP status code. 2XX indicates success. 3XX indicates redirection. 4XX indicates a request error. 5XX indicates a server error.

200

Success

boolean

Indicates whether the request was successful. Valid values:

  • true

  • false

true

Examples

Success response

JSON format

{
  "Data": "success",
  "RequestId": "78901766-3806-4E96-8E47-CFEF59E4****",
  "Message": "message",
  "Code": 200,
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

400 ParameterMissing You must specify the parameter. You must specify the parameter.
400 ParameterTraceAppSettingKeyIllegal The application configuration key is invalid. The application configuration key is invalid.
400 ParameterTraceAppSettingValueIllegal The application configuration value is invalid. The application configuration value is invalid.
400 InternalError InterPlease try again. Contact the DingTalk service account if the issue persists after multiple retries.
404 AppNotExist The application does not exist. The application does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.