-
Notifications
You must be signed in to change notification settings - Fork 416
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
[#6468] feature(core): add metrics for mysql backend connect pool #6470
[#6468] feature(core): add metrics for mysql backend connect pool #6470
Conversation
core/src/main/java/org/apache/gravitino/metrics/source/MetricsSource.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/gravitino/metrics/source/RelationDatasourceMetricsSource.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/gravitino/metrics/source/RelationDatasourceMetricsSource.java
Outdated
Show resolved
Hide resolved
core/src/main/java/org/apache/gravitino/metrics/source/RelationDatasourceMetricsSource.java
Outdated
Show resolved
Hide resolved
Thank you for reviewing |
@TEOTEO520 Generally LGTM, could you fix the ci failures? |
2009dc3
to
3807085
Compare
3807085
to
f4bc0b6
Compare
core/src/main/java/org/apache/gravitino/storage/relational/session/SqlSessionFactoryHelper.java
Show resolved
Hide resolved
c1c5db7
to
20cac03
Compare
public static final String ENTITY_STORE_RELATION_DATASOURCE_IDLE_CONNECTIONS = | ||
"entity-store.relation-datasource.idle-connections"; | ||
public static final String ENTITY_STORE_RELATION_DATASOURCE_MAX_CONNECTIONS = | ||
"entity-store.relation-datasource.max-connections"; |
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.
why change underscores to dashes?
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.
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.
where are these from?
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.
to be clear, I came from the Prometheus world. https://prometheus.io/docs/practices/naming/
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.
The community practices for database metrics: https://opentelemetry.io/docs/specs/semconv/database/database-metrics/
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.
the metrics names will be converted to Prometheus format when exporting to prometheus, like a.b.c-d
will be converted to a_b_c_d
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.
Thanks for the pointer. It is good to have such a converter, but can we simply avoid the -
in the first place? It is dangerous and annoying if people want to write some expressions. -
can be interpreted as minus.
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.
It's usual to use -
as the seq for names, and mostly the name doesn't contain expressions.
@tengqm is there any other comments? |
I am still more leaning towards removing the |
I don't have strong option to using |
Since we already use |
…ol (apache#6470) ### What changes were proposed in this pull request? Support metrics for JDBC backend connect pool : 1. activeConnectionCount 2. idleConnectionCount 3. maxConnectionCount ### Why are the changes needed? Support metrics for JDBC connection pool Fix: apache#6468 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? No need to test --------- Co-authored-by: teo <litianhang@bilibili.com> Co-authored-by: teo <litianhang@bilibili.co>
What changes were proposed in this pull request?
Support metrics for JDBC backend connect pool :
Why are the changes needed?
Support metrics for JDBC connection pool
Fix: #6468
Does this PR introduce any user-facing change?
No
How was this patch tested?
No need to test