Posting a sentry

15 August 2014

Sentry is brilliant. If you have to know anything about the operations of some specific software, that is.

And, you can choose between paying for a hosted service at, or hosting the code yourself. I wasn't sure whether it was the right solution for a project, so I opted to try hosting on Heroku and see if that worked.

My first attempt used the fully free Heroku option, including the free hobby postgres database, and that worked fine, but quickly hit the database row limit of 10000 rows. So then I looked into the new AWS RDS Postgres option, since AWS has more flexible plans generally than Heroku, which means you pay either more or less depending on your usage, where Heroku makes the price more stable from month to month. There are a couple of ways to get sentry running on Heroku, and django-sentry-on-heroku is the closest to how I ended up getting it working, but I also looked at sentry-on-heroku for inspiration.

So I created the database, and updated the DATABASE_URL environment variable in the Heroku app, and it worked fine again, this time without the database row limits. However, very soon the app stopped responding and just became practically unusable. Looking into the AWS console I realised that the region had defaulted to US West, where Heroku is hosted in AWS US East. So the procedure to migrate was to create a new RDS instance in US East, and configure it the same way, and then copy the database across. With the postgres server in the same AWS zone as the Heroku web server, it works great again.

The procedure for migrating the data was:

pg_dump -Fc "postgres://" > sentry.dump
pg_restore --username=sentryadmin --dbname=sentrydb sentry.dump

We are using the Cocoapod "Raven" in our iOS projects to log directly from iOS devices to our sentry server, so we can easily see what's happening with the iOS apps we've made. It's really handy to be able to watch the iOS apps remotely.

Update 18th August 2014: I've just changed the sslmode to verify-full from required now that AWS RDS supports certificate verification, as per the AWS Postgres docs. I'm also not sure that the pg_restore command above uses SSL, so you should use a temporary password for that restore, and immediately change the password afterwards, then ensure you set the Heroku DATABASE_URL with the verify-full option as well. I also neglected to add the blog post I initially used to get Sentry up and running on Heroku.

Developers Don’t Just Build 

12 June 2014

I love this description of developers that Horace Dediu wrote, in reply to comments about WWDC 2014:

Developers don’t just build. Using an analogy of building or construction, they are architects and designers as well as contractors and craftsmen and artists as well as builders. And not of just of houses but of cities and communities. They see and think through tools and techniques for building and innovations in building materials. Innovations which allow them to imagine first and, later, to build new cities in ways that were never before possible.

Thinking Like A Bézier Path 

28 May 2014

David Rönnqvist has created the best tutorial I've ever seen. Worth viewing just to play with the curve drawing.

Balance Your NSNotification Observers 

02 May 2014

One aspect of using NSNotifications I hadn't encountered before, is that you can add the same observer for a particular notification multiple times, which will result in that observer having it's method called multiple times.

I tend to balance out my own calls, which might explain why I've not seen it before, but in examining other code I came across this and I didn't actually know about this behaviour.

A Conference Call in Real Life 

16 April 2014

I think anyone who has spent any significant time in a conference call will find this very funny.


13 April 2014

The good news is, if you're carrying a burden without knowing it, your life could be better than you realize. Imagine walking around for years with five pound ankle weights, then suddenly having them removed.

Let's Photograph All Life 

13 April 2014

"Here's a great idea, let's photograph all life on this planet."

Stepping Into The Future 

10 April 2014

Just to follow on from my last post about the future of programming, here is an article about some possible steps into that future.

The Future of Programming 

10 April 2014

I've always felt like I don't know what I'm doing when it comes to software engineering. Watching this is the first time I've felt like maybe that has actually been a good thing.

Heartbleed Bug 

10 April 2014

Oh dear.