Modifies the settings of Application Monitoring, such as trace sampling and agent switch settings.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | SaveTraceAppConfig | The operation that you want to perform. Set the value to SaveTraceAppConfig. |
| Pid | String | Yes | a2n80plglh@745eddxxx | The process identifier (PID) of the application. For more information about how to obtain the PID, see Obtain the PID of an application. |
| Settings.N.Key | String | Yes | sampling.enable | The key of the setting that you want to modify. For more information about the supported settings, see the following sections.
|
| Settings.N.Value | String | Yes | true | The value of the setting that you want to modify. For more information about the supported settings, see the following sections.
|
Keys of trace sampling settings
Key | Description | Value |
|---|---|---|
sampling.enable | Specifies whether to turn on the sampling switch. | Valid values: - - |
sampling.rate | The sampling rate. | Valid values: 0 to 100. Default value: 10. |
Key | Description | Value |
|---|---|---|
enable | Specifies whether to turn on the main switch of agents. | Valid values: - - |
Key | Description | Value |
|---|---|---|
thresholds.limit | The throttling threshold. | Default value: 100. |
thresholds.interface | The response time threshold of API calls. | Default value: 500. Unit: milliseconds. |
thresholds.sql | The threshold of the time consumed for slow SQL queries. | Default value: 500. Unit: milliseconds. |
Key | Description | Value |
|---|---|---|
defined.excludeurl | The filter of invalid API operations. | Separate multiple API operations with commas (,). Example: /service/taobao,/service/status. |
callstack.maxLength | The maximum length of a method stack. | Default value: 128. Maximum value: 400. The value indicates the number of entries. |
callsql.maxLength | The maximum length of a collected SQL statement. | Default value: 1024. Valid values: 256 to 4096. The value indicates the number of characters. |
exception.whitelist | The filter 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 filter of errors. | By default, all HTTP status codes greater than 400 are counted as errors. To ignore specific HTTP status codes greater than 400 so that they are not counted as errors, you can specify them as the value. 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. |
responseInject.enable | Specifies whether to turn on the switch to return trace IDs in the request. | Valid values: - - |
Key | Description | Value |
|---|---|---|
tprof.enableThreadProfiler | Specifies whether to turn on the main switch of thread profiling. | Valid values: - - If you turn on this switch, the native method stacks of slow API calls are automatically saved. |
tprof.threadProfilerSlowInteractionRt | The threshold of the time consumed 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 use the 99th percentile of the amount of time consumed as the value. If you specify a value smaller than 2000, CPU usage increases. We recommend that you specify a value greater than or equal to 500. |
tprof.enableThreadStackRecorder | Specifies whether to enable the thread diagnostics method stack. | Valid values: - - If you enable this feature, the method stack is collected every 5 minutes. |
Key | Description | Value |
|---|---|---|
convergence.enable | Specifies whether to enable the URL convergence feature. | Valid values: - - |
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. |
Key | Description | Value |
|---|---|---|
logging.enable | Specifies whether to turn on the switch that associates trace IDs with business logs. | Valid values: - - If 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 a Log Service Logstore that is used to store the business logs generated in the current region. |
SLS.index | The type of indexes of business logs generated in the current region. | Valid values:
For more information about the differences between field-specific indexes and full-text indexes, see Configure indexes. |
Key | Description | Value |
|---|---|---|
scenario.enable | Specifies whether to turn on the business monitoring switch. | Valid values: - - This key specifies whether business monitoring takes effect. This key is supported by agent version 2.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
| Parameter | Type | Example | Description |
|---|---|---|---|
| Data | String | success | Indicates whether the call is successful. |
| RequestId | String | 78901766-3806-4E96-8E47-CFEF59E4**** | The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=SaveTraceAppConfig
&Pid=a2n80plglh@745eddxxx
&<Common request parameters>Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<SaveTraceAppConfigResponse>
<RequestId>78901766-3806-4E96-8E47-CFEF59E4****</RequestId>
<Data>success</Data>
</SaveTraceAppConfigResponse>JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "78901766-3806-4E96-8E47-CFEF59E4****",
"Data" : "success"
}Error codes
For a list of error codes, visit the API Error Center.