All Products
Search
Document Center

Application Real-Time Monitoring Service:GetTraceAppConfig

Last Updated:Aug 30, 2024

Queries all custom settings of an application monitored by Application Monitoring, such as trace sampling settings and agent switches. This operation is applicable only to applications that are monitored by Application Monitoring. It is not applicable to applications that are monitored by Managed Service for OpenTelemetry.

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:GetTraceAppConfigget
  • TraceApp
    acs:arms:{#regionId}:{#accountId}:traceapp/{#Pid}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
PidstringYes

The process ID (PID) of the application.

You can use one of the following methods to obtain the PID:

  • API: Call the ListTraceApps operation
  • Console: Log on to the Application Real-Time Monitoring Service (ARMS) console. In the left-side navigation pane, choose Application Monitoring > Application List. On the Application List page, click the name of your 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.
Note
  • To obtain the PID in the console, your application must be monitored by Application Monitoring rather than Managed Service for OpenTelemetry.

  • The GetTraceAppConfig operation can query only the custom settings of applications that are monitored by Application Monitoring.

a2n80plglh@745eddxxx

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

RequestIdstring

The request ID.

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

The custom settings of the application, which is a JSON string. For more information, see Additional description of response parameters.

{"profiler":{"enable":true}}
Messagestring

The returned message.

Codelong

The HTTP status code.

Valid values:

  • 2xx: The request was successful.
  • 3xx: The request was redirected.
  • 4xx: A request error occurred.
  • 5xx: A server error occurred.
200
Successboolean

Indicates whether the request was successful.

Valid values:

  • true
  • false
true

The following tables describe the JSONPath parameter corresponding to each custom setting. Note: Some custom settings may not be returned in the response because the settings are modified at different points in time. In this case, the default values take effect.

Sampling settings

SettingJSONPathTypeDescriptionDefault value
Sampling policyprofiler.sampling.useSamplingStrategyV2booleanValid values:- true: adaptive sampling- false: fixed-rate samplingfalse
Sampling rateprofiler.sampling.ratedouble0% to 100%This setting takes effect for fixed-rate sampling.10
Full sampling span nameprofiler.sampling.v2config.spanNames4FullSampleStrStringThe names of the full sampling spans. Separate multiple span names with commas (,).Empty string
Full sampling span prefixprofiler.sampling.v2config.spanNamePrefixes4FullSampleStrStringThe prefix of the full sampling spans.Empty string
Full sampling span suffixprofiler.sampling.v2config.spanNameSuffixes4FullSampleStrStringThe suffix of the full sampling spans.Empty string

Agent switch settings

SettingJSONPathTypeDescriptionDefault value
Whether to enable Application Monitoringprofiler.enablebooleanValid values:- true: enables Application Monitoring- false: disables Application Monitoringtrue
Dubbo plug-in switchprofiler.dubbo.enablebooleanValid values:- true: enables the Dubbo plug-in- false: disables the Dubbo plug-intrue
MongoDB plug-in switchprofiler.mongodb.enablebooleanValid values:- true: enables the MongoDB plug-in- false: disables the MongoDB plug-intrue
HSF plug-in switchprofiler.hsf.enablebooleanValid values:- true: enables the HSF plug-in- false: disables the HSF plug-intrue
HttpClient 3 plug-in switchprofiler.httpclient3.enablebooleanValid values:- true: enables the HttpClient 3 plug-in- false: disables the HttpClient 3 plug-intrue
HttpClient 4 plug-in switchprofiler.httpclient4.enablebooleanValid values:- true: enables the HttpClient 4 plug-in- false: disables the HttpClient 4 plug-intrue
JDK HTTP plug-in switchprofiler.jdkhttp.enablebooleanValid values:- true: enables the JDK HTTP plug-in- false: disables the JDK HTTP plug-intrue
Jetty plug-in switchprofiler.jetty.enablebooleanValid values:- true: enables the Jetty plug-in- false: disables the Jetty plug-intrue
MyBatis plug-in switchprofiler.mybatis.enablebooleanValid values:- true: enables the MyBatis plug-in- false: disables the MyBatis plug-intrue
MySQL plug-in switchprofiler.mysql.enablebooleanValid values:- true: enables the MySQL plug-in- false: disables the MySQL plug-intrue
OkHttp plug-in switchprofiler.okhttp.enablebooleanValid values:- true: enables the OkHttp plug-in- false: disables the OkHttp plug-intrue
Oracle plug-in switchprofiler.oracle.enablebooleanValid values:- true: enables the Oracle plug-in- false: disables the Oracle plug-intrue
PostgreSQL plug-in switchprofiler.postgresql.enablebooleanValid values:- true: enables the PostgreSQL plug-in- false: disables the PostgreSQL plug-intrue
Redis plug-in switchprofiler.redis.enablebooleanValid values:- true: enables the Redis plug-in- false: disables the Redis plug-intrue
Spring plug-in switchprofiler.spring.enablebooleanValid values:- true: enables the Spring plug-in- false: disables the Spring plug-intrue
Spring Boot plug-in switchprofiler.springboot.enablebooleanValid values:- true: enables the Spring Boot plug-in- false: disables the Spring Boot plug-intrue
Tomcat plug-in switchprofiler.tomcat.enablebooleanValid values:- true: enables the Tomcat plug-in- false: disables the Tomcat plug-intrue
Lettuce plug-in switchprofiler.lettuce.enablebooleanValid values:- true: enables the Lettuce plug-in- false: disables the Lettuce plug-intrue
gRPC plug-in switchprofiler.grpc.enablebooleanValid values:- true: enables the gRPC plug-in- false: disables the gRPC plug-intrue
Thrift plug-in switchprofiler.thrift.enablebooleanValid values:- true: enables the Thrift plug-in- false: disables the Thrift plug-intrue
Hystrix plug-in switchprofiler.hystrix.enablebooleanValid values:- true: enables the Hystrix plug-in- false: disables the Hystrix plug-intrue
RxJava plug-in switchprofiler.rxjava.enablebooleanValid values:- true: enables the RxJava plug-in- false: disables the RxJava plug-intrue
Memcached plug-in switchprofiler.memcached.enablebooleanValid values:- true: enables the Memcached plug-in- false: disables the Memcached plug-intrue
Druid plug-in switchprofiler.jdbc.druid.enablebooleanValid values:- true: enables the Druid plug-in- false: disables the Druid plug-intrue
WebLogic plug-in switchprofiler.weblogic.enablebooleanValid values:- true: enables the WebLogic plug-in- false: disables the WebLogic plug-intrue
ElasticJob plug-in switchprofiler.elasticjob.enablebooleanValid values:- true: enables the ElasticJob plug-in- false: disables the ElasticJob plug-intrue
Elasticsearch plug-in switchprofiler.elasticsearch.enablebooleanValid values:- true: enables the Elasticsearch plug-in- false: disables the Elasticsearch plug-intrue
HikariCP plug-in switchprofiler.jdbc.hikaricp.enablebooleanValid values:- true: enables the HikariCP plug-in- false: disables the HikariCP plug-intrue
InfluxDB plug-in switchprofiler.influxdb.enablebooleanValid values:- true: enables the InfluxDB plug-in- false: disables the InfluxDB plug-intrue
Kafka plug-in switchprofiler.kafka.enablebooleanValid values:- true: enables the Kafka plug-in- false: disables the Kafka plug-intrue
Netty plug-in switchprofiler.netty.enablebooleanValid values:- true: enables the Netty plug-in- false: disables the Netty plug-intrue
Play plug-in switchprofiler.play.enablebooleanValid values:- true: enables the Play plug-in- false: disables the Play plug-intrue
Reactor plug-in switchprofiler.reactor.enablebooleanValid values:- true: enables the Reactor plug-in- false: disables the Reactor plug-intrue
Redisson plug-in switchprofiler.redis.redisson.enablebooleanValid values:- true: enables the Redisson plug-in- false: disables the Redisson plug-intrue
RabbitMQ plug-in switchprofiler.rabbitmq.client.enablebooleanValid values:- true: enables the RabbitMQ plug-in- false: disables the RabbitMQ plug-intrue
SchedulerX plug-in switchprofiler.schedulerx.enablebooleanValid values:- true: enables the SchedulerX plug-in- false: disables the SchedulerX plug-intrue
Undertow plug-in switchprofiler.undertow.enablebooleanValid values:- true: enables the Undertow plug-in- false: disables the Undertow plug-intrue
Vert.x plug-in switchprofiler.vertx.enablebooleanValid values:- true: enables the Vert.x plug-in- false: disables the Vert.x plug-intrue
XXL-JOB plug-in switchprofiler.xxljob.enablebooleanValid values:- true: enables the XXL-JOB plug-in- false: disables the XXL-JOB plug-intrue
ONS Client plug-in switchprofiler.onsclient.enablebooleanValid values:- true: enables the ONS Client plug-in- false: disables the ONS Client plug-intrue
Quartz plug-in switchprofiler.quartz.enablebooleanValid values:- true: enables the Quartz plug-in- false: disables the Quartz plug-intrue
Servlet plug-in switchprofiler.servlet.enablebooleanValid values:- true: enables the Servlet plug-in- false: disables the Servlet plug-intrue
Liberty plug-in switchprofiler.liberty.enablebooleanValid values:- true: enables the Liberty plug-in- false: disables the Liberty plug-intrue
Akka plug-in switchprofiler.akka.enablebooleanValid values:- true: enables the Akka plug-in- false: disables the Akka plug-intrue
Cassandra plug-in switchprofiler.cassandra.enablebooleanValid values:- true: enables the Cassandra plug-in- false: disables the Cassandra plug-intrue
OpenTelemetry plug-in switchprofiler.opentelemetry.enablebooleanValid values:- true: enables the OpenTelemetry plug-in- false: disables the OpenTelemetry plug-intrue
Google HTTP Client plug-in switchprofiler.googlehttpclient.enablebooleanValid values:- true: enables the Google HTTP Client plug-in- false: disables the Google HTTP Client plug-intrue
Ning plug-in switchprofiler.ning.asynchttpclient.enablebooleanValid values:- true: enables the Ning plug-in- false: disables the Ning plug-intrue

Thread profiling settings

SettingJSONPathTypeDescriptionDefault value
Thread profiling switchprofiler.tprof.enableJvmThreadStatisticbooleanValid values:- true: enables thread profiling- false: disables thread profilingtrue
Periodically save local method stack informationprofiler.tprof.enableThreadStackRecorderbooleanValid values:- true: enables periodic storage of local method stacks- false: disables periodic storage of local method stacksfalse
Threshold for time-consuming callsprofiler.tprof. threadProfilerSlowInteractionRtintUnit: ms. If the duration exceeds the threshold, the local method stack is automatically saved.2000

Application log association settings

SettingJSONPathTypeDescriptionDefault value
Log sourceprofiler.logSourceStringValid values:- sls: Simple Log Servicesls
Automatically associate business logs with trace IDsprofiler.logging.enablebooleanValid values:- true: enables the association of business logs with trace IDs- false: disables the association of business logs with trace IDstrue
Automatically fill in trace IDs in logsprofiler.logging.injectTraceId2Log.enablebooleanValid values:- true: enables the automatic filling of trace IDs in logs- false: disables the automatic filling of trace IDs in logsThis setting takes effect for version 4.1.6 or later of the ARMS agent.true
Automatically fill in span IDs in logsprofiler.logging.injectSpanId2Log.enablebooleanValid values:- true: enables the automatic filling of span IDs in logs- false: disables the automatic filling of span IDs in logsThis setting takes effect for version 4.1.6 or later of the ARMS agent.true
Associate Simple Log Service - Regionprofiler.SLS.regionIdStringThe region where the associated log source resides.Empty string
Associate Simple Log Service - Projectprofiler.SLS.projectStringThe project to which the associated log source belongs.Empty string
Associate Simple Log Service - Logstoreprofiler.SLS.logStoreStringThe Logstore to which the associated log source belongs.Empty string
Associate Simple Log Service - Associated indexprofiler.SLS.indexStringThe index of the associated log source.Empty string

URL convergence settings

SettingJSONPathTypeDescriptionDefault value
Convergence URLprofiler.convergence.enablebooleanValid values:- true: enables the URL convergence feature- false: disables the URL convergence featuretrue
Convergence thresholdprofiler.convergence.minServerSizelongURLs are converged when the threshold is reached.1000
Convergence ruleprofiler.convergence.patternStringEach rule is a regular expression.Example: /service/(.*?)/demo.Separate multiple rules with commas (,).Empty string

Arthas settings

SettingJSONPathTypeDescriptionDefault value
Arthas switchprofiler.arthas.enablebooleanValid values:- true: enables the Arthas diagnostics feature- false: disable the Arthas diagnostics featurefalse
IP address effective in real timeprofiler.arthas.enableIpsstringThe IP addresses for which the Arthas diagnostics feature is enabled. Separate multiple IP addresses with commas (,).An empty string indicates that the Arthas diagnostics feature is enabled for all IP addresses.Empty string

Continuous profiling settings

SettingJSONPathTypeDescriptionDefault value
Switchprofiler.cp.enablebooleanValid values:- true: enables the continuous profiling feature- false: disables the continuous profiling feature* After the switch is turned on, two configuration modes are available, as shown in the following table.false
CPU hotspotprofiler.cp.cpuEnablebooleanValid values:- true: enables the CPU hotspot feature- false: disables the CPU hotspot featurefalse
Memory hotspotprofiler.cp.allocEnablebooleanValid values:- true: enables the memory hotspot feature- false: disables the memory hotspot featurefalse
Code hotspotprofiler.cp. wallClockEnablebooleanValid values:- true: enables the code hotspot feature- false: disables the code hotspot featurefalse
ModeKeyDescriptionValue
IP address whitelistcp.allowIPsIP address whitelistThe 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.allowNetworkCIDR blockSpecify an empty string. Otherwise, continuous profiling does not work properly.
CIDR blockcp.allowIPsIP address whitelistSpecify an empty string. Otherwise, continuous profiling does not work properly.
cp.allowNetworkCIDR blockThe CIDR block of the instances for which continuous profiling is enabled.Example: 192.168.2.0/24/24

Data masking settings

SettingJSONPathTypeDescriptionDefault value
Data masking switchprofiler.sanitizer.enablebooleanValid values:- true: enables the data masking feature- false: disables the data masking featuretrue
Data masking ruleprofiler.sanitizer.keysStringThe matching rule for sensitive key-containing words. The matching rule is case-insensitive. Separate multiple IP addresses with commas (,).true

Interface call settings

SettingJSONPathTypeDescriptionDefault value
Slow request thresholdprofiler.thresholds.interfacelongUnit: ms. If the response time is greater than this threshold, the request is marked as slow.500
Exception whitelistprofiler.exception.whitelistStringThe regular expression that matches the exception names. Exceptions that are hit in the whitelist are not included in the statistics of exception-related charts. Separate multiple rules with commas (,).Empty string
Inherit exception filter of parent classprofiler.exception.filterByParentClassbooleanValid values:- true: enables the feature- false: disables the featureAfter the feature is enabled, you can configure parent exceptions in exception filtering. This setting takes effect for version 4.1.6 or later of the ARMS agent.true
HTTP status code whitelistprofiler.error.skipStringThe HTTP status codes for which you want to ignore errors. The status codes in the whitelist are ignored in the error statistics. Separate multiple status codes with commas (,).Empty string
Exclude invalid API callsprofiler.defined.excludeurlStringThe API calls that are ignored. Each rule is a regular expression. Separate multiple status codes with commas (,)./**/*.jpg,/**/*.png,/**/*.js,/**/*.jpeg,/**/*.pdf,/**/*.xlsx,/**/*.txt,/**/*.docs,/**/*.gif,/**/*.csv

Database call settings

SettingJSONPathTypeDescriptionDefault value
Slow SQL query thresholdprofiler.thresholds.sqllongUnit: ms. If the duration of an SQL query exceeds the threshold, the query is marked as slow.500
Maximum length of collected SQL statements that are retainedprofiler.callsql.maxLengthlongIf the value of an SQL statement exceeds the threshold, the SQL statement is truncated.1024
Show variable values in SQLprofiler.jdbc.tracesqlbindvaluebooleanValid values:- true: enables the feature- false: disables the featureIf you turn on this switch, the variable values bound to the PrepareStatement parameter are captured and displayed on the page. Only MySQL is supported.false
Show constant values in SQLprofiler.jdbc. tracesqlrawbooleanValid values:- true: enables the feature- false: disables the featureAfter the feature is enabled, raw SQL statements are captured.false

Tracing protocol settings

Note: The tracing protocol settings take effect only for agent version 4.1.x and later.

SettingJSONPathTypeDescriptionDefault value
Tracing protocolprofiler.trace.protocol.nameStringValid values:- Unset: not set- W3C: OpenTelemetry W3C- SkyWalking- Zipkin: Zipkin B3- Jaeger- EagleEyeUnset
Tracing modeprofiler.trace.protocol. strategyStringValid values:- PriorityUse- ForceUsePriorityUse

Advanced settings

SettingJSONPathTypeDescriptionDefault value
Maximum number of traces collected by the agent per secondprofiler.thresholds.limitintA protective measure to prevent the normal operation of the business from being affected by trace collection in high traffic scenarios.100
Maximum length of method stacks that are retainedprofiler.callstack.maxLengthintIf the length of a method stack exceeds the specified value, the method stack is truncated when it is collected. This setting is deprecated if the agent version is 4.0.0 or later.128
Stack depth for the same type of exceptionsprofiler.exception.stacktraceintThe stack depth based on which the system identifies the same type of exceptions.2
Maximum length of request parameters that are displayedprofiler.param.maxLengthintThe maximum length of request parameters that are displayed.512
Custom RabbitMQ consumersprofiler.rabbitmq.client.consumer.classesStringThe fully qualified class names of RabbitMQ consumers. Separate multiple consumers with commas (,).This setting is deprecated if the agent version is 4.0.0 or later.Empty string
Custom Kafka consumption methodprofiler.kafka.consumer.entryPointStringThe consumption method of the Kafka consumer. This setting is deprecated if the agent version is 4.0.0 or later.Empty string
Automatically propagate context when Kafka sends messagesprofiler.kafka.enableInjectKafkaHeadersbooleanSpecifies whether to automatically add multiple headers to Kafka messages to associate the sending trace with the consumption trace. This setting is deprecated if the agent version is 4.0.0 or later.false
Package name for asynchronous propagationprofiler.thread.match.packageStringWhen 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 (,).This setting is deprecated if the agent version is 4.0.0 or later.Empty string
Include trace ID in HTTP responseprofiler.responseInject.enablebooleanValid values:- true: turns on the switch- false: turns off the switchfalse

Examples

Sample success responses

JSONformat

{
  "RequestId": "78901766-3806-4E96-8E47-CFEF59E4****\n",
  "Data": "{\"profiler\":{\"enable\":true}}",
  "Message": "",
  "Code": 200,
  "Success": true
}

Error codes

HTTP status codeError codeError messageDescription
400ParameterPidMissingYou must specify pid.You must specify pid.
404AppNotExistThe application does not exist.The application does not exist.
500InternalErrorInternal error. Please try again. Contact the DingTalk service account if the issue persists after multiple retries.Internal error. Please try again. Contact the DingTalk service account if the issue persists after multiple retries.

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