通用應用屬性

各種屬性可以在您的 application.properties 檔案、application.yml 檔案中指定,或作為命令列開關。本附錄提供了常用的 Spring Cloud Commons 屬性列表以及引用它們的基礎類。

屬性貢獻可能來自類路徑中的其他 jar 檔案,因此您不應將其視為詳盡列表。此外,您可以定義自己的屬性。

可觀測性元資料

可觀測性 - 指標

您可以在下方找到此專案宣告的所有指標列表。

斷路器函式觀測

將函式包裝作為斷路器的備用方案時建立的觀測。

指標名稱 spring.cloud.circuitbreaker (由約定類 org.springframework.cloud.client.circuitbreaker.observation.DefaultCircuitBreakerObservationConvention 定義)。型別 timer

指標名稱 spring.cloud.circuitbreaker.active (由約定類 org.springframework.cloud.client.circuitbreaker.observation.DefaultCircuitBreakerObservationConvention 定義)。型別 long task timer

在開始觀測後新增的 KeyValue 可能會在 *.active 指標中缺失。
Micrometer 內部使用 nanoseconds 作為基本單位。然而,每個後端決定實際的基本單位。(例如,Prometheus 使用秒)

包含類 org.springframework.cloud.client.circuitbreaker.observation.CircuitBreakerObservationDocumentation 的完全限定名。

所有標籤必須以 spring.cloud.circuitbreaker 字首開頭!
表 1. 低基數鍵

名稱

描述

spring.cloud.circuitbreaker.type (必需)

定義包裝的 lambda 型別。

斷路器 Supplier 觀測

將 Supplier 包裝傳遞給斷路器時建立的觀測。

指標名稱 spring.cloud.circuitbreaker (由約定類 org.springframework.cloud.client.circuitbreaker.observation.DefaultCircuitBreakerObservationConvention 定義)。型別 timer

指標名稱 spring.cloud.circuitbreaker.active (由約定類 org.springframework.cloud.client.circuitbreaker.observation.DefaultCircuitBreakerObservationConvention 定義)。型別 long task timer

在開始觀測後新增的 KeyValue 可能會在 *.active 指標中缺失。
Micrometer 內部使用 nanoseconds 作為基本單位。然而,每個後端決定實際的基本單位。(例如,Prometheus 使用秒)

包含類 org.springframework.cloud.client.circuitbreaker.observation.CircuitBreakerObservationDocumentation 的完全限定名。

所有標籤必須以 spring.cloud.circuitbreaker 字首開頭!
表 2. 低基數鍵

名稱

描述

spring.cloud.circuitbreaker.type (必需)

定義包裝的 lambda 型別。

可觀測性 - Span

您可以在下方找到此專案宣告的所有 span 列表。

斷路器函式觀測 Span

將函式包裝作為斷路器的備用方案時建立的觀測。

Span 名稱 spring.cloud.circuitbreaker (由約定類 org.springframework.cloud.client.circuitbreaker.observation.DefaultCircuitBreakerObservationConvention 定義)。

包含類 org.springframework.cloud.client.circuitbreaker.observation.CircuitBreakerObservationDocumentation 的完全限定名。

所有標籤必須以 spring.cloud.circuitbreaker 字首開頭!
表 3. 標籤鍵

名稱

描述

spring.cloud.circuitbreaker.type (必需)

定義包裝的 lambda 型別。

斷路器 Supplier 觀測 Span

將 Supplier 包裝傳遞給斷路器時建立的觀測。

Span 名稱 spring.cloud.circuitbreaker (由約定類 org.springframework.cloud.client.circuitbreaker.observation.DefaultCircuitBreakerObservationConvention 定義)。

包含類 org.springframework.cloud.client.circuitbreaker.observation.CircuitBreakerObservationDocumentation 的完全限定名。

所有標籤必須以 spring.cloud.circuitbreaker 字首開頭!
表 4. 標籤鍵

名稱

描述

spring.cloud.circuitbreaker.type (必需)

定義包裝的 lambda 型別。