Work on bugs. True story of moving to Sentry on the scale of a large grocery company. Grigory Koshelev

Errors are an interesting thing, because even the title of the report itself has a double bottom. This is work on the mistakes that we make in our software, programs, services. And also working on errors is creating a pipeline to handle all this, so that everything will be fine in the end.







Sentry is a tool for monitoring exceptions, errors in your applications.













โ€“ , Sentry. . : , .















2019-2020-.







, pipeline .













60 000 3 , 150 000 , 6 .













pipeline . , , , - . - Elastic. . . , .







, Elastic. . . , . Hercules. open source, GitHub .







โ€“ , Hercules .













Pipeline . Elastic Adapter , Elastic.







, Kafka. Kafka โ€“ , . daemon, Kafka Elastic.







, Elastic . Kibana, ??? ??? ( ).







pipeline . ?













pipeline , . daemons, , . . , , , . 15 .













? ?







โ€“ , , - , , , . .







Elastic, . Kibana , - Web, , Elastic, , . . .













?







  • -, , , Exception - stacktrace.
  • , exc_stacktrace_hash, .
  • Web , . . , . , - , . , .








hash, .













. , โ€“ Web, . . serverless-, . , .













pipeline , ?







, , Elastic Adapter. .













- , . . . .







.







, , . . , .







email. .













, โ€“ Web, .













?







  • -, . . , , . - .
  • -, , , .


? , , , Web. , . - , - .







. ? staging-, , - . , . staging-, , . , .













. .













, post mortem, - . . , . โ€“ 2 . โ€“ . , โ€“ 1 300 . , , . , . - , . , . , , - . , , :













2 . , . 24 . . . , .







, - , . . .













. . - . โ€“ . 2 . . 8 000 . , . , . - , . , . -, , , - . - . , , , - . . . . . , . . . , - .













https://habr.com/ru/company/ru_mts/blog/308044/







? . , .







Habr. ? . .







, . . , , . , , . ?













, . , . , 12 .







, , , open space. . . , , .







.













, , , , , 10-15 % . , , , . . .







, . staging, . , .













, post mortem โ€“ . , .







Sentry



, . . , - . , , Sentry, .













, Sentry, - . , Sentry โ€“ , . , . , , โ€“ , Sentry cloudโ€™ Sentry. ? .







, , , . , Sentry. . , , . , . Sentry .







, - , , , , .













.







. , . pipeline Sentry , .







, . 13.51







, - , . . . - , , - . .







, - . , , -. Sentry, - . , - . - stacktrace. , Sentry . , . . .







, . . , . , . . , .







, . , , . , . 5 .













Sentry. , pipeline . , Sentry SDK.







, exception Sentry. . โ€“ , Sentry- fire-and-forget. ? , Sentry. , . - - - , , .







, , , , Sentry . .







โ€“ vendor lock. Sentry SDK, , , Sentry . - , , . - โ€“ .







? - โ€“ . , . . . . .







, , . , . , .







SDK, Sentry. , , Sentry. .













, , . . pipeline, Elastic.







Sentry.













, , , . ? . .







โ€“ . , . , Sentry, , .







, 3 , . :







  • Stacktrace,
  • Exception, . . exception, ,
  • Message, . . message, .


stacktrace - , . . 2 stacktraces , , , . .







, message. , messages ; messages , , .













. message, . ? - . โ€“ . - , . - . , . .













? , , , .







fingerprint. , , - , , .







? - hash, , .







, , , - . fingerprint . .













, , , .







, . . , , .







, , 500 โ€“ , - .













, , ยซ-ยป, , , . , Sentry .







1 000 Sentry, , , . . , Sentry , , , - .







: , ,



, .













pipeline? - ERROR FATAL.







, , , , .













โ€“ , - , , . . . , , . , . , .







. โ€“ + retry.













https://github.com/vostok/clusterclient.core/issues/7







? , . , . - URL. URL . - . - - . . , . . .







, , retry . . , Sentry . . , .













. , , .







. , , . 403 .







, . โ€“ . ?













โ€“ ยซยป . ยซยป. , . , , token . error.













. , - - . . - .







, ? , - . , , , .













? , . . - . , - , - error.













. , error.







, , . API-, . backend. backend , , storage service.













storage- . , .













, , , . .













3 , , , , .













.







()



, .













โ€“ ยซยป . , , , retry, . . , - . , , ?







โ€“ . โ€“ . , , , . . .







, , , . , . . , . , , - ? .













? , , . .







. USE- RED-. , , , . - ( ) , , , , - .







, โ€“ . , , . , .













โ€“ .







. , .







- , . .







?









. ?













, , ERROR WARNING , . , . , . . โ€“ .







. . , WARNING, . , . , , , , .













. . . , , , , . , , , . - , - , . โ€“ . . . . , . , . , . . , . , , , . . . . , , .









? , .







:



, . , , . . , ?







, - error, , , , . , - . .













, , errors - . . error. , . , - . - . - . - -. - . . 450 . , , , . . ERROR WARNING, .







, . , . , , , . , , , . , : ยซ ? ?ยป.













. , , , , , . . , , - , , .







, , , , . , - , .







, . . . , , . , , . , , . : ยซ, ยป. : ยซ ยป. .







, . , , , .







. , - , , - , , , , - .







, , - . , error budget. , .







.









?













, . Sentry, , . , , , .







, , .







, . 100 000 . , events . 300 . , , , , , 10. . .







. happy end. , :







  • , .







  • - . , - -.







  • , .









, legacy, 10 โ€“ ! , - . .









, ?













150 000 . pipeline Sentry โ€“ 100 000. , : INFO, WARNING, ERROR. . Sentry events ERROR FATAL 75 .













, , . team plan. Sentry โ€“ 26 . 50 000 . , . .







, 6 000 000 . + 820 . , . , .













. 75 . ? , , , , 200 000 000.







, , โ€“ 6 000 000. , , , . , .









. 75 โ€“ . .













, . , - , .







, - 3 300 000 . pipeline, , Sentry .







, - , .









. , , , , .









. . , , , .













, 10 . , 10 . , . , . , - - . , .







โ€“ , . 3 . , , . 3 , .







, . .







โ€“ , . - , , . Sentry. , , - , โ€“ - . .







, , . , -. .







? , .













Sentry . 4 , .







:







  • Slack,
  • ,
  • Telegram,
  • Pushover.


, .







, Slack Pushover. Slack - , Pushover , , .













: ยซ , , ?ยป. , , events, Sentry. ? -, . - , . , , , . - , graceful degradation , ?







, , . - staging, , , . , - Slack, , - - .







. , . : ยซ ?ยป. Sentry -, , .







Sentry , , . , , , - SLA .







, , . , , , . .







2019 2020



, , , , . . .













2019- : Moira .







Moira โ€“ . , , Telegram Slack. , Grafana. , . Kibana.







, , Kibana, - .







2020- ? Moira . - .







Sentry. , . . , , Sentry.







, , , .







2



โ€“ , Sentry โ€“ Sentry.













, . .







2019- , Sentry, 26 , post mortem.







, 3 post mortem, - , , .







3 , . . , Moira . , . .







1 . โ€“ , Kibana - . , .







, , . ? โ€“ , . โ€“ , . , , . , . .







, , Sentry. , , , Sentry. 9 19, , Sentry. , .













, . , . . , , . , .







19 . , . , .







5 . - , , . , .







6 . .







5 .







3 , . . Sentry.







. , .







, , . , Sentry , 10-15 % .







, Sentry, , .







, Sentry.







โ€“ 2 5. 6, , Sentry. , , Sentry. , , . . . . . , .









. . 2 - . ?













, , , , , . , , . , .







โ€“ , , , . . โ€“ , , . , , -, - -. .







, . . . , . . soft skills . , , - , , .







post mortems, . . , , . .













, Sentry , , โ€“ , Sentry. . . , .







Sentry. , Sentry. Hercules , .







Sentry. . . , .













. ! .







Q/A



: , , . , . ?







: , , . . . . โ€“ . .







: 247 , ? ?







: , , . , . . . , . , . , , . Pushover . . , .







: , - ?







: , . , Sentry. Sentry, , . . Sentry . , , . , , . , . , , , , , , 10 . , .







: , , error , ? . . 2 , error?







: . , . , , , . , , . , -, .







: , production , , , -. , , . ? - ?ยป.







: . . - , - , - , - . , events - . , user ID, . , - , , , Slack-, - .







: , - , Sentry . ? - upstream-? , . . , . Sentry ?







: . Sentry . . ? Chrome, Sentry html, , . Sentry. , Chrome, . , , , , . . , - .







: ? ?







: , , . , โ€” Hercules. , . , , -, . span, , . , - , community, . . , , , Elastic. . , . . , .







: , , . ยซPushoverยป, ?







: Pushover . , . Pushover. . .







() , PagerDuty android, , , . ยซ ยป, . iOS . , , , . , , - .







: , , ?







: , , , , , . , 80, . , . . , . . , , . , Pushover , .







: , ? , ?







: -. primary-, backup-. . - , : ยซ, . , ยป. , . , . , . - โ€“ , , - .







: ? ?







: . , , . , . , - . . , . , . , .







() , , : 8 , 8 , 8 . โ€“ . , . . .







: , . ? . . ? ?







: , . , , . . ? , , - . .







? . . . . , error . - , error. error budget. . . , . , . , , , .







: . . . -, . - retry. , . , -, - tracking error budget. ? Hercules - Sentry ?







: , - โ€“ Sentry. , rules . , . . , , . , rule . . .







: . , , error, warning, info debug ?







: , , Sentry. , . , , . , , error, Sentry . , warning , Sentry . . .







: , Sentry, . - stacktrace, ?







: . -, 64 , Sentry. , . . , Sentry .







() stacktrace. . emp, . . , stack. , . , stack overflow error, stack. . .







: , , . , , log -. . , , , . , , , , , connection . . ? ?







: , , , . - , .







: , , . - - , , . . AssertionError โ€“ ?







: - , , . , , , โ€“ , โ€” . , , , , , , .







() , , . : ยซ, , : ยซ ?ยปยป. , - , , , . , , 4 . .







() , , .







: . . , , - , , , ?







: . -, , - , . . . , - , , , . . , . . , - , . . . , .







, , , - . . , , . ? - .







() -, . .







: Sentry, . , , - . , , , CPU. - - ?







: , Moira. . - - , . . Graphite. Moira . Sentry โ€“ , . . Sentry . , . - . , - , - , .







. , . , . . , . . , 19- , 20- . . . endpoint . . -. .







, . ? -, stracktraces . , . Stracktaces โ€“ - . . stractraces . . , . - -. . . , : ยซ, , , . , ยป. - Internet Explorer.







- Sentry








All Articles