Beware the Pitfalls: My Cautionary Tale of Self-Hosting Sentry
The cautionary tale of self-hosting Sentry, a popular error-tracking tool. From enthusiastic adoption to costly regret, learn from a developer's painful experience and the ominous warnings that came with it.
The Sentry Saga: A Cautionary Tale I used to be a huge fan of Sentry back in the early 2010s. It was an awesome tool for tracking errors in web applications. I was working with law firms at the time, so sending error reports to a third-party service wasn't an option - I had to host it myself. So, I did.
Fast forward to my days as a contractor. I overheard a colleague asking about hosting Sentry on-premise, and I thought, "Hey, I've done this before, I can help." Big mistake. Huge.
Scare Tactics Ahead The first thing that caught my eye was the Sentry documentation, which was full of warnings about the pitfalls of self-hosting. I mean, who writes this stuff? It's like they're trying to scare you off:
"We don't necessarily recommend self-hosting to everyone. In addition to existing hidden costs, as Sentry evolves, our self-hosted version will become more complex, demanding additional types of infrastructure." They even have fancy pictures and a whole PDF to drive the point home.
Hardware Requirements: The Plot Thickens Despite the ominous warnings, I decided to dig deeper. I opened the documentation and started reading. More warnings, this time about the lack of support for the self-hosted version. Fair enough, I get it - they need to make money too.
But then I saw the hardware requirements: at least 16GB of RAM and 4 cores. Whoa, that's a big jump from the 512MB VPS I used to run Sentry on. Is this a legitimate concern, or am I just being old-fashioned? I'd argue it's a problem, and here's why.
First, it's a red flag about the complexity and fragility of the software. I mean, 16GB of RAM just screams "this is a big, complicated piece of software that will break in mysterious ways." Not exactly scientific, but based on experience.
Second, there's the cost factor. The cheapest VM at Hetzner costs €3.29 per month, but if you need 16GB of RAM, you'll be paying €15.90 per month - that's almost a fivefold increase. And if you're working with a big corporation or paying per compute, the costs can add up quickly.
Linus Torvalds once said, "If you can do something really fast, really well, people start using it differently." The same applies to "if it's small." If Sentry requires 16GB of RAM, you'll think twice before running it locally, and that's a problem.
Script Overload The next chapter in the documentation is about the actual installation process. It's a shell script, which isn't a problem in itself, but I'm not the type to run scripts from the internet without reading them first. So, I did.
The script is about 30 lines long, but each line includes another script. Let's just say I wasn't eager to invest the time to read all 837 lines of code. Especially since this is just the first step towards a reliable installation, and I'm not looking to create a proof-of-concept.
Real-Life Experiences I decided to do some random internet searching to see what others had to say about self-hosting Sentry. Here are some quotes that caught my eye:
- "It's a ton of Docker containers. Things will fail randomly or with a lot of traffic... Hard to upgrade or it would upgrade automatically and break?"
- "If you can dedicate like 1/4 to 1/2 an engineer on it, then I think it's worth it. Keeping in mind that it is an absolute bear with an ungodly amount of stateful dependencies nowadays."
- "I can't say it's been pleasant, probably my least favorite service to do maintenance on or interact with."
Assuming these aren't planted by Sentry's marketing team, it's clear that self-hosting isn't a walk in the park. And since I don't have a spare engineer to dedicate to this, I'd be looking at a significant time investment myself.
The Verdict I threw in the towel before even getting started with self-hosted Sentry. I'm not willing to run software that requires 16GB of RAM, has a complex installation script, and is known to be a pain to maintain. I wouldn't recommend it to anyone else either.
But, as they say, every cloud has a silver lining. This experience got me fired up to create a drop-in replacement for Sentry that can run on any cheap hardware you can find. I hope it'll be a useful alternative for people who share my taste in software.
