How Divipay improved performance up to 20x with Sentry for Mobile and Web
About Divipay
DiviPay is an all-in-one virtual corporate card and expense management platform that enables finance teams to better manage, control, and streamline spending across their organization. Finance teams can control employee spending with a predefined approval process, spend rules, and limits on each card.
For example, the in-house finance team of a business can issue an unlimited number of corporate spend cards to their junior sales employees while adding rules like “spend cannot be >$50 per month on restaurant expenses” — so payment approval is not solely based on funds available or line of credit. This eliminates the hassle and paperwork of individual employee reimbursements and credit card sharing while budgeting for expenses.
With many fast-growing companies like Canva and Xero relying on their services, DiviPay needed to avoid costly downtime and errors in their application. Since implementing Sentry across its entire stack, DiviPay has seen the following benefits:
- Improved time-to-resolution by 12x
- Speeding up transactions, including 20x acceleration of numerous endpoints
Moving away from reactive and manual debugging
Servicing over 1000 companies and their finance teams, DiviPay aims to make the process of managing employee expenses more efficient and secure for businesses.
When a payment is made by a cardholder, it flows from the merchant, through the acquirer and to the issuer and back. Mastercard/Visa (who oversee the payment flow) enforce a maximum time threshold for this process— thus, DiviPay has less than one second to respond on whether or not a payment should be accepted.
The complex approval logic on the cards DiviPay issues places high stress on the DiviPay team to quickly resolve endpoint errors. Yet prior to Sentry, they had little visibility into where in the code an error had occurred.
Matthew Egan, Engineering Team Lead at Divipay, recalls: “Once our code was deployed, it was in the abyss. We would have to find it by dogfooding or just hearing from customers when something wasn’t working.”
While the team worked around-the-clock to resolve bugs, the onus often fell on the customer to help first find the issue. Egan notes:
It was hard to replicate issues. I would have to tease it out of the customer, asking them what steps they took— and most of the time, I couldn’t replicate it because they’d missed something. Then, I would have to go crawling through the logs. It was a process that took a lot of time.
Requirements
Usability was top-of-mind for DiviPay when they were searching for a monitoring solution. With their backend API running on Python and Django, web app in React, and mobile app in React Native, DiviPay was looking for robust platform support that would group and dedupe errors to help reduce noise and increase focus for their engineers.
Plus, having faced issues with log interpretation in their past monitoring tool, the DiviPay team wanted to understand every stack trace, metric, and trend they were tracking.
The DiviPay team chose Sentry as their go-to platform when they started off as a 4-person team, and they’ve continued to use it as their company has scaled. “Today,” Egan says, “there’s rarely an issue I can’t decipher in Sentry.”
Finding the root cause of an issue, fast
Since DiviPay has implemented Sentry, the team has gained full visibility into how their production applications are performing. Before Sentry, it was difficult to find where an error occurred because their servers had many requests and transactions going through them at once. Even if a developer identified the error, they’d only get a stack trace and needed to reverse-engineer it to see what actions led to an error.
Egan explains: “With Sentry, you can get the stack trace straight away and see what led up to the error. This lets engineers replicate and fix the issue much faster. We had an incident two days ago, and it took us about 5 minutes to diagnose, find the root cause, and fix it.”
Managing notification fatigue has also been important for Divipay’s error monitoring experience. “We integrate with many 3rd parties, so we get a ton of errors flowing in. We’ve been able to use Sentry’s For Review feature to sort issues by number of events. This helps us triage and prioritize what needs immediate attention.”
Accelerating transaction speed to deliver top-notch product experience
In addition, DiviPay uses Sentry Performance to accelerate its endpoints for a variety of issues. Performance speed is essential for Divipay because they must respond to Mastercard/Visa in 500ms to successfully complete a transaction.
With Sentry Performance, DiviPay can easily understand why something is slow and proactively respond. Whether it is a slow database query or a poor-performing API call, the DiviPay team can see the exact subset of requests in production causing slowness in their system.
Egan comments on the resulting business impact, stating: “Using Performance, we’ve hit our global SLOs of a p99 < 1.5 seconds and a p95 < 800ms. Because we’ve increased our transaction speed, we can add in extra checks (like budget limits) to the cards we issue to meet customers’ needs.”
Managing all mobile releases and versions in one view
Before Sentry, DiviPay found it particularly difficult to debug issues on their mobile application. The team noted: “There’s hundreds of devices and operating systems out there, many of which you haven’t heard of. It’s nearly impossible to troubleshoot an issue when something goes wrong without access to the device, OS, and version of code being run.”
As the DiviPay team answered customer service tickets in rotation, they discovered that people were sometimes months behind in their iOS/Android versions. Using Sentry Release Health, Divipay now has a consolidated view into the adoption and performance of their releases so they can quickly see when something goes wrong and needs to be addressed— whether it is failure to update versions or a bug affecting a specific release.
What’s Next?
As its team and product continues to scale, DiviPay aims to continue consolidating their observability tooling in order to have a holistic view of code health across applications. Having all errors and performance issues logged in one place in Sentry makes it easy for the Divipay team to determine root cause— as opposed to stitching together data between tools— thus improving overall efficiency. The team will also continue systematically measuring the initial baseline latency of their endpoints and monitoring changes in app health and performance.
Results
With Sentry, DiviPay has significantly sped up time-to-resolution and improved the performance of endpoint transactions. Egan notes that, per issue, Divipay has “saved 10 minutes on finding an issue, and saved an hour on resolving the issue, bringing time-to-resolution down from 1 hour to 5 minutes.” In addition, DiviPay sped up at least 4 of its endpoints by 20x using Sentry.
Unlike past tools we’ve used, Sentry provides the complete picture. No more combing through logs— Sentry makes it incredibly easy to find issues in our code to deliver a much smoother payment experience and a better overall customer experience.