xBis7 commented on code in PR #53722:
URL: https://github.com/apache/airflow/pull/53722#discussion_r2495787706
##########
providers/openlineage/src/airflow/providers/openlineage/plugins/adapter.py:
##########
@@ -161,8 +161,16 @@ def emit(self, event: RunEvent):
try:
with ExitStack() as stack:
-
stack.enter_context(Stats.timer(f"ol.emit.attempts.{event_type}.{transport_type}"))
- stack.enter_context(Stats.timer("ol.emit.attempts"))
+ try:
+ from airflow.metrics.dual_stats_manager import
DualStatsManager
+
+ # If enabled on the config, publish metrics twice,
+ # once with backward compatible name, and then with tags.
+
stack.enter_context(DualStatsManager.timer("ol.emit.attempts"))
Review Comment:
Yes, with the latest changes it will fail to build the legacy metric without
them. BTW, that's another metric that doesn't exist in the docs and needs to be
added.
--
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]