Skip to content

Will mybatis add metrics for promethues? #1068

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

Open
HuiWang1995 opened this issue May 7, 2025 · 1 comment
Open

Will mybatis add metrics for promethues? #1068

HuiWang1995 opened this issue May 7, 2025 · 1 comment

Comments

@HuiWang1995
Copy link

use micrometer add metrics: execute time of Executor#query , type is summary ,and tag sqlId (more like mappers method). so, monitor sql execute like http`.
Image

If you need. i will pr.

thanks

@harawata
Copy link
Member

harawata commented May 7, 2025

Hello @HuiWang1995 ,

There is no plan to support micrometer out-of-the-box at the moment, but it should be possible to achieve what you want by writing a custom plugin/interceptor.

This answer may help: https://stackoverflow.com/a/76054558/1261766
(It does not use micrometer as I know nothing about it, but the idea is the same, I think)

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