AutomationDev85 commented on code in PR #67328:
URL: https://github.com/apache/airflow/pull/67328#discussion_r3372944271
##########
providers/edge3/src/airflow/providers/edge3/models/edge_worker.py:
##########
@@ -179,21 +184,71 @@ def set_metrics(
"free_concurrency",
}
- Stats.gauge(
- "edge_worker.status",
- sysinfo.get("status", logging.NOTSET), # type: ignore
- tags={"worker_name": worker_name},
- )
- Stats.gauge("edge_worker.connected", int(connected), tags={"worker_name":
worker_name})
- Stats.gauge("edge_worker.maintenance", int(maintenance),
tags={"worker_name": worker_name})
- Stats.gauge("edge_worker.jobs_active", jobs_active, tags={"worker_name":
worker_name})
- Stats.gauge("edge_worker.concurrency", concurrency, tags={"worker_name":
worker_name})
- Stats.gauge("edge_worker.free_concurrency", free_concurrency,
tags={"worker_name": worker_name})
- Stats.gauge(
- "edge_worker.num_queues",
- len(queues),
- tags={"worker_name": worker_name, "queues": ",".join(queues)},
- )
+ if DualStatsManager is not None:
+ DualStatsManager.gauge(
+ "edge_worker.status",
+ sysinfo.get("status", logging.NOTSET), # type: ignore
+ tags={},
+ extra_tags={"worker_name": worker_name},
+ )
+
+ DualStatsManager.gauge(
+ "edge_worker.connected",
+ int(connected),
+ tags={},
+ extra_tags={"worker_name": worker_name},
+ )
+
+ DualStatsManager.gauge(
+ "edge_worker.maintenance",
+ int(maintenance),
+ tags={},
+ extra_tags={"worker_name": worker_name},
+ )
+
+ DualStatsManager.gauge(
+ "edge_worker.jobs_active",
+ jobs_active,
+ tags={},
+ extra_tags={"worker_name": worker_name},
+ )
+
+ DualStatsManager.gauge(
+ "edge_worker.concurrency",
+ concurrency,
+ tags={},
+ extra_tags={"worker_name": worker_name},
+ )
+
+ DualStatsManager.gauge(
+ "edge_worker.free_concurrency",
+ free_concurrency,
+ tags={},
+ extra_tags={"worker_name": worker_name},
+ )
+
+ DualStatsManager.gauge(
+ "edge_worker.num_queues",
+ len(queues),
+ tags={},
+ extra_tags={"worker_name": worker_name, "queues":
",".join(queues)},
+ )
+ else:
+ Stats.gauge(
Review Comment:
@xBis7 Thanks for your support! Sorry was of for some time. I reworked the
file and I think with that the statsd metrics are exported in the way so that
prior 3.3 versions are able to get the legacy metrics. Or did I misunderstood
your comment?
--
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]