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

Adds a module for instrumentation of Jdbi 3 #1229

Merged
merged 1 commit into from
Dec 12, 2017
Merged

Conversation

arteam
Copy link
Member

@arteam arteam commented Dec 12, 2017

jdbi3 has been released a couple weeks ago (https://groups.google.com/forum/#!topic/jdbi/zS4p0p83sOM) and they use a new model for instrumentation. This change adds support for setting strategies for instrumenting Jdbi apps.

Implementation-wise this is a port of the metrics-jdbi module, improved, upgraded to Java8, and with added support for the @Timed annotation (previously it was not possible to set a custom metric name for an SqlObject class and method).

@arteam arteam force-pushed the metrics-jdbi3 branch 2 times, most recently from a110cf2 to 2a554f0 Compare December 12, 2017 00:48
@arteam arteam changed the title Adds a module for instrumentation of metrics-jdbi3 Adds a module for instrumentation of Jdbi 3 Dec 12, 2017
@arteam arteam added the feature label Dec 12, 2017
@arteam arteam added this to the 4.0.0 milestone Dec 12, 2017
@Override
public String getStatementName(StatementContext statementContext) {
final String rawSql = statementContext.getRawSql();
if (rawSql == null || rawSql.length() == 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rawSql.isEmpty() ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will change!

Jdbi3 has been released a couple weeks ago
(https://groups.google.com/forum/#!topic/jdbi/zS4p0p83sOM) and they use
a new model for instrumentation. This change adds support for setting
strategies for instrumenting Jdbi apps.

Implementation-wise this is a port of the `metrics-jdbi` module, improved,
upgraded to Java8, and with added support for the `@Timed` annotation
(previously it was not possible to set a custom metric name for an SqlObject
class and method).
@arteam arteam merged commit f4bd7d0 into 4.0-development Dec 12, 2017
@arteam arteam deleted the metrics-jdbi3 branch December 12, 2017 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants