Airflow Summit 2025 即將於 10 月 07 日至 09 日舉行。立即註冊獲取早鳥票!

鏈路追蹤配置

Airflow 可以設定為以 OpenTelemetry 格式傳送鏈路追蹤資料。

設定 - OpenTelemetry

要使用 OpenTelemetry,必須首先安裝所需的軟體包。

pip install 'apache-airflow[otel]'

將以下行新增到您的配置檔案中,例如 airflow.cfg

[traces]
otel_on = True
otel_host = localhost
otel_port = 8889
otel_application = airflow
otel_ssl_active = False
otel_task_log_event = True

啟用 Https

要與 OpenTelemetry 收集器建立 HTTPS 連線,您需要在 OpenTelemetry 收集器的 config.yml 檔案中配置 SSL 證書和金鑰。

receivers:
  otlp:
    protocols:
      http:
        endpoint: 0.0.0.0:4318
        tls:
          cert_file: "/path/to/cert/cert.crt"
          key_file: "/path/to/key/key.pem"

這條目有幫助嗎?