ephraimbuddy commented on code in PR #69007:
URL: https://github.com/apache/airflow/pull/69007#discussion_r3506630059
##########
airflow-core/src/airflow/models/dagbag.py:
##########
@@ -111,7 +113,7 @@ def _read_dag(self, serdag: SerializedDagModel) ->
SerializedDAG | None:
self._dags[serdag.dag_version_id] = _CacheEntry(dag,
serdag.dag_hash, time.monotonic())
cache_size = len(self._dags)
if self._use_cache:
- stats.gauge("api_server.dag_bag.cache_size", cache_size, rate=0.1)
+ stats.gauge(f"{self._stats_prefix}.cache_size", cache_size,
rate=0.1)
Review Comment:
Changing the calls to `f"{self._stats_prefix}.cache_*"` makes
`check_metrics_synced_with_the_registry` see `{_stats_prefix}.cache_hit`,
`{_stats_prefix}.cache_miss`, etc. as missing from the registry. The runtime
metric split makes sense, but the metric names need to stay representable to
the registry checker, or the checker/registry needs to support this pattern.
--
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]