You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/01/10 07:58:14 UTC

[GitHub] [airflow] hterik commented on a change in pull request #20677: Opentelemetry instrumentation Flask

hterik commented on a change in pull request #20677:
URL: https://github.com/apache/airflow/pull/20677#discussion_r780956860



##########
File path: airflow/tracer.py
##########
@@ -0,0 +1,23 @@
+from opentelemetry import trace
+from opentelemetry.instrumentation.flask import FlaskInstrumentor
+from opentelemetry.instrumentation.requests import RequestsInstrumentor
+from opentelemetry.exporter.jaeger.thrift import JaegerExporter
+from opentelemetry.sdk.resources import SERVICE_NAME, Resource
+from opentelemetry.sdk.trace import TracerProvider
+from opentelemetry.sdk.trace.export import BatchSpanProcessor
+
+def init(service_name, metric_port):
+    jaeger_exporter = JaegerExporter(

Review comment:
       I think the idea of opentelemetry is to provide a vendor-agnostic _agent_ on the localhost, which can forward the data to an external server, which could be either Jaeger or any other collector. 
   So you don't need to run the whole Jaeger server (all-in-one) inside airflows own docker-compose, only the agent is required. 
   Jaeger ships with such an agent and there is also one provided by opentelemetry, which can forward to Jaeger. Attaching these to console output could be difficult to not get mixed up with logging i assume?
   
   As long as there is a way to configure for forwarding the telemetry to a server running outside of the airflow docker-compose it's good :)
   
   (Sorry for drive-by-comments without knowing the full context and goals here, feel free to ignore)




-- 
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