-
Notifications
You must be signed in to change notification settings - Fork 35
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
Feature:Add prometheus to monitor the gateway and grpc server #69
Conversation
pkg/prometheus/config/files/.gitkeep
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is the file use for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
因为git无法追踪文件夹,为了让这个文件夹被追踪以挂载到prometheus容器中,所以创建一个空文件。提前有这个文件夹存在的话也不必在代码中再去检查这个文件夹是否存在,以便于后续的json文件的生成。事实上prometheus是可以以静态文件的方式追踪grpc服务的metrics的,但是为了扩展性,我觉得以文件的动态发现的方式好一点。这样就不用手动的修改prometheus的配置文件从而实现服务的动态发现。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Etcd-related methods in discover package are not reused in order to meet customization needs
Even it have a lot of change but most change is from json file,don't worry
See pkg/prometheus/README.md for more datail #53