OpenTelemetry 配置
platform-settings.json 文件的 BasicSettings 中添加了以下 OpenTelemetry 配置设置。
设置
类型
默认值
说明
EnableOpenTelemetryForLogging
BOOLEAN
false
将该值设置为 true 可启用 OpenTelemetry Collector。
此设置值在 ThingWorx 服务器启动后生效。OpenTelemetry Collector 将启动与 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,则平台和集成了 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
这对您有帮助吗?