You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The code structure in the Metrics module is based on the interface-implementation pattern. However, in the Prometheus implementation, it uses the exporter provided by opencensus. I believe that using promhttp would be more appropriate here because opencensus has been deprecated by CNCF, and opentelemetry is currently the recommended new implementation for the metrics reporter interface, rather than being coupled with the existing Prometheus implementation. Additionally, I suggest using promauto to automatically register metrics instead of manually creating metrics and registering them. I welcome everyone's ideas and suggestions.
The text was updated successfully, but these errors were encountered:
ev1lQuark
changed the title
Use the package provided by Prometheus as much as possible in metrics module
Use the package provided by Prometheus as much as possible in metrics/prometheus
Jun 8, 2023
Metrics 模块下的代码结构是基于接口-实现的,但是在 Prometheus 实现中使用 opencensus 提供的 exporter,我认为这里使用 promhttp 更合适,因为 opencensus 以及 CNCF 目前主推的 opentelemetry 应该作为 metrics reporter 接口的新的实现,而不该耦合在已有的 Prometheus 实现中。除此之外,我认为可以使用 promauto 来自动注册 metrics,目前采用的方式是创建指标再手动注册。欢迎大家提出想法和建议。
The code structure in the Metrics module is based on the interface-implementation pattern. However, in the Prometheus implementation, it uses the exporter provided by opencensus. I believe that using promhttp would be more appropriate here because opencensus has been deprecated by CNCF, and opentelemetry is currently the recommended new implementation for the metrics reporter interface, rather than being coupled with the existing Prometheus implementation. Additionally, I suggest using promauto to automatically register metrics instead of manually creating metrics and registering them. I welcome everyone's ideas and suggestions.
The text was updated successfully, but these errors were encountered: