全部產品
Search
文件中心

Application Real-Time Monitoring Service:GetTraceAppConfig - 查詢應用監控自訂設定

更新時間:Apr 10, 2026

查詢應用監控中,某個應用的全部自訂設定(如調用鏈採樣設定、Agent開關等)。此介面僅適用於接入應用監控的應用,不適用於接入可觀測鏈路 OpenTelemetry 版的應用。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

當前API暫無授權資訊透出。

請求參數

名稱

類型

必填

描述

樣本值

Pid

string

應用 ID。

您可以通過以下兩種方法擷取 Pid:

  • API:ListTraceApps - 擷取指定地區下全部應用監控任務的列表

  • 控制台:在 ARMS 控制台的應用監控>應用列表頁面單擊目標應用程式名稱。此時瀏覽器地址欄中的 URL 即包含應用的 Pid,格式為 pid=xxx。由於瀏覽器進行了編碼,因此需要對 Pid 稍作修改。例如,如果 URL 中包含的 Pid 為 xxx%4074xxx,則需要將%40 替換為@,即:xxx@74xxx。

重要
  • 通過控制台擷取 Pid 的方法,僅適用於接入應用監控的應用,不適用於接入可觀測鏈路 OpenTelemetry 版的應用。

  • 本文檔所描述的介面 GetTraceAppConfig,也僅支援查詢接入應用監控的應用的自訂設定。

a2n80plglh@745eddxxx

返回參數

名稱

類型

描述

樣本值

object

Schema of Response

RequestId

string

請求 ID。

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

Data

string

應用的自訂配置,格式為一個 JSON 字串,每個配置的含義見返回參數補充說明

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

Message

string

返回資訊。

查詢應用配置成功

Code

integer

介面狀態代碼。

枚舉值:

  • 2xx :

    成功

  • 3xx :

    重新導向

  • 4xx :

    請求錯誤

  • 5xx :

    伺服器錯誤

200

Success

boolean

查詢是否成功。

枚舉值:

  • true :

    成功

  • false :

    失敗

true

在返回的自訂配置中,各個 JSONPath 與對應的開關如下所示。 (註:由於修改時機不同,返回的自訂配置中可能不存在某項配置,此時預設值將生效)

採樣設定說明

配置說明JSONPathType備忘預設值
採樣策略profiler.sampling.useSamplingStrategyV2boolean取值:
- true:自適應採樣。
- false:固定採樣率。

false
採樣率百分比profiler.sampling.ratedouble0~100 之間。
固定採樣率模式下生效。
10
全採樣介面名profiler.sampling.v2config.spanNames4FullSampleStrString全採樣介面名,多個由英文逗號分隔。Null 字元串
全採樣介面首碼profiler.sampling.v2config.spanNamePrefixes4FullSampleStrString全採樣介面首碼。Null 字元串
全採樣介面尾碼profiler.sampling.v2config.spanNameSuffixes4FullSampleStrString全採樣介面尾碼。Null 字元串

探針開關設定說明

配置說明JSONPathType備忘預設值
應用監控啟停profiler.enableboolean取值:
- true:開啟應用監控。
- false:關閉應用監控。

true
dubbo 外掛程式開關profiler.dubbo.enableboolean取值:
- true:開啟 dubbo 外掛程式。
- false:關閉 dubbo 外掛程式。

true
mongodb 外掛程式開關profiler.mongodb.enableboolean取值:
- true:開啟 mongodb 外掛程式。
- false:關閉 mongodb 外掛程式。

true
hsf 外掛程式開關profiler.hsf.enableboolean取值:
- true:開啟 hsf 外掛程式。
- false:關閉 hsf 外掛程式。

true
httpclient3 外掛程式開關profiler.httpclient3.enableboolean取值:
- true:開啟 httpclient3 外掛程式。
- false:關閉 httpclient3 外掛程式。

true
httpclient4 外掛程式開關profiler.httpclient4.enableboolean取值:
- true:開啟 httpclient4 外掛程式。
- false:關閉 httpclient4 外掛程式。

true
jdkhttp 外掛程式開關profiler.jdkhttp.enableboolean取值:
- true:開啟 jdkhttp 外掛程式。
- false:關閉 jdkhttp 外掛程式。

true
jetty 外掛程式開關profiler.jetty.enableboolean取值:
- true:開啟 jetty 外掛程式。
- false:關閉 jetty 外掛程式。

true
mybatis 外掛程式開關profiler.mybatis.enableboolean取值:
- true:開啟 mybatis 外掛程式。
- false:關閉 mybatis 外掛程式。

true
mysql 外掛程式開關profiler.mysql.enableboolean取值:
- true:開啟 mysql 外掛程式。
- false:關閉 mysql 外掛程式。

true
okhttp 外掛程式開關profiler.okhttp.enableboolean取值:
- true:開啟 okhttp 外掛程式。
- false:關閉 okhttp 外掛程式。

true
oracle 外掛程式開關profiler.oracle.enableboolean取值:
- true:開啟 oracle 外掛程式。
- false:關閉 oracle 外掛程式。

true
postgresql 外掛程式開關profiler.postgresql.enableboolean取值:
- true:開啟 postgresql 外掛程式。
- false:關閉 postgresql 外掛程式。

true
redis 外掛程式開關profiler.redis.enableboolean取值:
- true:開啟 redis 外掛程式。
- false:關閉 redis 外掛程式。

true
spring 外掛程式開關profiler.spring.enableboolean取值:
- true:開啟 spring 外掛程式。
- false:關閉 spring 外掛程式。

true
springboot 外掛程式開關profiler.springboot.enableboolean取值:
- true:開啟 springboot 外掛程式。
- false:關閉 springboot 外掛程式。

true
tomcat 外掛程式開關profiler.tomcat.enableboolean取值:
- true:開啟 tomcat 外掛程式。
- false:關閉 tomcat 外掛程式。

true
lettuce 外掛程式開關profiler.lettuce.enableboolean取值:
- true:開啟 lettuce 外掛程式。
- false:關閉 lettuce 外掛程式。

true
grpc 外掛程式開關profiler.grpc.enableboolean取值:
- true:開啟 grpc 外掛程式。
- false:關閉 grpc 外掛程式。

true
thrift 外掛程式開關profiler.thrift.enableboolean取值:
- true:開啟 thrift 外掛程式。
- false:關閉 thrift 外掛程式。

true
hystrix 外掛程式開關profiler.hystrix.enableboolean取值:
- true:開啟 hystrix 外掛程式。
- false:關閉 hystrix 外掛程式。

true
rxjava 外掛程式開關profiler.rxjava.enableboolean取值:
- true:開啟 rxjava 外掛程式。
- false:關閉 rxjava 外掛程式。

true
memcached 外掛程式開關profiler.memcached.enableboolean取值:
- true:開啟 memcached 外掛程式。
- false:關閉 memcached 外掛程式。

true
druid 外掛程式開關profiler.jdbc.druid.enableboolean取值:
- true:開啟 druid 外掛程式。
- false:關閉 druid 外掛程式。

true
weblogic 外掛程式開關profiler.weblogic.enableboolean取值:
- true:開啟 weblogic 外掛程式。
- false:關閉 weblogic 外掛程式。

true
elasticjob 外掛程式開關profiler.elasticjob.enableboolean取值:
- true:開啟 elasticjob 外掛程式。
- false:關閉 elasticjob 外掛程式。

true
elasticsearch 外掛程式開關profiler.elasticsearch.enableboolean取值:
- true:開啟 elasticsearch 外掛程式。
- false:關閉 elasticsearch 外掛程式。

true
hikaricp 外掛程式開關profiler.jdbc.hikaricp.enableboolean取值:
- true:開啟 hikaricp 外掛程式。
- false:關閉 hikaricp 外掛程式。

true
influxdb 外掛程式開關profiler.influxdb.enableboolean取值:
- true:開啟 influxdb 外掛程式。
- false:關閉 influxdb 外掛程式。

true
kafka 外掛程式開關profiler.kafka.enableboolean取值:
- true:開啟 kafka 外掛程式。
- false:關閉 kafka 外掛程式。

true
netty 外掛程式開關profiler.netty.enableboolean取值:
- true:開啟 netty 外掛程式。
- false:關閉 netty 外掛程式。

true
play 外掛程式開關profiler.play.enableboolean取值:
- true:開啟 play 外掛程式。
- false:關閉 play 外掛程式。

true
reactor 外掛程式開關profiler.reactor.enableboolean取值:
- true:開啟 reactor 外掛程式。
- false:關閉 reactor 外掛程式。

true
redisson 外掛程式開關profiler.redis.redisson.enableboolean取值:
- true:開啟 redisson 外掛程式。
- false:關閉 redisson 外掛程式。

true
rabbitmq 外掛程式開關profiler.rabbitmq.client.enableboolean取值:
- true:開啟 rabbitmq 外掛程式。
- false:關閉 rabbitmq 外掛程式。

true
schedulerx 外掛程式開關profiler.schedulerx.enableboolean取值:
- true:開啟 schedulerx 外掛程式。
- false:關閉 schedulerx 外掛程式。

true
undertow 外掛程式開關profiler.undertow.enableboolean取值:
- true:開啟 undertow 外掛程式。
- false:關閉 undertow 外掛程式。

true
vertx 外掛程式開關profiler.vertx.enableboolean取值:
- true:開啟 vertx 外掛程式。
- false:關閉 vertx 外掛程式。

true
xxljob 外掛程式開關profiler.xxljob.enableboolean取值:
- true:開啟 xxljob 外掛程式。
- false:關閉 xxljob 外掛程式。

true
onsclient 外掛程式開關profiler.onsclient.enableboolean取值:
- true:開啟 onsclient 外掛程式。
- false:關閉 onsclient 外掛程式。

true
quartz 外掛程式開關profiler.quartz.enableboolean取值:
- true:開啟 quartz 外掛程式。
- false:關閉 quartz 外掛程式。

true
servlet 外掛程式開關profiler.servlet.enableboolean取值:
- true:開啟 servlet 外掛程式。
- false:關閉 servlet 外掛程式。

true
liberty 外掛程式開關profiler.liberty.enableboolean取值:
- true:開啟 liberty 外掛程式。
- false:關閉 liberty 外掛程式。

true
akka 外掛程式開關profiler.akka.enableboolean取值:
- true:開啟 akka 外掛程式。
- false:關閉 akka 外掛程式。

true
cassandra 外掛程式開關profiler.cassandra.enableboolean取值:
- true:開啟 cassandra 外掛程式。
- false:關閉 cassandra 外掛程式。

true
opentelemetry 外掛程式開關profiler.opentelemetry.enableboolean取值:
- true:開啟 opentelemetry 外掛程式。
- false:關閉 opentelemetry 外掛程式。

true
googlehttpclient 外掛程式開關profiler.googlehttpclient.enableboolean取值:
- true:開啟 googlehttpclient 外掛程式。
- false:關閉 googlehttpclient 外掛程式。

true
ning 外掛程式開關profiler.ning.asynchttpclient.enableboolean取值:
- true:開啟 ning 外掛程式。
- false:關閉 ning 外掛程式。

true

線程分析設定說明

配置說明JSONPathType備忘預設值
線程分析總控開關profiler.tprof.enableJvmThreadStatisticboolean取值:
- true:開啟線程分析。
- false:關閉線程分析。

true
定期儲存本地方法棧資訊profiler.tprof.enableThreadStackRecorderboolean取值:
- true:開啟定期儲存本地方法棧。
- false:關閉定期儲存本地方法棧。

false
高耗時調用閾值profiler.tprof. threadProfilerSlowInteractionRtint單位 ms,高於該閾值的調用會自動儲存本地方法棧。2000

應用日誌關聯配置說明

配置說明JSONPathType備忘預設值
日誌源profiler.logSourceString取值:
- sls:Log Service SLS。
sls
自動關聯業務日誌與 TraceIdprofiler.logging.enableboolean取值:
- true:開啟關聯功能。
- false:關閉關聯功能。

true
日誌自動填滿 TraceIdprofiler.logging.injectTraceId2Log.enableboolean取值:
- true:開啟自動填滿功能。
- false:關閉自動填滿功能。
探針版本大於等於 4.1.6生效。


true
日誌自動填滿 SpanIdprofiler.logging.injectSpanId2Log.enableboolean取值:
- true:開啟自動填滿功能。
- false:關閉自動填滿功能。
探針版本大於等於 4.1.6生效。


true
Log Service綁定-地區profiler.SLS.regionIdString關聯日誌源所在的地區。Null 字元串
Log Service綁定-Projectprofiler.SLS.projectString關聯日誌源所屬 Project。Null 字元串
Log Service綁定-Logstoreprofiler.SLS.logStoreString關聯日誌源 Logstore。Null 字元串
Log Service綁定-關聯索引profiler.SLS.indexString關聯日誌源索引。Null 字元串

URL 收斂配置說明

配置說明JSONPathType備忘預設值
收斂 URLprofiler.convergence.enableboolean取值:
- true:開啟收斂 URL 功能。
- false:關閉收斂 URL 功能。

true
收斂閾值profiler.convergence.minServerSizelong大於此閾值進行收斂。1000
收斂規則profiler.convergence.patternString每條規則是一個Regex。
例:/service/(.*?)/demo
多個規則之間以英文逗號分隔。

Null 字元串

Arthas 配置說明

配置說明JSONPathType備忘預設值
Arthas 開關profiler.arthas.enableboolean取值:
- true:開啟 Arthas 功能。
- false:關閉 Arthas 功能。

false
生效即時 IPprofiler.arthas.enableIpsstring開啟 Arthas 功能的生效 IP,多個 IP 用英文逗號分隔。
Null 字元串表示對所有 IP 生效。
Null 字元串

持續剖析配置說明

配置說明JSONPathType備忘預設值
總開關profiler.cp.enableboolean取值:
- true:開啟持續剖析功能。
- false:關閉持續剖析功能。
*該開關開啟後,有兩種配置模式,見下表。


false
CPU 熱點profiler.cp.cpuEnableboolean取值:
- true:開啟 CPU 熱點功能。
- false:關閉 CPU 熱點功能。

false
記憶體熱點profiler.cp.allocEnableboolean取值:
- true:開啟記憶體熱點功能。
- false:關閉記憶體熱點功能。

false
代碼熱點profiler.cp.wallClockEnableboolean取值:
- true:開啟代碼熱點功能。
- false:關閉代碼熱點功能。

false
模式Key欄位說明Value
IP 白名單cp.allowIPsIP 白名單指定開啟持續剖析的執行個體 IP,多個 IP 請使用英文逗號(,)分割。
樣本:192.168.0.1,192.168.0.2
cp.allowNetwork網段地址請傳遞Null 字元串,否則將無法正常使用。
網段地址cp.allowIPsIP 白名單請傳遞Null 字元串,否則將無法正常使用。
cp.allowNetwork網段地址命中此網段位址範圍的 IP 執行個體開啟該功能。
樣本:192.168.2.0/24

資訊脫敏配置說明

配置說明JSONPathType備忘預設值
脫敏開關profiler.sanitizer.enableboolean取值:
- true:開啟脫敏功能。
- false:關閉脫敏功能。

true
脫敏規則profiler.sanitizer.keysString對敏感 key 包含詞的匹配規則,不區分大小寫,多個 IP 用英文逗號分隔。true

介面調用配置說明

配置說明JSONPathType備忘預設值
慢調用閾值profiler.thresholds.interfacelong單位 ms,高於該閾值的回應時間會被標記為慢調用。500
異常白名單profiler.exception.whitelistString指定異常名Regex,白名單命中的異常不參與異常相關圖表的統計,多個規則用英文逗號分隔。Null 字元串
異常過濾父類繼承profiler.exception.filterByParentClassboolean取值:
- true:開啟該功能。
- false:關閉該功能。
開啟後,異常過濾中可配置父類異常。
探針版本大於等於 4.1.6生效。



true
HTTP 狀態代碼白名單profiler.error.skipString指定忽略錯誤的 HTTP 狀態代碼,白名單設定中的狀態代碼將在錯誤統計中被忽略,多個狀態代碼用英文逗號分隔。Null 字元串
無效介面調用過濾profiler.defined.excludeurlString指定忽略的介面調用,每條規則是一個Regex,多個狀態代碼用英文逗號分隔。/**/*.jpg,/**/*.png,/**/*.js,
/**/*.jpeg,/**/*.pdf,/**/*.xlsx,
/**/*.txt,/**/*.docs,/**/*.gif,
/**/*.csv


資料庫調用配置說明

配置說明JSONPathType備忘預設值
慢 SQL 閾值profiler.thresholds.sqllong單位 ms,高於該閾值的 SQL 調用會被標記為慢調用。500
採集 SQL 最大保留長度profiler.callsql.maxLengthlong當 SQL 陳述式大於該閾值的時候,會被截斷。1024
展示 SQL 中的變數綁定值profiler.jdbc.tracesqlbindvalueboolean取值:
- true:開啟該功能。
- false:關閉該功能。
開啟後會捕獲 PrepareStatement 參數綁定的變數值,並在頁面展示。僅支援 MySQL


false
展示 SQL 中的常量值profiler.jdbc. tracesqlrawboolean取值:
- true:開啟該功能。
- false:關閉該功能。
開啟後捕獲原始 SQL 陳述式。


false

調用鏈透傳協議配置說明

註:調用鏈透傳協議配置僅在探針版本大於等於 4.1.x 時生效。

配置說明JSONPathType備忘預設值
透傳協議profiler.trace.protocol.nameString取值:
- Unset:未設定。
- W3C :OpenTelemetry - W3C。
- SkyWalking :SkyWalking。
- Zipkin :Zipkin - B3。
- Jaeger :Jaeger。
- EagleEye :EagleEye。





Unset
透傳模式profiler.trace.protocol. strategyString取值:
- PriorityUse :優先。
- ForceUse :強制。

PriorityUse

進階配置說明

配置說明JSONPathType備忘預設值
探針每秒最大鏈路採集量profiler.thresholds.limitint保護性手段,防止大流量情境下因為鏈路採集影響業務正常運行。100
方法堆棧最大保留長度profiler.callstack.maxLengthint超出長度的方法棧將會在採集的時候被截斷。
探針版本大於等於 4.0.0已棄用該配置。
128
同類異常堆棧區分深度profiler.exception.stacktraceint基於此堆棧深度識別同類型的異常。2
請求入參最大展示長度profiler.param.maxLengthint請求入參最大展示的長度。512
自訂 RabbitMQ 消費者profiler.rabbitmq.client.consumer.classesString指定 RabbitMQ 消費者的全類名,多個消費者用英文逗號分隔。
探針版本大於等於 4.0.0已棄用該配置。
Null 字元串
自訂 Kafka 消費方法profiler.kafka.consumer.entryPointString指定 kafka 消費者的消費。
探針版本大於等於 4.0.0已棄用該配置。
Null 字元串
kafka 發送訊息自動透傳上下文profiler.kafka.enableInjectKafkaHeadersboolean發送時是否自動往 kafka 訊息中添加若干個 Header 用以將發送鏈路以及消費鏈路關聯。
探針版本大於等於 4.0.0已棄用該配置。
false
非同步透傳掃描包名profiler.thread.match.packageString當對應包名下的 Runnable/Callable/Supplier 在建立時,會自動捕獲 Trace 上下文並傳遞到新線程。多個包名可採用英文逗號(,)分隔。
探針版本大於等於 4.0.0已棄用該配置。
Null 字元串
HTTP 返回結果中包含 TraceIdprofiler.responseInject.enableboolean取值:
- true:開啟返回 TraceId 的開關。
- false:關閉返回 TraceId 的開關。

false

樣本

正常返回樣本

JSON格式

{
  "RequestId": "78901766-3806-4E96-8E47-CFEF59E4****\n",
  "Data": "{\"profiler\":{\"enable\":true}}",
  "Message": "查詢應用配置成功",
  "Code": 200,
  "Success": true
}

錯誤碼

HTTP status code

錯誤碼

錯誤資訊

描述

400 ParameterPidMissing You must specify pid. 參數pid缺失
500 InternalError Internal error. Please try again. Contact the DingTalk service account if the issue persists after multiple retries. 內部錯誤,建議重試。如果多次重試報錯請聯絡DingTalk服務帳號。
404 AppNotExist The application does not exist. 應用不存在

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情