Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetMetricPath 不起效果 #1

Closed
mutoulazy opened this issue Nov 13, 2020 · 2 comments
Closed

SetMetricPath 不起效果 #1

mutoulazy opened this issue Nov 13, 2020 · 2 comments

Comments

@mutoulazy
Copy link

当前版本:
github.com/penglongli/gin-metrics v0.1.0

问题情况:
m.SetMetricPath("/metrics") 之后实际访问metrics接口路径还是defaultMetricPath(/debug/metrics)

问题原因:
源码
// SetMetricPath set metricPath property. metricPath is used for Prometheus
// to get gin server monitoring data.
func (m *Monitor) SetMetricPath(path string) {
m.metricPath = defaultMetricPath
}

是不是应该改为
m.metricPath = path

penglongli added a commit that referenced this issue Nov 13, 2020
@penglongli
Copy link
Owner

是的,谢谢提醒~
已经修改,使用 v0.1.1 版本

@mutoulazy
Copy link
Author

v0.1.1 已验证无此问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants