Copilot commented on code in PR #3665:
URL: https://github.com/apache/dubbo-go/pull/3665#discussion_r3788382335
##########
metrics/options.go:
##########
@@ -26,14 +26,25 @@ import (
"dubbo.apache.org/dubbo-go/v3/global"
)
+// Options holds the configuration of the metrics module.
+// It wraps the global MetricsConfig, and can be built programmatically
+// with NewOptions and a set of Option functions.
+//
+// The metrics module is disabled by default; use WithEnabled to turn it on.
Review Comment:
The doc comment implies NewOptions/defaultOptions start with the effective
defaults (e.g. port 9090, protocol prometheus), but global.DefaultMetricsConfig
intentionally returns a config with zero values and relies on defaults.Set
during instance initialization (see global/metric_config.go:68-71 and
instance_options_init.go:246-248). Clarifying this here would prevent readers
from assuming NewOptions immediately applies struct-tag defaults.
--
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]