dannyl1u commented on issue #41822:
URL: https://github.com/apache/airflow/issues/41822#issuecomment-2492240767

   @ferruzzi and I had a good look into this. We suspect the bug is caused by a 
new resource in `SafeOtelLogger` being created each time `Stats.incr()` etc. is 
called 
   
   
https://github.com/apache/airflow/blob/5a0272c272e412e133c2031d237d05cf12a783ef/airflow/metrics/otel_logger.py#L402
   
   Here `Resource.create(attributes={HOST_NAME: get_hostname(), SERVICE_NAME: 
service_name})` is called, but we should be checking if a resource has already 
been created and to use the already created resource, instead of creating a new 
one each time (which "overwrites" the previously created resource)
   
   @howardyoo would like to know your opinion on this


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

Reply via email to