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

Observability and monitoring of serverless applications

Observability and monitoring of serverless applications

Serverless is fun and easy. But what about monitoring?
Is there a monitoring monster lurking around the corner?

I’ll admit, there are tons of options to tackle the monster. But what features does AWS offer? And more importantly, how can you best use them to make sure you aren’t called out of bed at night?

In this talk, I’ll speak from the heart and share my own experience from using serverless in production for more than a year.

- Should you structure your logs? Of course, but why?
- How do you set up distributed tracing with X-Ray?
- Provide visibility using CloudWatch metrics and dashboards
- Get insight in your log date using CloudWatch Logs Insights

Using the tools and best practices, you’ll tackle the monster no doubt. I’ll do you one better. There won’t be a monster, you’ll have a new best friend!

Nick Van Hoof

October 16, 2019
Tweet

More Decks by Nick Van Hoof

Other Decks in Programming

Transcript

  1. 2 § Nick Van Hoof § Cloud Developer § Ordina

    § https://ordina-jworks.github.io/ § https://nickvanhoof.com Whoami
  2. 4

  3. 5 Content Serverless: monitoring and observability § Serverless as the

    new normal? § Challenges - Solutions § Third party tools bit.ly/2MNbHIK ordina-jworks.github.io nickvanhoof.com
  4. 6 Content Serverless: monitoring and observability § Serverless as the

    new normal? § Challenges - Solutions § Third party tools
  5. 10 § Serverless enables the power of the cloud ØDevOps

    ØInfrastructure as code ØShort time to production ØBusiness Value Serverless
  6. 14 Content Serverless: monitoring and observability § Serverless as the

    new normal? § Challenges - Solutions § Third party tools
  7. 19 Serverless application - challenges Serverless: monitoring and observability §

    Challenge 1: Where did it go wrong? à Distributed system
  8. 21 Serverless application - challenges Serverless: monitoring and observability §

    Challenge 3: Is my system working as expected? Can it handle the load.
  9. 23 Serverless application - 3 challenges Serverless: monitoring and observability

    1. Finding the error in the distributed system 2. Tackling performance bottlenecks 3. Testing our remote system
  10. 24 Challenge 1: Finding the error in a distributed system

    Serverless: monitoring and observability § Where did it go wrong? à Distributed system
  11. 28 What do we need when a bomb goes off?

    Finding the error in a distributed system NOTIFICATION
  12. 32 We got notified. What do I do now? Finding

    the error in a distributed system Check the logs
  13. 34 Logging Serverless: monitoring and observability § logging tells a

    story § logging might tell many stories at once (concurrent invocations) § every part of the story is told in a different place (distributed)
  14. 36 Logging Serverless: monitoring and observability § Challenge: Getting information

    out of our logs § Solution: Query the logs for information § Challenge: logs coming from different places § Solution: Aggregate the logs § Solution: Correlate the logs
  15. 42 CloudWatch Logs Insights Serverless: monitoring and observability § “CloudWatch

    Logs Insights enables you to explore, analyze, and visualize your logs instantly, allowing you to troubleshoot operational problems with ease.”
  16. 44 AWS CloudWatch: Log Insights Serverless: monitoring and observability §

    Query language to analyze your logs § Picks up fields from our structured logs § Querying over multiple logGroups
  17. 45 Challenge 1: where did it go wrong? Finding the

    error in a distributed system § Notification § Logging - structured • aggregated • correlated • queryable
  18. 46 Serverless application - 3 challenges Serverless: monitoring and observability

    1. Finding the error in the distributed system 2. Tackling performance bottlenecks 3. Testing our remote system
  19. 48 Solution 2: distributed tracing to identify bottlenecks in the

    flow Tackling performance bottlenecks XRAY
  20. 49 Solution 2: distributed tracing with XRAY Tackling performance bottlenecks

    § Understand behavior § Analyze performance § Visualizes behavior
  21. 54 Challenge 2: Find performance bottlenecks Finding the error in

    a distributed system § Distributed tracing with XRAY § Visualize flow
  22. 55 Serverless application - 3 challenges Serverless: monitoring and observability

    1. Finding the error in the distributed system 2. Tackling performance bottlenecks 3. Testing our remote system
  23. 57 Smoke Test Serverless: monitoring and observability § Does my

    distributed system still work as expected?
  24. 59 Load Test Serverless: monitoring and observability § Is the

    application able to handle the load? bit.ly/2MNbHIK
  25. 60 Smoke Test Serverless: monitoring and observability § Does my

    distributed system still work as expected?
  26. 62 Challenge 3: Testing the remote system Finding the error

    in a distributed system § Smoke tests § Performance tests / load tests § Visualize the results
  27. 63 Serverless application - 3 challenges Serverless: monitoring and observability

    1. Finding the error in the distributed system o structuring logs o aggregating logs o correlating log 2. Tackling performance bottlenecks o distributed tracing with AWS Xray 3. Testing our remote system o smoke testing o load testing o visualizing test result
  28. 64 Content Serverless: monitoring and observability § Serverless as the

    new normal? § Challenges - Solutions § Third party tools
  29. 65 Third Party Tools Serverless: monitoring and observability § Lumigo

    - Monitoring and troubleshooting for serverless application
  30. 66 Third Party Tools Serverless: monitoring and observability § Lumigo

    - Monitoring and troubleshooting for serverless application
  31. 70 Third Party Tools Serverless: monitoring and observability § Lumigo

    - lumigo-cli: npmjs.com/package/lumigo-cli - Best practices blog: lumigo.io/blog/
  32. 75