-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Added metrics generator #46
base: work-for-release-0.23.x
Are you sure you want to change the base?
Added metrics generator #46
Conversation
vnandwana
commented
Apr 11, 2022
- Replaced javax.servlet with Jakarta servlet.
* Replaced javax.servlet with Jakarta servlet.
* Replaced javax.servlet with Jakarta servlet.
@@ -114,8 +114,7 @@ | |||
<dependency> | |||
<groupId>org.jooq</groupId> | |||
<artifactId>jooq</artifactId> | |||
<!-- 3.14.0 broke returning() on MySQL :( --> |
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.
Could you confirm this is now fixed, by running the integration tests?
export STRIPE_API_KEY=...
export STRIPE_PUBLIC_KEY=...
mvn test -Pintegration-mysql
This has been a long standing bug in jooq
that has prevented us from upgrading. It would be very good news if it's now addressed, many plugins could be upgraded.
@@ -19,4 +19,7 @@ | |||
<Match> | |||
<Class name="~org\.killbill\.billing\.plugin\.stripe\.dao\.gen.*"/> | |||
</Match> | |||
<Bug pattern="EI_EXPOSE_REP"/> |
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.
Ignoring EI_EXPOSE_REP
and EI_EXPOSE_REP2
is probably fine, however NP_PARAMETER_MUST_BE_NONNULL_BUT_MARKED_AS_NULLABLE
seems a bit suspicious. Can you investigate what's triggering this?
} | ||
|
||
try { | ||
metricRegistry.getMetricRegistry().counter("stripe_plugin_counter").inc(1); |
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.
This code snippet from the hello world plugin is really just an example. We probably don't want it in plugins that are used in production code 😉
You could add something more useful here for instance:
killbill-stripe-plugin/src/main/java/org/killbill/billing/plugin/stripe/StripePaymentPluginApi.java
Line 573 in 8eb30d7
return intent.capture(paymentIntentParams, requestOptions); |
try {
return intent.capture(paymentIntentParams, requestOptions);
} finally {
metricRegistry.getMetricRegistry().counter("stripe_capture").inc(1);
}
Same for other Stripe client API calls.
@@ -60,6 +62,10 @@ public void start(final BundleContext context) throws Exception { | |||
final StripeHealthcheck stripeHealthcheck = new StripeHealthcheck(stripeConfigPropertiesConfigurationHandler); | |||
registerHealthcheck(context, stripeHealthcheck); | |||
|
|||
// Expose metrics (optional) |
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.
Not optional anymore 😄