Kill Bill monitoring with Datadog

Kill Bill monitoring with Datadog

The Kill Bill team loves data and measuring things. As part of our performance work last year, we did a pass at cleaning up all of our metrics. As a result, we now export over 600 metrics all over the stack, from latency of low-level database queries to overall rates of HTTP requests. These can be easily integrated with InfluxDB and Grafana: that’s how Groupon monitors its payment infrastructure. Maintaining a monitoring system is no easy task however, especially at scale. It’s no surprise that even companies like Stripe are outsourcing (some of) this work to Datadog. In this post, I’ll show you how to export Kill Bill metrics with Datadog’s standard agent, and some of the metrics you want to keep an eye on in production. I assume you already have Kill Bill running using our Docker image and that you have a Datadog API key. The first step is to enable JMX, by adding the following System Properties to your kpm.yml: ~ > docker exec -ti killbill /bin/bash [email protected]:/var/lib/tomcat7$ export TERM=xterm [email protected]:/var/lib/tomcat7$ vi /etc/killbill/kpm.yml # Add the following to the jvm: line # -Dcom.sun.management.jmxremote=true # -Dcom.sun.management.jmxremote.authenticate=false # -Dcom.sun.management.jmxremote.port=8000 # -Dcom.sun.management.jmxremote.ssl=false [email protected]:/var/lib/tomcat7$ exit ~ > docker restart killbill Then, install the Ubuntu Datadog agent (when prompted, the sudo password is tomcat7): ~ > docker exec -ti killbill /bin/bash [email protected]:/var/lib/tomcat7$ cd /var/tmp [email protected]:/var/lib/tomcat7$ DD_API_KEY=REPLACE_ME bash -c "$(curl -L https://raw.githubusercontent.com/DataDog/dd-agent/master/packaging/datadog-agent/source/install_agent.sh)" [email protected]:/var/lib/tomcat7$ sudo /etc/init.d/datadog-agent start Note that the final installation step, when the agent tries to register with your account, may fail. Starting the agent manually afterwards fixes the issue. Go now to you Datadog account and enable the JMX integration. The final step is...
ChartMogul integration

ChartMogul integration

Running a successful subscription business requires careful monitoring of a variety of metrics: MRR, Churn, LTV, CAC, etc. It’s no surprise that our first plugin was the Analytics plugin, which computes in realtime these metrics and provides tools to build your own dashboards. Understanding, tweaking and validating these KPIs for your own business requires careful thinking and is typically owned by an experienced Business Intelligence team working closely with the executive team on a daily basis. For those who simply can’t afford the overhead, ChartMogul comes to the rescue. Their SaaS platform builds these metrics for you and lets you explore your data through cohorts, custom segments and geo-mapping tools. We’re pleased to announce today a new Kill Bill plugin for ChartMogul. This integration is in fact very similar to the Analytics plugin, i.e. it listens in real-time to events that Kill Bill produces, and mirrors the data in ChartMogul:       The plugin is available in beta at https://github.com/killbill/killbill-chartmogul-plugin. For help or feedback, feel free to reach-out on the...
Choosing a payment gateway

Choosing a payment gateway

Choosing your payment provider is a critical step before launching your service, to avoid potential disruptions to your business down the road. Migrating will be a challenge, especially if you are not storing the cards in a vendor-neutral vault (i.e. tokenize the credit cards with a different provider than your main payment processor). That’s why you need to shop around before committing to a provider, and ask yourself the types of features your business will need one, two or five years down the line. Pricing is definitively one of the key factors to take into consideration. Flat-free or tiered pricing can be appealing because of its simplicity, but pass-through pricing (where the exact costs from the networks are passed down to you) can be cheaper. These fees depend on your region, industry and the type of cards you will process (see Visa and MasterCard rates for more details). Run the numbers with your projected sales and compare which model makes more sense to you. But beyond pricing, you need to make sure the gateway will actually support some advanced features which you might need: Account updater: If you are storing the credit cards with the vendor, make sure they support the ability to automatically update the information (number, expiration date, etc.) as they expire or get stolen (this is especially important if you are running a subscription service, to minimize churn) Level 2 and Level 3 processing: When doing B2B transactions, you can lower your costs by sending extra information about the payment (namely level 2 or level 3 data). Does the provider support passing this data to the...
Integrating Kill Bill with Apple Pay

Integrating Kill Bill with Apple Pay

With the upcoming launch of Apple Pay, we’ve started taking a look at how it works behind the scenes and how we can integrate it with Kill Bill. By way of background, Apple Pay integrates two technologies, the EMV Payment Tokenization Specification and the EMV Contactless Specification. When storing a credit card in Passbook, the credit card information is sent to a Token Service Provider (it seems it will be the credit card networks, e.g. Visa, in the case of Apple Pay), which will contact the issuer bank to generate a token as well as a token expiration date. These aliases will be stored in the secure area of the iPhone and will be used for all transactions associated with this credit card (all merchants will see the same token and token expiration date). When making a transaction, the iPhone sends the tokenized information to the merchant payment software (in our case, Kill Bill). Via a payment gateway, the transaction request is forwarded to the acquiring bank, which will contact the issuer bank via the Payment Network. The interaction between the two banks is where the token and dates are transparently swapped out with the actual number (PAN) and dates. In the end, only the Payment Network and the Issuer see the real credit card, all other parties deal with the Payment Token. Additionally, a unique cryptogram is generated and sent with every transaction. This is to make sure that the Payment Token and its expiration date cannot be used in other types of transactions. Payment Gateways are slowly starting to update their APIs to support these new fields,...