查詢應用監控中,某個應用的全部自訂設定(如調用鏈採樣設定、Agent開關等)。此介面僅適用於接入應用監控的應用,不適用於接入可觀測鏈路 OpenTelemetry 版的應用。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Pid |
string |
是 |
應用 ID。 您可以通過以下兩種方法擷取 Pid:
重要
|
a2n80plglh@745eddxxx |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID。 |
78901766-3806-4E96-8E47-CFEF59E4**** |
| Data |
string |
應用的自訂配置,格式為一個 JSON 字串,每個配置的含義見返回參數補充說明。 |
{"profiler":{"enable":true}} |
| Message |
string |
返回資訊。 |
查詢應用配置成功 |
| Code |
integer |
介面狀態代碼。 枚舉值:
|
200 |
| Success |
boolean |
查詢是否成功。 枚舉值:
|
true |
在返回的自訂配置中,各個 JSONPath 與對應的開關如下所示。 (註:由於修改時機不同,返回的自訂配置中可能不存在某項配置,此時預設值將生效)
採樣設定說明
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| 採樣策略 | profiler.sampling.useSamplingStrategyV2 | boolean | 取值: - true:自適應採樣。- false:固定採樣率。 | false |
| 採樣率百分比 | profiler.sampling.rate | double | 0~100 之間。 固定採樣率模式下生效。 | 10 |
| 全採樣介面名 | profiler.sampling.v2config.spanNames4FullSampleStr | String | 全採樣介面名,多個由英文逗號分隔。 | Null 字元串 |
| 全採樣介面首碼 | profiler.sampling.v2config.spanNamePrefixes4FullSampleStr | String | 全採樣介面首碼。 | Null 字元串 |
| 全採樣介面尾碼 | profiler.sampling.v2config.spanNameSuffixes4FullSampleStr | String | 全採樣介面尾碼。 | Null 字元串 |
探針開關設定說明
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| 應用監控啟停 | profiler.enable | boolean | 取值: - true:開啟應用監控。- false:關閉應用監控。 | true |
| dubbo 外掛程式開關 | profiler.dubbo.enable | boolean | 取值: - true:開啟 dubbo 外掛程式。- false:關閉 dubbo 外掛程式。 | true |
| mongodb 外掛程式開關 | profiler.mongodb.enable | boolean | 取值: - true:開啟 mongodb 外掛程式。- false:關閉 mongodb 外掛程式。 | true |
| hsf 外掛程式開關 | profiler.hsf.enable | boolean | 取值: - true:開啟 hsf 外掛程式。- false:關閉 hsf 外掛程式。 | true |
| httpclient3 外掛程式開關 | profiler.httpclient3.enable | boolean | 取值: - true:開啟 httpclient3 外掛程式。- false:關閉 httpclient3 外掛程式。 | true |
| httpclient4 外掛程式開關 | profiler.httpclient4.enable | boolean | 取值: - true:開啟 httpclient4 外掛程式。- false:關閉 httpclient4 外掛程式。 | true |
| jdkhttp 外掛程式開關 | profiler.jdkhttp.enable | boolean | 取值: - true:開啟 jdkhttp 外掛程式。- false:關閉 jdkhttp 外掛程式。 | true |
| jetty 外掛程式開關 | profiler.jetty.enable | boolean | 取值: - true:開啟 jetty 外掛程式。- false:關閉 jetty 外掛程式。 | true |
| mybatis 外掛程式開關 | profiler.mybatis.enable | boolean | 取值: - true:開啟 mybatis 外掛程式。- false:關閉 mybatis 外掛程式。 | true |
| mysql 外掛程式開關 | profiler.mysql.enable | boolean | 取值: - true:開啟 mysql 外掛程式。- false:關閉 mysql 外掛程式。 | true |
| okhttp 外掛程式開關 | profiler.okhttp.enable | boolean | 取值: - true:開啟 okhttp 外掛程式。- false:關閉 okhttp 外掛程式。 | true |
| oracle 外掛程式開關 | profiler.oracle.enable | boolean | 取值: - true:開啟 oracle 外掛程式。- false:關閉 oracle 外掛程式。 | true |
| postgresql 外掛程式開關 | profiler.postgresql.enable | boolean | 取值: - true:開啟 postgresql 外掛程式。- false:關閉 postgresql 外掛程式。 | true |
| redis 外掛程式開關 | profiler.redis.enable | boolean | 取值: - true:開啟 redis 外掛程式。- false:關閉 redis 外掛程式。 | true |
| spring 外掛程式開關 | profiler.spring.enable | boolean | 取值: - true:開啟 spring 外掛程式。- false:關閉 spring 外掛程式。 | true |
| springboot 外掛程式開關 | profiler.springboot.enable | boolean | 取值: - true:開啟 springboot 外掛程式。- false:關閉 springboot 外掛程式。 | true |
| tomcat 外掛程式開關 | profiler.tomcat.enable | boolean | 取值: - true:開啟 tomcat 外掛程式。- false:關閉 tomcat 外掛程式。 | true |
| lettuce 外掛程式開關 | profiler.lettuce.enable | boolean | 取值: - true:開啟 lettuce 外掛程式。- false:關閉 lettuce 外掛程式。 | true |
| grpc 外掛程式開關 | profiler.grpc.enable | boolean | 取值: - true:開啟 grpc 外掛程式。- false:關閉 grpc 外掛程式。 | true |
| thrift 外掛程式開關 | profiler.thrift.enable | boolean | 取值: - true:開啟 thrift 外掛程式。- false:關閉 thrift 外掛程式。 | true |
| hystrix 外掛程式開關 | profiler.hystrix.enable | boolean | 取值: - true:開啟 hystrix 外掛程式。- false:關閉 hystrix 外掛程式。 | true |
| rxjava 外掛程式開關 | profiler.rxjava.enable | boolean | 取值: - true:開啟 rxjava 外掛程式。- false:關閉 rxjava 外掛程式。 | true |
| memcached 外掛程式開關 | profiler.memcached.enable | boolean | 取值: - true:開啟 memcached 外掛程式。- false:關閉 memcached 外掛程式。 | true |
| druid 外掛程式開關 | profiler.jdbc.druid.enable | boolean | 取值: - true:開啟 druid 外掛程式。- false:關閉 druid 外掛程式。 | true |
| weblogic 外掛程式開關 | profiler.weblogic.enable | boolean | 取值: - true:開啟 weblogic 外掛程式。- false:關閉 weblogic 外掛程式。 | true |
| elasticjob 外掛程式開關 | profiler.elasticjob.enable | boolean | 取值: - true:開啟 elasticjob 外掛程式。- false:關閉 elasticjob 外掛程式。 | true |
| elasticsearch 外掛程式開關 | profiler.elasticsearch.enable | boolean | 取值: - true:開啟 elasticsearch 外掛程式。- false:關閉 elasticsearch 外掛程式。 | true |
| hikaricp 外掛程式開關 | profiler.jdbc.hikaricp.enable | boolean | 取值: - true:開啟 hikaricp 外掛程式。- false:關閉 hikaricp 外掛程式。 | true |
| influxdb 外掛程式開關 | profiler.influxdb.enable | boolean | 取值: - true:開啟 influxdb 外掛程式。- false:關閉 influxdb 外掛程式。 | true |
| kafka 外掛程式開關 | profiler.kafka.enable | boolean | 取值: - true:開啟 kafka 外掛程式。- false:關閉 kafka 外掛程式。 | true |
| netty 外掛程式開關 | profiler.netty.enable | boolean | 取值: - true:開啟 netty 外掛程式。- false:關閉 netty 外掛程式。 | true |
| play 外掛程式開關 | profiler.play.enable | boolean | 取值: - true:開啟 play 外掛程式。- false:關閉 play 外掛程式。 | true |
| reactor 外掛程式開關 | profiler.reactor.enable | boolean | 取值: - true:開啟 reactor 外掛程式。- false:關閉 reactor 外掛程式。 | true |
| redisson 外掛程式開關 | profiler.redis.redisson.enable | boolean | 取值: - true:開啟 redisson 外掛程式。- false:關閉 redisson 外掛程式。 | true |
| rabbitmq 外掛程式開關 | profiler.rabbitmq.client.enable | boolean | 取值: - true:開啟 rabbitmq 外掛程式。- false:關閉 rabbitmq 外掛程式。 | true |
| schedulerx 外掛程式開關 | profiler.schedulerx.enable | boolean | 取值: - true:開啟 schedulerx 外掛程式。- false:關閉 schedulerx 外掛程式。 | true |
| undertow 外掛程式開關 | profiler.undertow.enable | boolean | 取值: - true:開啟 undertow 外掛程式。- false:關閉 undertow 外掛程式。 | true |
| vertx 外掛程式開關 | profiler.vertx.enable | boolean | 取值: - true:開啟 vertx 外掛程式。- false:關閉 vertx 外掛程式。 | true |
| xxljob 外掛程式開關 | profiler.xxljob.enable | boolean | 取值: - true:開啟 xxljob 外掛程式。- false:關閉 xxljob 外掛程式。 | true |
| onsclient 外掛程式開關 | profiler.onsclient.enable | boolean | 取值: - true:開啟 onsclient 外掛程式。- false:關閉 onsclient 外掛程式。 | true |
| quartz 外掛程式開關 | profiler.quartz.enable | boolean | 取值: - true:開啟 quartz 外掛程式。- false:關閉 quartz 外掛程式。 | true |
| servlet 外掛程式開關 | profiler.servlet.enable | boolean | 取值: - true:開啟 servlet 外掛程式。- false:關閉 servlet 外掛程式。 | true |
| liberty 外掛程式開關 | profiler.liberty.enable | boolean | 取值: - true:開啟 liberty 外掛程式。- false:關閉 liberty 外掛程式。 | true |
| akka 外掛程式開關 | profiler.akka.enable | boolean | 取值: - true:開啟 akka 外掛程式。- false:關閉 akka 外掛程式。 | true |
| cassandra 外掛程式開關 | profiler.cassandra.enable | boolean | 取值: - true:開啟 cassandra 外掛程式。- false:關閉 cassandra 外掛程式。 | true |
| opentelemetry 外掛程式開關 | profiler.opentelemetry.enable | boolean | 取值: - true:開啟 opentelemetry 外掛程式。- false:關閉 opentelemetry 外掛程式。 | true |
| googlehttpclient 外掛程式開關 | profiler.googlehttpclient.enable | boolean | 取值: - true:開啟 googlehttpclient 外掛程式。- false:關閉 googlehttpclient 外掛程式。 | true |
| ning 外掛程式開關 | profiler.ning.asynchttpclient.enable | boolean | 取值: - true:開啟 ning 外掛程式。- false:關閉 ning 外掛程式。 | true |
線程分析設定說明
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| 線程分析總控開關 | profiler.tprof.enableJvmThreadStatistic | boolean | 取值: - true:開啟線程分析。- false:關閉線程分析。 | true |
| 定期儲存本地方法棧資訊 | profiler.tprof.enableThreadStackRecorder | boolean | 取值: - true:開啟定期儲存本地方法棧。- false:關閉定期儲存本地方法棧。 | false |
| 高耗時調用閾值 | profiler.tprof. threadProfilerSlowInteractionRt | int | 單位 ms,高於該閾值的調用會自動儲存本地方法棧。 | 2000 |
應用日誌關聯配置說明
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| 日誌源 | profiler.logSource | String | 取值: - sls:Log Service SLS。 | sls |
| 自動關聯業務日誌與 TraceId | profiler.logging.enable | boolean | 取值: - true:開啟關聯功能。- false:關閉關聯功能。 | true |
| 日誌自動填滿 TraceId | profiler.logging.injectTraceId2Log.enable | boolean | 取值: - true:開啟自動填滿功能。- false:關閉自動填滿功能。探針版本大於等於 4.1.6生效。 | true |
| 日誌自動填滿 SpanId | profiler.logging.injectSpanId2Log.enable | boolean | 取值: - true:開啟自動填滿功能。- false:關閉自動填滿功能。探針版本大於等於 4.1.6生效。 | true |
| Log Service綁定-地區 | profiler.SLS.regionId | String | 關聯日誌源所在的地區。 | Null 字元串 |
| Log Service綁定-Project | profiler.SLS.project | String | 關聯日誌源所屬 Project。 | Null 字元串 |
| Log Service綁定-Logstore | profiler.SLS.logStore | String | 關聯日誌源 Logstore。 | Null 字元串 |
| Log Service綁定-關聯索引 | profiler.SLS.index | String | 關聯日誌源索引。 | Null 字元串 |
URL 收斂配置說明
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| 收斂 URL | profiler.convergence.enable | boolean | 取值: - true:開啟收斂 URL 功能。- false:關閉收斂 URL 功能。 | true |
| 收斂閾值 | profiler.convergence.minServerSize | long | 大於此閾值進行收斂。 | 1000 |
| 收斂規則 | profiler.convergence.pattern | String | 每條規則是一個Regex。 例: /service/(.*?)/demo。多個規則之間以英文逗號分隔。 | Null 字元串 |
Arthas 配置說明
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| Arthas 開關 | profiler.arthas.enable | boolean | 取值: - true:開啟 Arthas 功能。- false:關閉 Arthas 功能。 | false |
| 生效即時 IP | profiler.arthas.enableIps | string | 開啟 Arthas 功能的生效 IP,多個 IP 用英文逗號分隔。 Null 字元串表示對所有 IP 生效。 | Null 字元串 |
持續剖析配置說明
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| 總開關 | profiler.cp.enable | boolean | 取值: - true:開啟持續剖析功能。- false:關閉持續剖析功能。*該開關開啟後,有兩種配置模式,見下表。 | false |
| CPU 熱點 | profiler.cp.cpuEnable | boolean | 取值: - true:開啟 CPU 熱點功能。- false:關閉 CPU 熱點功能。 | false |
| 記憶體熱點 | profiler.cp.allocEnable | boolean | 取值: - true:開啟記憶體熱點功能。- false:關閉記憶體熱點功能。 | false |
| 代碼熱點 | profiler.cp.wallClockEnable | boolean | 取值: - true:開啟代碼熱點功能。- false:關閉代碼熱點功能。 | false |
| 模式 | Key | 欄位說明 | Value |
|---|---|---|---|
| IP 白名單 | cp.allowIPs | IP 白名單 | 指定開啟持續剖析的執行個體 IP,多個 IP 請使用英文逗號(,)分割。 樣本:192.168.0.1,192.168.0.2 |
| cp.allowNetwork | 網段地址 | 請傳遞Null 字元串,否則將無法正常使用。 | |
| 網段地址 | cp.allowIPs | IP 白名單 | 請傳遞Null 字元串,否則將無法正常使用。 |
| cp.allowNetwork | 網段地址 | 命中此網段位址範圍的 IP 執行個體開啟該功能。 樣本:192.168.2.0/24 |
資訊脫敏配置說明
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| 脫敏開關 | profiler.sanitizer.enable | boolean | 取值: - true:開啟脫敏功能。- false:關閉脫敏功能。 | true |
| 脫敏規則 | profiler.sanitizer.keys | String | 對敏感 key 包含詞的匹配規則,不區分大小寫,多個 IP 用英文逗號分隔。 | true |
介面調用配置說明
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| 慢調用閾值 | profiler.thresholds.interface | long | 單位 ms,高於該閾值的回應時間會被標記為慢調用。 | 500 |
| 異常白名單 | profiler.exception.whitelist | String | 指定異常名Regex,白名單命中的異常不參與異常相關圖表的統計,多個規則用英文逗號分隔。 | Null 字元串 |
| 異常過濾父類繼承 | profiler.exception.filterByParentClass | boolean | 取值: - true:開啟該功能。- false:關閉該功能。開啟後,異常過濾中可配置父類異常。 探針版本大於等於 4.1.6生效。 | true |
| HTTP 狀態代碼白名單 | profiler.error.skip | String | 指定忽略錯誤的 HTTP 狀態代碼,白名單設定中的狀態代碼將在錯誤統計中被忽略,多個狀態代碼用英文逗號分隔。 | Null 字元串 |
| 無效介面調用過濾 | profiler.defined.excludeurl | String | 指定忽略的介面調用,每條規則是一個Regex,多個狀態代碼用英文逗號分隔。 | /**/*.jpg,/**/*.png,/**/*.js, /**/*.jpeg,/**/*.pdf,/**/*.xlsx, /**/*.txt,/**/*.docs,/**/*.gif, /**/*.csv |
資料庫調用配置說明
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| 慢 SQL 閾值 | profiler.thresholds.sql | long | 單位 ms,高於該閾值的 SQL 調用會被標記為慢調用。 | 500 |
| 採集 SQL 最大保留長度 | profiler.callsql.maxLength | long | 當 SQL 陳述式大於該閾值的時候,會被截斷。 | 1024 |
| 展示 SQL 中的變數綁定值 | profiler.jdbc.tracesqlbindvalue | boolean | 取值: - true:開啟該功能。- false:關閉該功能。開啟後會捕獲 PrepareStatement 參數綁定的變數值,並在頁面展示。僅支援 MySQL。 | false |
| 展示 SQL 中的常量值 | profiler.jdbc. tracesqlraw | boolean | 取值: - true:開啟該功能。- false:關閉該功能。開啟後捕獲原始 SQL 陳述式。 | false |
調用鏈透傳協議配置說明
註:調用鏈透傳協議配置僅在探針版本大於等於 4.1.x 時生效。
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| 透傳協議 | profiler.trace.protocol.name | String | 取值: - Unset:未設定。- W3C :OpenTelemetry - W3C。- SkyWalking :SkyWalking。- Zipkin :Zipkin - B3。- Jaeger :Jaeger。- EagleEye :EagleEye。 | Unset |
| 透傳模式 | profiler.trace.protocol. strategy | String | 取值: - PriorityUse :優先。- ForceUse :強制。 | PriorityUse |
進階配置說明
| 配置說明 | JSONPath | Type | 備忘 | 預設值 |
| 探針每秒最大鏈路採集量 | profiler.thresholds.limit | int | 保護性手段,防止大流量情境下因為鏈路採集影響業務正常運行。 | 100 |
| 方法堆棧最大保留長度 | profiler.callstack.maxLength | int | 超出長度的方法棧將會在採集的時候被截斷。 探針版本大於等於 4.0.0已棄用該配置。 | 128 |
| 同類異常堆棧區分深度 | profiler.exception.stacktrace | int | 基於此堆棧深度識別同類型的異常。 | 2 |
| 請求入參最大展示長度 | profiler.param.maxLength | int | 請求入參最大展示的長度。 | 512 |
| 自訂 RabbitMQ 消費者 | profiler.rabbitmq.client.consumer.classes | String | 指定 RabbitMQ 消費者的全類名,多個消費者用英文逗號分隔。 探針版本大於等於 4.0.0已棄用該配置。 | Null 字元串 |
| 自訂 Kafka 消費方法 | profiler.kafka.consumer.entryPoint | String | 指定 kafka 消費者的消費。 探針版本大於等於 4.0.0已棄用該配置。 | Null 字元串 |
| kafka 發送訊息自動透傳上下文 | profiler.kafka.enableInjectKafkaHeaders | boolean | 發送時是否自動往 kafka 訊息中添加若干個 Header 用以將發送鏈路以及消費鏈路關聯。 探針版本大於等於 4.0.0已棄用該配置。 | false |
| 非同步透傳掃描包名 | profiler.thread.match.package | String | 當對應包名下的 Runnable/Callable/Supplier 在建立時,會自動捕獲 Trace 上下文並傳遞到新線程。多個包名可採用英文逗號(,)分隔。 探針版本大於等於 4.0.0已棄用該配置。 | Null 字元串 |
| HTTP 返回結果中包含 TraceId | profiler.responseInject.enable | boolean | 取值: - 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. | 應用不存在 |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。