-
Notifications
You must be signed in to change notification settings - Fork 61
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
tomcat_jdbc_query_seconds always 0 on Tomcat 9.0.14 #12
Comments
I think there is a BUG in the following : e.g. if delta = 500 ==> delta/1000 = 0 Proposed fix : (double)delta/100 = 0.5 |
Thanks for reporting. Cannot believe I missed this. Will release a bugfix soon. |
nlighten
added a commit
that referenced
this issue
Jan 21, 2019
…_always_0 divide using double, fixes #12
Released version 0.0.9. Should be visible in Maven repo in a few hours or so. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here is the sample -
# HELP tomcat_jdbc_query_seconds JDBC query duration
# TYPE tomcat_jdbc_query_seconds histogram
tomcat_jdbc_query_seconds_bucket{status="error",le="0.01",} 4.0
tomcat_jdbc_query_seconds_bucket{status="error",le="0.02",} 4.0
tomcat_jdbc_query_seconds_bucket{status="error",le="0.05",} 4.0
tomcat_jdbc_query_seconds_bucket{status="error",le="0.1",} 4.0
tomcat_jdbc_query_seconds_bucket{status="error",le="0.5",} 4.0
tomcat_jdbc_query_seconds_bucket{status="error",le="1.0",} 4.0
tomcat_jdbc_query_seconds_bucket{status="error",le="5.0",} 4.0
tomcat_jdbc_query_seconds_bucket{status="error",le="10.0",} 4.0
tomcat_jdbc_query_seconds_bucket{status="error",le="+Inf",} 4.0
tomcat_jdbc_query_seconds_count{status="error",} 4.0
tomcat_jdbc_query_seconds_sum{status="error",} 0.0
tomcat_jdbc_query_seconds_bucket{status="success",le="0.01",} 8342.0
tomcat_jdbc_query_seconds_bucket{status="success",le="0.02",} 8342.0
tomcat_jdbc_query_seconds_bucket{status="success",le="0.05",} 8342.0
tomcat_jdbc_query_seconds_bucket{status="success",le="0.1",} 8342.0
tomcat_jdbc_query_seconds_bucket{status="success",le="0.5",} 8342.0
tomcat_jdbc_query_seconds_bucket{status="success",le="1.0",} 8342.0
tomcat_jdbc_query_seconds_bucket{status="success",le="5.0",} 8342.0
tomcat_jdbc_query_seconds_bucket{status="success",le="10.0",} 8342.0
tomcat_jdbc_query_seconds_bucket{status="success",le="+Inf",} 8342.0
tomcat_jdbc_query_seconds_count{status="success",} 8342.0
tomcat_jdbc_query_seconds_sum{status="success",} 0.0
Sample config
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory" jdbcInterceptors="nl.nlighten.prometheus.tomcat.TomcatJdbcInterceptor(logFailed=true,logSlow=true,threshold=1000,buckets=.01|.02|0.05|.1|.5|1|5|10,slowQueryBuckets=1|2.5|5|10|30)"
The text was updated successfully, but these errors were encountered: