OpenTelemetry 組態
platform-settings.json 檔案的 BasicSettings 中新增了下列「OpenTelemetry 組態」設定。
設定
類型
預設值
描述
EnableOpenTelemetryForLogging
BOOLEAN
false
將值設定為 true 可啟用「OpenTelemetry 收集器」。
此設定值會在 ThingWorx 伺服器啟動時生效。「OpenTelemetry 收集器」將會啟動與 ThingWorx 伺服器的連線。
DisableFileLogging
BOOLEAN
false
若將值設定為 true
/ThingworxStorage/logs 資料夾中產生的記錄檔將會停止。
記錄檔將不會顯示在 Composer > 「監視」部份。
使用者將會在 Composer > 「監視」頁看到下列訊息。
Logging is disabled. Please refer to ThingWorx Platform configuration file to enable it.
* 
此設定只會停止 ThingWorx 內部記錄檔。透過 logback.xml 配置的記錄檔 (例如外部記錄檔) 將會依照配置方式工作。
Console logsHTTP.out 記錄檔不受影響,會繼續工作。
* 
如果將 DisableFileLogging 設定為 true,並將 EnableOpenTelemetryForLogging 設定為 false,則
使用者應該會在 Composer > 「監視」 頁看到一則訊息。
Logging is disabled. Please refer to platform configuration file to enable it.
記錄檔擷取策略會設定為 DefaultLogRetrievalStrategy
如果將 DisableFileLogging 設定為 false,並將 EnableOpenTelemetryForLogging 設定為 true,則記錄檔將可在 Platform 以及與 OpenTelemetry 整合之第三方軟體的檔案中找到。
OpenTelemetry SDK 組態
platform-settings.json 檔案的 OpenTelemetrySettings 中新增了下列「OpenTelemetry 組態」設定。
組態名稱
預設值
描述
BatchLogProcessorMaxQueueSize
2048
每個批次的匯出記錄檔處理的組態。
BatchLogProcessorScheduledDelay
10
BatchLogProcessorMaxExportBatchSize
512
BatchLogProcessorExportTimeout
1000
OtlpGRPCLogExporterEndpoint
OtlpGRPCEnableSSL
false
安全性 (SSL) 組態
OtlpGRPCTrustStorePath
OtlpGRPCTrustStorePassword
OtlpGRPCKeyStorePath
OtlpGRPCKeyStorePassword
RetryOtlpGRPCLogExporterMaxAttempts
5
重試嘗試組態
RetryOtlpGRPCLogExporterBackOffMultiplier
1.5
RetryOtlpGRPCLogExporterInitialBackOff
1
RetryOtlpGRPCLogExporterMaxBackOff
5
OtlpGRPCMetricExporterEndpoint
匯出到 Prometheus 的指標
EnableOpenTelemetryInternalMetrics
true
這是否有幫助?