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

metrics statistics and usage issues [Question] #3322

Open
xuxiaoxia96 opened this issue May 12, 2024 · 5 comments
Open

metrics statistics and usage issues [Question] #3322

xuxiaoxia96 opened this issue May 12, 2024 · 5 comments
Labels
question Further information is requested

Comments

@xuxiaoxia96
Copy link

使用kratos的服务后台可能是分布式的,并且随机hash到某一个节点。
但是现在内存收集的metric都是单机的数据,分布式情况会不会统计出现问题呢?

@xuxiaoxia96 xuxiaoxia96 added the question Further information is requested label May 12, 2024
@kratos-ci-bot kratos-ci-bot changed the title metrics统计和使用的问题[Question] metrics statistics and usage issues [Question] May 12, 2024
@kratos-ci-bot
Copy link
Collaborator

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


The service backend using kratos may be distributed and hashed to a certain node randomly.
But now the metrics collected in memory are all single-machine data. Will there be problems with statistics in distributed situations?

@Windfarer
Copy link
Member

kratos收集和暴露的是当前实例的数据,通常的实践是用prometheus收集各实例的数据,进行后续的处理

@kratos-ci-bot
Copy link
Collaborator

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Kratos collects and exposes the data of the current instance. The usual practice is to use prometheus to collect the data of each instance for subsequent processing.

@harbourlga
Copy link
Contributor

想要采集到所有实例的数据,你可以把你的服务都注册到像consul这种服务注册中心。然后prometheus直接获取注册中心的注册实例去采集这样就不会遗漏数据了

@kratos-ci-bot
Copy link
Collaborator

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


If you want to collect data from all instances, you can register your services to a service registration center like consul. Then prometheus directly obtains the registration instance of the registration center to collect so that no data is missed.

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

No branches or pull requests

4 participants