potiuk commented on a change in pull request #20677:
URL: https://github.com/apache/airflow/pull/20677#discussion_r780808425
##########
File path: airflow/www/gunicorn_config.py
##########
@@ -37,3 +42,18 @@ def on_starting(server):
# Load providers before forking workers
ProvidersManager().connection_form_widgets
+
+
+def post_fork(server, worker):
+ """
+ Needed to workoround open-telemetry not working well with gunicorn fork
model.
+
+ See more:
https://opentelemetry-python.readthedocs.io/en/latest/examples/fork-process-model/README.html
+ """
+ server.log.info("Worker spawned (pid: %s)", worker.pid)
+
+ resource = Resource.create(attributes={"service.name": "api-service"})
Review comment:
BTW. I think it should be "airflow-service" here :)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]