AlexStocks commented on code in PR #3685:
URL: https://github.com/apache/dubbo-go/pull/3685#discussion_r3829367119


##########
metrics/metadata/collector.go:
##########
@@ -66,6 +66,10 @@ func (c *MetadataMetricCollector) start() {
                                        c.handleMetadataMappingListen(event)
                                case MetadataMappingRemove:
                                        c.handleMetadataMappingRemove(event)
+                               case MetadataCache:

Review Comment:
   [P1] 这两个事件当前没有任何生产者,因此指标始终为 0
   
   当前 Head 全仓只在这里和 `metric_set.go` 引用 
`MetadataCache`/`MetadataFetch`;`GetMetadataInfoWithContext` 的缓存命中、远程 
report、RPC fallback 路径都没有创建并 `Publish` 这两类事件。公开入口探针预填 `metaCache` 后调用 
`GetMetadataInfo`,100ms 内收不到 `MetricsMetadata` 事件而失败;给缓存命中路径补 `Publish` 
后同一探针通过。这样暴露出的 `dubbo_metadata_cache_*` / `dubbo_metadata_fetch_total` 
无论真实流量如何都会保持 0。请在各查询分支发布包含 `provider_app`、`source`、`storage_type`、`result` 
的事件,并增加从 `GetMetadataInfo` 入口断言实际 collector 输出的回归测试。



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to