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 | Write |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
Pid | string | Yes | The ID of the application. Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Applications. On the Applications page, click the name of an application. The URL in the address bar contains the process ID (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 eb4zdose6v%409781be0f44d****, you must replace %40 with an at sign (@) to obtain eb4zdose6v@9781be0f44d****. | a2n80plglh@745eddxxx |
Settings | object [] | No | The settings of Application Monitoring. | |
Key | string | No | The values of the settings that you want to modify. For information about the supported settings, see the following items:
| sampling.enable |
Value | string | No | The values of the settings that you want to modify. For information about the supported settings, see the following items:
| true |
Trace sampling settings
Key | Description | Value |
---|---|---|
sampling.enable | Specifies whether to turn on the sampling switch. | Valid values:- true : turns on the switch- false : turns off the switch |
sampling.rate | The sampling rate. | Valid values: 0 to 100. Default value: 10. |
Main switch settings
Key | Description | Value |
---|---|---|
enable | Specifies whether to turn on the main switch of agents. | Valid values:- true : turns on the main switch- false : turns off the main 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: milliseconds. |
thresholds.sql | The threshold for the time consumed for slow SQL queries. | Default value: 500. Unit: milliseconds. |
Advanced settings
Key | Description | Value |
---|---|---|
defined.excludeurl | The filtering of invalid API calls. | Separate multiple API calls with commas (,). Example: /service/taobao,/service/status. |
callstack.maxLength | The maximum length of the method stack. | This value indicates the number of entries. Maximum value: 400. Default value: 128. |
callsql.maxLength | The maximum length of the collected SQL statement. | This value indicates the number of characters. Valid values: 256 to 4096. Default value: 1024. |
exception.whitelist | The filtering of exceptions. | 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 filtering of errors. | 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 parameter. 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 the ARMS agent V2.5.7.2 or later. |
responseInject.enable | Specifies whether to turn on the switch to return trace IDs for 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 time threshold to trigger the listener for slow API calls. | Default value: 2000. Unit: milliseconds. 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. Unit: milliseconds. |
tprof.enableThreadStackRecorder | Specifies whether to enable the thread diagnostics method stack. | Valid values:- true : enables the thread diagnostics method stack- false : disables the thread diagnostics method stackIf you enable this feature, the method stack is collected every 5 minutes. |
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 enabled. |
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. |
Business log association settings
Key | Description | Value |
---|---|---|
logging.enable | Specifies whether to turn on the switch that associates 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 Log Service project that stores the business logs generated in the current region. | You can specify the name of the Log Service project that stores the business logs generated in the current region. |
SLS.logStore | The Log Service Logstore that stores the business logs generated in the current region. | You can specify the name of the 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 configure this parameter. If you want to use a field-specific index, use the name of the field as the value. Example: SLS.index: tag.For information about the differences between field-specific indexes and full-text indexes, see Configure indexes. |
Business monitoring settings
Key | Description | Value |
---|---|---|
scenario.enable | Specifies whether to turn on the business monitoring switch. | Valid values:- true : turns on the switch- false : turns off the switchThis key specifies whether business monitoring takes effect. This key is supported by the ARMS agent V2.6.2 or later. |
scenario.http.encoding | The HTTP encoding format. | This key specifies how to parse HTTP parameters. Default value: UTF-8. You can specify an encoding format as needed. |
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 | see changesets | ||||||
| ||||||||
2023-08-14 | The Error code has changed | see changesets | ||||||
| ||||||||
2023-08-03 | The response structure of the API has changed | see changesets | ||||||
|