Modifies the settings of Application Monitoring, such as trace sampling and agent switch settings.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
arms:SaveTraceAppConfig | none |
|
| none |
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 of the application. The PID is indicated in the pid=xxx format. The PID is usually percent encoded as xxx%40xxx. You must modify this value to remove the percent encoding. For example, if the PID in the URL is xxx%4074xxx, you must replace %40 with an at sign (@) to obtain xxx@74xxx. | a2n80plglh@745eddxxx |
Settings | array<object> | No | The settings of Application Monitoring. | |
object | No | |||
Key | string | No | The key of the settings that you want to modify. For more information about the supported settings, see the following sections.
| sampling.enable |
Value | string | No | The value of the settings that you want to modify. For more information about the supported settings, see the following sections.
| true |
Trace sampling settings
Key | Description | Value |
---|---|---|
sampling.enable | Specifies whether to turn on the sampling switch. | Valid values:- true : turns on the sampling switch- false : turns off the sampling switch |
sampling.rate | The sampling rate. | Valid values: 0 to 100. Default value: 10. |
Agent switch settings
Key | Description | Value |
---|---|---|
enable | Specifies whether to turn on the agent switch. | Valid values:- true : turns on the agent switch- false : turns off the agent switch |
Threshold settings
Key | Description | Value |
---|---|---|
thresholds.limit | The throttling threshold. | Default value: 100. |
thresholds.interface | The threshold of response time for API calls. | Default value: 500. Unit: ms. |
thresholds.sql | The threshold of the amount of time consumed by slow SQL queries. | Default value: 500. Unit: ms. |
Advanced settings
Key | Description | Value |
---|---|---|
defined.excludeurl | The invalid API calls that you want to exclude. | 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 based on which the system identifies the same type of exceptions. | Default value: 2. The system identifies the same type of exceptions based on the specified stack depth. If you change the value, unexpected statistics may occur. Proceed with caution. |
callsql.maxLength | The maximum length of collected SQL statements. | A collected SQL statement must be 256 to 4096 characters in length. Default value: 1024. |
jdbc.tracesqlbindvalue | Specifies whether to capture variables bound to the PrepareStatement parameter. | Valid values:-true : turns on the switch of capturing variables bound to the PrepareStatement parameter- false : turns off the switch of capturing variables bound to the PrepareStatement parameter |
jdbc.tracesqlraw | Specifies whether to capture raw SQL statements. | Valid values:- true : turns on the switch of capturing raw SQL statements- false : turns off the switch of capturing raw SQL statements |
exception.whitelist | The exceptions that you want to exclude. | The value must be a regular expression that specifies the name of an exception category. Separate multiple exception categories with commas (,). Example: java.lang.InterrupetedException,java.lang.IndexOutOfBoundsException. The exceptions of the categories that you specify are not displayed in the charts on the Application Details and Exceptions Diagnosis pages. |
error.skip | The errors that you want to exclude. | By default, all HTTP status codes greater than 400 are counted as errors. To ignore specific HTTP status codes greater than 400, you can specify them as the value of this key. This way, they are not counted as errors. Separate multiple HTTP status codes with commas (,). Examples: 429 and 429,512. This key is supported by agent version 2.5.7.2 or later. |
compress.enable | Specifies whether to turn on the trace compression switch. | Valid values:- true : turns on the trace compression switch- false : turns off the trace compression switch |
param.maxLength | The maximum length of request parameters. | Default value: 512. If the value is higher than the default value, additional system resources are consumed. Exercise caution when you configure this key. |
quantile.enable | Specifies whether to turn on the quantile statistics switch. | Valid values:- true : turns on the quantile statistics switch- false : turns off the quantile statistics switch |
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 turn on the automatic asynchronous propagation switch. | 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 encapsulates the Runnable and Callable tasks that are submitted to the thread pool to propagate the context. Potential risks may arise. Exercise caution when you configure this key.Valid values:-true : turns on the automatic asynchronous propagation switch- false : turns off the automatic asynchronous propagation switch |
thread.match.package | The name of the package 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, 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 turn on the switch of returning the trace ID in the request. | Valid values:- true : turns on the switch- false : turns off the switch |
Thread settings
Key | Description | Value |
---|---|---|
tprof.enableThreadProfiler | Specifies whether to turn on the main switch of thread profiling. | Valid values:- true : turns on the switch- false : turns off the switchIf you turn on this switch, the native method stacks of slow API calls are automatically saved. |
tprof.threadProfilerSlowInteractionRt | The threshold of the amount of time consumed by slow API calls. | Default value: 2000. If the amount of time consumed by slow API calls exceeds the threshold, thread profiling is enabled. We recommend that you set the value to the 99th percentile of the amount of time consumed. If you set a value smaller than 2000, the CPU consumption is increased. 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 turn on the switch 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 generated in the business logs of an application. This setting takes effect after you restart the application. Logging utilities such as 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 the business logs generated in the current region. | You can specify the name of a Simple Log Service project that stores the business logs generated in the current region. |
SLS.logStore | The Simple Log Service Logstore that stores the business logs generated in the current region. | You can specify the name of a Simple Log Service Logstore that stores the business logs generated in the current region. |
SLS.index | The type of indexes of business logs generated 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 turn on the Arthas switch. | Valid values:- true : turns on the Arthas switch- false : turns off the Arthas switch |
arthas.enableIps | The IP addresses for which the Arthas diagnostics feature is enabled. | If you configure this key, the Arthas diagnostics feature takes effect only on the specified IP addresses. If you do not configure this key, the Arthas diagnostics feature 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 turn on the continuous profiling switch. | Valid values:- true : turns on the continuous profiling switch- false : turns off the continuous profiling switch* 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 turn on the data masking switch. | Valid values:- true : turns on the data masking switch- false : turns off the data masking switch |
sanitizer.keys | The data masking rules. | You can specify rules for data masking, as shown in the example. The specified rules are used as keys for exact matching. For example, if you specify password, the rule is equivalent to the regular expression .*password.*. The keys are not case-sensitive. Separate multiple rules with commas (,).Example: password,secret,key,token, and credentials |
Response parameters
Examples
Sample success responses
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. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2023-11-06 | The Error code has changed | View Change Details |
2023-08-14 | The Error code has changed | View Change Details |
2023-08-03 | The response structure of the API has changed | View Change Details |