You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "deepchand (via GitHub)" <gi...@apache.org> on 2023/07/12 01:43:57 UTC

[GitHub] [airflow] deepchand commented on a diff in pull request #32524: Metrics - Enabled encrypted OTel Endpoint

deepchand commented on code in PR #32524:
URL: https://github.com/apache/airflow/pull/32524#discussion_r1260462190


##########
airflow/metrics/otel_logger.py:
##########
@@ -394,8 +395,11 @@ def get_otel_logger(cls) -> SafeOtelLogger:
     allow_list_validator = AllowListValidator(allow_list)
 
     resource = Resource(attributes={SERVICE_NAME: "Airflow"})
-    # TODO:  figure out https instead of http ??
-    endpoint = f"http://{host}:{port}/v1/metrics"
+
+    if ssl_active:
+        endpoint = f"https://{host}:{port}/v1/metrics"
+    else:
+        endpoint = f"http://{host}:{port}/v1/metrics"

Review Comment:
   thanks @ferruzzi, I have updated the code



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org