Sentry started as (and remains) an open-source project, growing out of an error logging tool built in 2008. That original build nine years ago was Django and Celery (Python’s asynchronous task codebase), with PostgreSQL as the database and Redis as the power behind Celery.\r\n\r\n

We displayed a truly shrewd notion of branding even then, giving the project a catchy name that companies the world over remain jealous of to this day: django-db-log. For the longest time, Sentry’s subtitle on GitHub was “A simple Django app, built with love.” A slightly more accurate description probably would have included Starcraft and Soylent alongside love; regardless, this captured what Sentry was all about.\r\n\r\n

#MessageQueue #InMemoryDatabases","rawContent":"Sentry started as (and remains) an open-source project, growing out of an error logging tool built in 2008. That original build nine years ago was @{Django}|tool:994| and @{Celery}|tool:1075| (Python’s asynchronous task codebase), with @{PostgreSQL}|tool:1028| as the database and @{Redis}|tool:1031| as the power behind Celery.\r\n\r\nWe displayed a truly shrewd notion of branding even then, giving the project a catchy name that companies the world over remain jealous of to this day: django-db-log. For the longest time, Sentry’s subtitle on GitHub was “A simple Django app, built with love.” A slightly more accurate description probably would have included Starcraft and Soylent alongside love; regardless, this captured what Sentry was all about.\r\n\r\n@{#MessageQueue}|topic:96| @{#InMemoryDatabases}|topic:241|","publishedAt":"2018-09-13T08:40:00Z","commentsCount":0,"private":false,"upvotesCount":21,"upvoted":false,"flagged":false,"bookmarked":false,"viewCount":364367,"draft":false,"createdAt":"2018-09-13T08:40:14Z","decisionType":null,"showAutoGeneratedTag":false,"permissions":{"type":"id","generated":true,"id":"$StackDecision:101031322402455108.permissions","typename":"Permissions"},"subjectTools":[],"fromTools":[],"toTools":[],"link":{"type":"id","generated":true,"id":"$StackDecision:101031322402455108.link","typename":"Link"},"company":{"type":"id","generated":false,"id":"Company:101231709547274597","typename":"Company"},"topics":[{"type":"id","generated":true,"id":"StackDecision:101031322402455108.topics.0","typename":"Topic"},{"type":"id","generated":true,"id":"StackDecision:101031322402455108.topics.1","typename":"Topic"}],"stack":null,"services":[{"type":"id","generated":false,"id":"Tool:101231773837565192","typename":"Tool"},{"type":"id","generated":false,"id":"Tool:101231773871944512","typename":"Tool"},{"type":"id","generated":false,"id":"Tool:101231773853533403","typename":"Tool"},{"type":"id","generated":false,"id":"Tool:101231773854768982","typename":"Tool"}],"user":{"type":"id","generated":false,"id":"User:101232126867692719","typename":"User"},"rootComments":[],"__typename":"StackDecision","answers({\"first\":2})":{"type":"id","generated":true,"id":"$StackDecision:101031322402455108.answers({\"first\":2})","typename":"StackDecisionConnection"}},"$StackDecision:101031322402455108.permissions":{"edit":false,"delete":false,"__typename":"Permissions"},"$StackDecision:101031322402455108.link":{"url":"https://stackshare.io/sentry/how-sentry-receives-20-billion-events-per-month-while-preparing-to-handle-twice-that","title":"How Sentry Receives 20 Billion Events Per Month While Preparing to Handle Twice That - Sentry Tech Stack | StackShare","imageUrl":"","__typename":"Link"},"StackDecision:101031322402455108.topics.0":{"name":"MessageQueue","__typename":"Topic"},"StackDecision:101031322402455108.topics.1":{"name":"InMemoryDatabases","__typename":"Topic"},"User:101232126867692719":{"id":"101232126867692719","username":"jtcunning","path":"/jtcunning","imageUrl":"https://img.stackshare.io/user/265010/default_aca380c06539c567ed5bc2f7523ead79ac271e8d.jpg","displayName":"James Cunningham","title":"Operations Engineer","companyName":"Sentry","__typename":"User"},"$StackDecision:101031322402455108.answers({\"first\":2})":{"count":0,"pageInfo":{"type":"id","generated":true,"id":"$StackDecision:101031322402455108.answers({\"first\":2}).pageInfo","typename":"PageInfo"},"edges":[],"__typename":"StackDecisionConnection"},"$StackDecision:101031322402455108.answers({\"first\":2}).pageInfo":{"hasNextPage":false,"endCursor":null,"__typename":"PageInfo"},"$StackProfile:101231778564413057.stackDecisions({\"currentStackOnly\":true,\"first\":5}).edges.0":{"node":{"type":"id","generated":false,"id":"StackDecision:101031322402455108","typename":"StackDecision"},"__typename":"StackDecisionEdge"},"StackDecision:101031322402962743":{"id":"101031322402962743","publicId":"101031322402962743","htmlContent":"

As Sentry runs throughout the day, there are about 50 different offline tasks that we execute—anything from “process this event, pretty please” to “send all of these cool people some emails.” There are some that we execute once a day and some that execute thousands per second.\n\n

Managing this variety requires a reliably high-throughput message-passing technology. We use Celery's RabbitMQ implementation, and we stumbled upon a great feature called Federation that allows us to partition our task queue across any number of RabbitMQ servers and gives us the confidence that, if any single server gets backlogged, others will pitch in and distribute some of the backlogged tasks to their consumers.\n\n

#MessageQueue","rawContent":"As Sentry runs throughout the day, there are about 50 different offline tasks that we execute—anything from “process this event, pretty please” to “send all of these cool people some emails.” There are some that we execute once a day and some that execute thousands per second.\r\n\r\nManaging this variety requires a reliably high-throughput message-passing technology. We use @{Celery}|tool:1075|'s @{RabbitMQ}|tool:1061| implementation, and we stumbled upon a great feature called Federation that allows us to partition our task queue across any number of RabbitMQ servers and gives us the confidence that, if any single server gets backlogged, others will pitch in and distribute some of the backlogged tasks to their consumers.\r\n\r\n@{#MessageQueue}|topic:96|","publishedAt":"2018-09-13T08:40:00Z","commentsCount":0,"private":false,"upvotesCount":18,"upvoted":false,"flagged":false,"bookmarked":false,"viewCount":1809074,"draft":false,"createdAt":"2018-09-13T08:40:53Z","decisionType":null,"showAutoGeneratedTag":false,"permissions":{"type":"id","generated":true,"id":"$StackDecision:101031322402962743.permissions","typename":"Permissions"},"subjectTools":[],"fromTools":[],"toTools":[],"link":{"type":"id","generated":true,"id":"$StackDecision:101031322402962743.link","typename":"Link"},"company":{"type":"id","generated":false,"id":"Company:101231709547274597","typename":"Company"},"topics":[{"type":"id","generated":true,"id":"StackDecision:101031322402962743.topics.0","typename":"Topic"}],"stack":null,"services":[{"type":"id","generated":false,"id":"Tool:101231773871944512","typename":"Tool"},{"type":"id","generated":false,"id":"Tool:101231773864300849","typename":"Tool"}],"user":{"type":"id","generated":false,"id":"User:101232126867692719","typename":"User"},"rootComments":[],"__typename":"StackDecision","answers({\"first\":2})":{"type":"id","generated":true,"id":"$StackDecision:101031322402962743.answers({\"first\":2})","typename":"StackDecisionConnection"}},"$StackDecision:101031322402962743.permissions":{"edit":false,"delete":false,"__typename":"Permissions"},"$StackDecision:101031322402962743.link":{"url":"https://stackshare.io/sentry/how-sentry-receives-20-billion-events-per-month-while-preparing-to-handle-twice-that","title":"How Sentry Receives 20 Billion Events Per Month While Preparing to Handle Twice That - Sentry Tech Stack | StackShare","imageUrl":"","__typename":"Link"},"StackDecision:101031322402962743.topics.0":{"name":"MessageQueue","__typename":"Topic"},"$StackDecision:101031322402962743.answers({\"first\":2})":{"count":0,"pageInfo":{"type":"id","generated":true,"id":"$StackDecision:101031322402962743.answers({\"first\":2}).pageInfo","typename":"PageInfo"},"edges":[],"__typename":"StackDecisionConnection"},"$StackDecision:101031322402962743.answers({\"first\":2}).pageInfo":{"hasNextPage":false,"endCursor":null,"__typename":"PageInfo"},"$StackProfile:101231778564413057.stackDecisions({\"currentStackOnly\":true,\"first\":5}).edges.1":{"node":{"type":"id","generated":false,"id":"StackDecision:101031322402962743","typename":"StackDecision"},"__typename":"StackDecisionEdge"},"StackDecision:101031322404006635":{"id":"101031322404006635","publicId":"101031322404006635","htmlContent":"

Sentry's event processing pipeline, which is responsible for handling all of the ingested event data that makes it through to our offline task processing, is written primarily in Python. \n\n

For particularly intense code paths, like our source map processing pipeline, we have begun re-writing those bits in Rust. Rust’s lack of garbage collection makes it a particularly convenient language for embedding in Python. It allows us to easily build a Python extension where all memory is managed from the Python side (if the Python wrapper gets collected by the Python GC we clean up the Rust object as well).","rawContent":"Sentry's event processing pipeline, which is responsible for handling all of the ingested event data that makes it through to our offline task processing, is written primarily in @{Python}|tool:993|. \n\nFor particularly intense code paths, like our source map processing pipeline, [we have begun re-writing those bits in @{Rust}|tool:1070|](https://blog.sentry.io/2016/10/19/fixing-python-performance-with-rust.html). Rust’s lack of garbage collection makes it a particularly convenient language for embedding in Python. It allows us to easily build a Python extension where all memory is managed from the Python side (if the Python wrapper gets collected by the Python GC we clean up the Rust object as well).","publishedAt":"2018-09-13T08:42:00Z","commentsCount":1,"private":false,"upvotesCount":18,"upvoted":false,"flagged":false,"bookmarked":false,"viewCount":325085,"draft":false,"createdAt":"2018-09-13T08:42:36Z","decisionType":null,"showAutoGeneratedTag":false,"permissions":{"type":"id","generated":true,"id":"$StackDecision:101031322404006635.permissions","typename":"Permissions"},"subjectTools":[],"fromTools":[],"toTools":[],"link":{"type":"id","generated":true,"id":"$StackDecision:101031322404006635.link","typename":"Link"},"company":{"type":"id","generated":false,"id":"Company:101231709547274597","typename":"Company"},"topics":[],"stack":null,"services":[{"type":"id","generated":false,"id":"Tool:101231773837179153","typename":"Tool"},{"type":"id","generated":false,"id":"Tool:101231773869138699","typename":"Tool"}],"user":{"type":"id","generated":false,"id":"User:101232126867692719","typename":"User"},"rootComments":[{"type":"id","generated":false,"id":"Comment:101231709145842340","typename":"Comment"}],"__typename":"StackDecision","answers({\"first\":2})":{"type":"id","generated":true,"id":"$StackDecision:101031322404006635.answers({\"first\":2})","typename":"StackDecisionConnection"}},"$StackDecision:101031322404006635.permissions":{"edit":false,"delete":false,"__typename":"Permissions"},"$StackDecision:101031322404006635.link":{"url":"https://stackshare.io/sentry/how-sentry-receives-20-billion-events-per-month-while-preparing-to-handle-twice-that","title":"How Sentry Receives 20 Billion Events Per Month While Preparing to Handle Twice That - Sentry Tech Stack | StackShare","imageUrl":"","__typename":"Link"},"Comment:101231709145842340":{"id":"101231709145842340","content":"This is intriguing. Mind elaborating, why did you go with Rust vs, say, C or C++?\n\nThanks for sharing!","postedAt":"2018-09-21T05:18:50Z","upvoted":false,"flagged":false,"upvotesCount":5,"parentId":null,"user":{"type":"id","generated":false,"id":"User:101232093427658316","typename":"User"},"__typename":"Comment","replies":[]},"User:101232093427658316":{"id":"101232093427658316","path":"/forwidur","imageUrl":"https://img.stackshare.io/user/200315/default_19cc12d2d2567236f8eb5d5165afabf485345604.jpeg","displayName":"Max Grigorev","__typename":"User"},"$StackDecision:101031322404006635.answers({\"first\":2})":{"count":0,"pageInfo":{"type":"id","generated":true,"id":"$StackDecision:101031322404006635.answers({\"first\":2}).pageInfo","typename":"PageInfo"},"edges":[],"__typename":"StackDecisionConnection"},"$StackDecision:101031322404006635.answers({\"first\":2}).pageInfo":{"hasNextPage":false,"endCursor":null,"__typename":"PageInfo"},"$StackProfile:101231778564413057.stackDecisions({\"currentStackOnly\":true,\"first\":5}).edges.2":{"node":{"type":"id","generated":false,"id":"StackDecision:101031322404006635","typename":"StackDecision"},"__typename":"StackDecisionEdge"},"StackDecision:101031322403529618":{"id":"101031322403529618","publicId":"101031322403529618","htmlContent":"

When accepting events, we would be crazy to just expose the Python web process to the public Internet and say, “Alright, give me all you got!” Instead, we use two different proxying services that sit in front of our web machines:\n\n

1) NGINX, our product-aware proxy, handles many of the upper bounds that we have deemed reasonable. It is responsible for a variety of bounds, but its most popular one is protecting Sentry from exceedingly large event volumes. Ever so often, a user will run into a problem where they’ve deployed their code out into the abyss, and their event volume clocks in at a few zeroes higher than what they signed up for.\n\n

2) In front of NGINX, we use another proxying service called HAProxy, which acts as a delta of connections without any of that product awareness logic and has a lot higher throughput. All it does is accept connections and send them off to different NGINX servers, allowing us to gracefully add or remove NGINX servers as we see fit.\n\n

#WebServers #LoadBalancerReverseProxy","rawContent":"When accepting events, we would be crazy to just expose the Python web process to the public Internet and say, “Alright, give me all you got!” Instead, we use two different proxying services that sit in front of our web machines:\r\n\r\n1) NGINX, our product-aware proxy, handles many of the upper bounds that we have deemed reasonable. It is responsible for a variety of bounds, but its most popular one is protecting Sentry from exceedingly large event volumes. Ever so often, a user will run into a problem where they’ve deployed their code out into the abyss, and their event volume clocks in at a few zeroes higher than what they signed up for.\r\n\r\n2) In front of NGINX, we use another proxying service called @{HAProxy}|tool:1179|, which acts as a delta of connections without any of that product awareness logic and has a lot higher throughput. All it does is accept connections and send them off to different NGINX servers, allowing us to gracefully add or remove NGINX servers as we see fit.\r\n\r\n@{#WebServers}|topic:224| @{#LoadBalancerReverseProxy}|topic:239|","publishedAt":"2018-09-13T08:42:00Z","commentsCount":0,"private":false,"upvotesCount":18,"upvoted":false,"flagged":false,"bookmarked":false,"viewCount":49946,"draft":false,"createdAt":"2018-09-13T08:42:04Z","decisionType":null,"showAutoGeneratedTag":false,"permissions":{"type":"id","generated":true,"id":"$StackDecision:101031322403529618.permissions","typename":"Permissions"},"subjectTools":[],"fromTools":[],"toTools":[],"link":{"type":"id","generated":true,"id":"$StackDecision:101031322403529618.link","typename":"Link"},"company":{"type":"id","generated":false,"id":"Company:101231709547274597","typename":"Company"},"topics":[{"type":"id","generated":true,"id":"StackDecision:101031322403529618.topics.0","typename":"Topic"},{"type":"id","generated":true,"id":"StackDecision:101031322403529618.topics.1","typename":"Topic"}],"stack":null,"services":[{"type":"id","generated":false,"id":"Tool:101231773927221330","typename":"Tool"}],"user":{"type":"id","generated":false,"id":"User:101232126867692719","typename":"User"},"rootComments":[],"__typename":"StackDecision","answers({\"first\":2})":{"type":"id","generated":true,"id":"$StackDecision:101031322403529618.answers({\"first\":2})","typename":"StackDecisionConnection"}},"$StackDecision:101031322403529618.permissions":{"edit":false,"delete":false,"__typename":"Permissions"},"$StackDecision:101031322403529618.link":{"url":"https://stackshare.io/sentry/how-sentry-receives-20-billion-events-per-month-while-preparing-to-handle-twice-that","title":"How Sentry Receives 20 Billion Events Per Month While Preparing to Handle Twice That - Sentry Tech Stack | StackShare","imageUrl":"","__typename":"Link"},"StackDecision:101031322403529618.topics.0":{"name":"WebServers","__typename":"Topic"},"StackDecision:101031322403529618.topics.1":{"name":"LoadBalancerReverseProxy","__typename":"Topic"},"$StackDecision:101031322403529618.answers({\"first\":2})":{"count":0,"pageInfo":{"type":"id","generated":true,"id":"$StackDecision:101031322403529618.answers({\"first\":2}).pageInfo","typename":"PageInfo"},"edges":[],"__typename":"StackDecisionConnection"},"$StackDecision:101031322403529618.answers({\"first\":2}).pageInfo":{"hasNextPage":false,"endCursor":null,"__typename":"PageInfo"},"$StackProfile:101231778564413057.stackDecisions({\"currentStackOnly\":true,\"first\":5}).edges.3":{"node":{"type":"id","generated":false,"id":"StackDecision:101031322403529618","typename":"StackDecision"},"__typename":"StackDecisionEdge"}}

Sentry logo

Sentry

Modern cross-platform crash reporting built with love.

Stack Decisions