All Products
Search
Document Center

Application Real-Time Monitoring Service:SaveTraceAppConfig

Last Updated:Apr 26, 2024

Modifies the settings of Application Monitoring, such as trace sampling and agent switch settings.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
arms:SaveTraceAppConfigWrite
  • TraceApp
    acs:arms:{#regionId}:{#accountId}:traceapp/{#Pid}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PidstringYes

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
Settingsobject []No

The settings of Application Monitoring.

KeystringNo

The values of the settings that you want to modify. For information about the supported settings, see the following items:

  • Trace sampling settings
  • Main switch settings
  • Threshold settings
  • Advanced settings
  • Thread settings
  • Memory snapshot settings
  • URL convergence settings
  • Business log association settings
  • Business monitoring settings
sampling.enable
ValuestringNo

The values of the settings that you want to modify. For information about the supported settings, see the following items:

  • Trace sampling settings
  • Main switch settings
  • Threshold settings
  • Advanced settings
  • Thread settings
  • Memory snapshot settings
  • URL convergence settings
  • Business log association settings
  • Business monitoring settings
true

Trace sampling settings

KeyDescriptionValue
sampling.enableSpecifies whether to turn on the sampling switch.Valid values:- true: turns on the switch- false: turns off the switch
sampling.rateThe sampling rate.Valid values: 0 to 100. Default value: 10.

Main switch settings

KeyDescriptionValue
enableSpecifies 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

KeyDescriptionValue
thresholds.limitThe throttling threshold.Default value: 100.
thresholds.interfaceThe threshold of response time for API calls.Default value: 500. Unit: milliseconds.
thresholds.sqlThe threshold for the time consumed for slow SQL queries.Default value: 500. Unit: milliseconds.

Advanced settings

KeyDescriptionValue
defined.excludeurlThe filtering of invalid API calls.Separate multiple API calls with commas (,). Example: /service/taobao,/service/status.
callstack.maxLengthThe maximum length of the method stack.This value indicates the number of entries. Maximum value: 400. Default value: 128.
callsql.maxLengthThe maximum length of the collected SQL statement.This value indicates the number of characters. Valid values: 256 to 4096. Default value: 1024.
exception.whitelistThe 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.skipThe 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.enableSpecifies 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

KeyDescriptionValue
tprof.enableThreadProfilerSpecifies 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.threadProfilerSlowInteractionRtThe 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.enableThreadStackRecorderSpecifies 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

KeyDescriptionValue
convergence.enableSpecifies whether to enable the URL convergence feature.Valid values:- true: enables the URL convergence feature- false: disables the URL convergence feature
convergence.minServerSizeThe convergence threshold.If the threshold is exceeded, convergence is enabled.
convergence.patternThe 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

KeyDescriptionValue
logging.enableSpecifies 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.projectThe 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.logStoreThe 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.indexThe 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

KeyDescriptionValue
scenario.enableSpecifies 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.encodingThe 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

ParameterTypeDescriptionExample
object
Datastring

Indicates whether the call was successful.

success
RequestIdstring

The ID of the request.

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

The returned message.

message
Codelong

The status code. The status code 200 indicates that the request was successful. If another status code is returned, the request failed.

200
Successboolean

Indicates whether the request was successful. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

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

Error codes

HTTP status codeError codeError messageDescription
400ParameterMissingYou must specify the parameter.You must specify the parameter.
400ParameterTraceAppSettingKeyIllegalThe application configuration key is invalid.The application configuration key is invalid.
400ParameterTraceAppSettingValueIllegalThe application configuration value is invalid.The application configuration value is invalid.
400InternalErrorInterPlease try again. Contact the DingTalk service account if the issue persists after multiple retries.-
404AppNotExistThe application does not exist.The application does not exist.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-11-06The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 400
    delete Error Codes: 404
2023-08-14The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Added Error Codes: 400
    Added Error Codes: 404
2023-08-03The response structure of the API has changedsee changesets
Change itemChange content
Output ParametersThe response structure of the API has changed.