Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Troubleshooting Spring Boot Applications with S...

Troubleshooting Spring Boot Applications with Sentry

No matter how clean our code is, how good our tests are, how well our infrastructure scales - one day, eventually something will go wrong in production. Bugs and outages cases customer to lose trust and cost real money. Our job is to identify and fix the issue as quickly as possible. In this session, we will have a look at Sentry - an open source troubleshooting and application monitoring solution - and its seamless integration with Spring Boot. We will learn the benefits of treating errors as contextual events and how exception reporting and performance monitoring in a single tool simplify addressing production issues.

Talk given at JavaCRO 2021 https://2021.javacro.hr/eng/Program/Troubleshooting-Spring-Boot-applications-with-Sentry

Code: https://github.com/maciejwalkowiak/troubleshooting-spring-boot-appplications-with-sentry

Maciej Walkowiak

October 11, 2021
Tweet

More Decks by Maciej Walkowiak

Other Decks in Programming

Transcript

  1. @maciejwalkowiak MAKING SOFTWARE IN 2021 LIKE A PRO •Agile •Unit

    & Integration Tests •Frequent Releases •Cloud •Deployment Automation
  2. @maciejwalkowiak DEVELOPER LIFE IN 2007 •Agile Waterfall •Unit & Integration

    Tests Manual Testing •Frequent Releases Release every few months •Cloud Server Room behind the wall •Deployment Automation Sending ZIP file to release manager
  3. MACIEJWALKOWIAK try { return paymentService.executePayment(userId, payment); } catch (Exception e)

    { LOGGER.error("Executing payment failed for user: {}, payment: {}", e); throw new RuntimeException(e); }
  4. MACIEJWALKOWIAK try { LOGGER.info("Executing payment for user: {}", userId); PaymentResult

    result = paymentService.executePayment(userId, payment); LOGGER.info("Payment result: {}", result); return result; } catch (Exception e) { LOGGER.error("Executing payment failed for user: {}, payment: {}", e); throw new RuntimeException(e); }
  5. @maciejwalkowiak hey I just met you and this is crazy

    but can this error log be a bug report maybe?
  6. @maciejwalkowiak SENTRY & SPRING BOOT INTEGRATIONS •Spring MVC •Spring WebFlux

    (error reporting) •Retrieving user information from Spring Security •RestTemplate •WebClient •Logback •declarative tracing with @SentrySpan & @SentryTransaction