追蹤跨度屬性和事件

用戶端追蹤記錄是透過執行 RPC 收集,可提供用戶端每個要求的幾項資訊,包括時間戳記的範圍,指出用戶端傳送 RPC 要求的時間,以及用戶端收到 RPC 回應的時間。這些範圍包括網路和用戶端系統造成的延遲。

用戶端追蹤記錄可能包含下列資訊:

時距中繼資料

時距 ID 這個範圍的專屬 ID
父項時距 ID 父項時距的 ID,根時距則未設定
專案 ID Google Cloud 擷取追蹤記錄的專案 ID
開始時間 時距開始時間
結束時間 時距結束時間

範圍屬性

用戶端版本
otel.scope.version 字串
用戶端環境
gcp.datastore.memory_utilization 雙倍 (百分比)
用戶端連線屬性
gcp.datastore.settings.channel.needs_credentials 布林值
gcp.datastore.settings.channel.needs_endpoint 布林值
gcp.datastore.settings.channel.needs_headers 布林值
gcp.datastore.settings.channel.should_auto_close 布林值
gcp.datastore.settings.channel.transport_name 字串。例如:「grpc」
gcp.datastore.settings.credentials.authentication_type 字串。例如:「OAuth2」
gcp.datastore.settings.host 字串。例如:"datastore.googleapis.com:443"
資料庫屬性
gcp.datastore.settings.project_id 字串
Google Cloud 包含 Datastore 資料庫的專案 ID
gcp.datastore.settings.database_id 字串
資料庫外部 ID (名稱)
用戶端 RPC 重試設定
gcp.datastore.settings.retrySettings.initial_retry_delay 字串
時間長度 (以秒為單位),例如 0.01 秒
gcp.datastore.settings.retrySettings.initial_rpc_timeout
gcp.datastore.settings.retrySettings.max_attempts 整數 (計數)
gcp.datastore.settings.retrySettings.max_retry_delay 字串
時間長度 (以秒為單位),例如 0.1 秒
gcp.datastore.settings.retrySettings.max_rpc_timeout
gcp.datastore.settings.retrySettings.retry_delay_multiplier 雙精度值
gcp.datastore.settings.retrySettings.rpc_timeout_multiplier 雙精度值
gcp.datastore.settings.retrySettings.total_timeout 字串
時間長度 (以秒為單位)
OpenTelemetry 設定
otel.scope.name 字串。例如:"com.google.cloud.datastore"
service.name Sparky
telemetry.sdk.language 字串。例如:"java"
telemetry.sdk.name opentelemetry
telemetry.sdk.version 例如:1.29.0

記錄檔和事件

用戶端追蹤記錄會提供下列記錄和事件。

查詢事件

事件:
「Lookup complete」(查閱完成)
「Transaction.Lookup complete」(交易查閱完成)
已接收 整數
找不到 整數
延遲 整數
transactional 布林值
transaction_id 字串

提交事件

事件:
「Commit complete」(完成提交)
「Transaction.Commit complete」(交易完成提交)
doc_count 整數
transactional 布林值
transaction_id 字串

RunQuery 事件

事件:
"RunQuery complete"
"Transaction.RunQuery complete"
doc_count 整數
transactional 布林值
transaction_id 字串
read_conistencey STRONGEVENTUAL
more_results 下列其中一個值:
  • NOT_FINISHED
  • MORE_RESULTS_AFTER_LIMIT
  • MORE_RESULTS_AFTER_CURSOR
  • NO_MORE_RESULTS

後續步驟