├── .gitignore ├── 01-deploy Wild Rydes demo.md ├── 02-serverless observability.md ├── 03-troubleshooting with Lumigo.md ├── 04-debugging performance issues.md ├── 05-alerting.md ├── 06-next steps.md ├── README.md └── images ├── mod01-000.png ├── mod01-001.png ├── mod01-002.png ├── mod01-003.png ├── mod01-004.png ├── mod01-005.png ├── mod01-006.png ├── mod01-007.png ├── mod01-008.png ├── mod02-lumigo-about-you.png ├── mod02-lumigo-architecture.png ├── mod02-lumigo-auto-instrumentation.png ├── mod02-lumigo-auto-trace.png ├── mod02-lumigo-connect-aws.png ├── mod02-lumigo-function-details-2.png ├── mod02-lumigo-function-details.png ├── mod02-lumigo-functions.png ├── mod02-lumigo-operation-dynamodb.png ├── mod02-lumigo-operation-function.png ├── mod02-lumigo-operation-sns.png ├── mod02-lumigo-timeline.png ├── mod02-lumigo-trace-details.png ├── mod02-lumigo-traces.png ├── mod03-lumigo-calcSalaries-timeout-transaction.png ├── mod03-lumigo-calcSalaries-timeouts.png ├── mod03-lumigo-issues-and-alerts.png ├── mod03-lumigo-requestUnicorn-timeout-transaction-log.png ├── mod03-lumigo-requestUnicorn-timeout-transaction-timeline.png ├── mod03-lumigo-requestUnicorn-timeout-transaction.png ├── mod03-lumigo-requestUnicorn-timeouts.png ├── mod03-lumigo-show-similar-transactions-successful.png ├── mod03-lumigo-show-similar-transactions.png ├── mod03-lumigo-uploadReceipt-error.png ├── mod03-lumigo-uploadReceipt-errors.png ├── mod03-lumigo-uploadReceipt-invocation-successful.png ├── mod03-lumigo-uploadReceipt-successful.png ├── mod03-lumigo-uploadReceipt-transaction-invocation.png ├── mod03-lumigo-uploadReceipt-transaction.png ├── mod03-lumigo-uploadReceipt.png ├── mod04-lumigo-cli-analyze-cold-starts.png ├── mod04-lumigo-cold-start-metrics.png ├── mod04-lumigo-dashboard-cold-starts.png ├── mod04-lumigo-p99-transaction.png ├── mod04-lumigo-p99.png ├── mod04-lumigo-service-latency.png ├── mod04-lumigo-slow-dependency.png ├── mod04-lumigo-slow-request.png ├── mod04-lumigo-slow-transaction-timeline.png ├── mod04-lumigo-slow-transactions.png ├── mod04-lumigo-transaction-cold-starts.png ├── mod05-lumigo-alert-frequency.png ├── mod05-lumigo-default-alert-functions.png ├── mod05-lumigo-default-alerts.png ├── mod05-lumigo-email-alert.png ├── mod05-lumigo-integrations.png ├── mod05-lumigo-new-alert-functions.png ├── mod05-lumigo-new-alert-here.png ├── mod05-lumigo-new-alert.png ├── mod06-heitor.png ├── mod06-lumigo-account-settings.png ├── mod06-lumigo-lumigo500.png ├── mod06-lumigo-pricing.png ├── mod06-lumigo-projects.png ├── mod06-lumigo-users.png └── mod06-lumigo-yan500.png /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /01-deploy Wild Rydes demo.md: -------------------------------------------------------------------------------- 1 | # Module 1 - deploying the Wild Rydes demo app 2 | 3 | In this step of the workshop you will create and deploy the *Wild Rydes* demo app. The demo app lets you order rides from... unicorns! 4 | 5 | ![](./images/mod01-000.png) 6 | 7 | The architecture for the demo app looks like this: 8 | 9 | ![architecture diagram](./images/mod01-001.png) 10 | 11 | There's a user-facing API Gateway, and a single `POST /ride` endpoint (backed by the `requestUnicorn` Lambda function) to order a ride. 12 | 13 | This `requestUnicorn` function would: 14 | 15 | 1. find available unicorns in the area, using an external API (`Unicorn Stable API`). 16 | 17 | 2. validate that the unicorn it found from step 1. is not occupied already by checking in the `OccupiedUnicorns` DynamoDB table. 18 | 19 | 3. publish details of the ride to the `UnicornDispatched` SNS topic. 20 | 21 | These kick off a series of background processing tasks through both SNS and DynamoDB Streams. 22 | 23 | We will use this demo app to demonstrate various problems you can run into in a production environment and how you can go about debugging them. 24 | 25 |
26 | Clone the demo app repo

27 | 28 | As a first step, we'll deploy the demo app to your AWS account and then see how we can debug different problems with Lumigo. 29 | 30 | **RECOMMENDATION**: you shouldn't deploy this to your production AWS account. Use your personal account, or a playground account. 31 | 32 | 1. First, clone this repo locally: 33 | 34 | `https://github.com/lumigo-io/troubleshooting-serverless-workshop-demo` 35 | 36 | 2. In the project folder, run `npm ci` to restore all project dependencies. 37 | 38 | 3. Open `serverless.yml`, and on line 10, replace `` with your name. 39 | 40 | 4. In the project folder, run `npm run deploy-all`. This will deploy both the Serverless backend as well as the Wild Rydes frontend application. 41 | 42 | The deployment process will take a couple of minutes, so let's talk about what's going on here. 43 | 44 | This project is using the [Serverless framework](https://www.serverless.com/open-source/) to package and deploy both the frontend and backend. 45 | 46 | 47 | 48 | 5. At the end of the deployment you should see messages like this: 49 | 50 | ``` 51 | Serverless: This deployment will: 52 | Serverless: - Upload all files from 'client/dist' to bucket 'lumigo-workshop-yancui-dev-frontend' 53 | Serverless: - Set (and overwrite) bucket 'lumigo-workshop-yancui-dev-frontend' configuration 54 | Serverless: - Set (and overwrite) bucket 'lumigo-workshop-yancui-dev-frontend' bucket policy 55 | Serverless: - Set (and overwrite) bucket 'lumigo-workshop-yancui-dev-frontend' CORS policy 56 | Serverless: Looking for bucket... 57 | Serverless: Bucket found... 58 | Serverless: Deleting all objects from bucket... 59 | Serverless: Configuring bucket... 60 | Serverless: Configuring policy for bucket... 61 | Serverless: Retaining existing tags... 62 | Serverless: Configuring CORS for bucket... 63 | Serverless: Uploading client files to bucket... 64 | Serverless: Success! Your site should be available at http://lumigo-workshop-yancui-dev-frontend.s3-website-us-east-1.amazonaws.com/ 65 | ``` 66 | 67 | The URL at the end is where the frontend is hosted, go to it. 68 | 69 | ![](./images/mod01-002.png) 70 | 71 | That's it, you've successfully deployed the Wild Rydes demo app! 72 | 73 |

74 | 75 |
76 | Register and sign in

77 | 78 | Unfortunately, there's no "Registration" button anywhere on the page, so you need to add `/register.html` to the end of the URL to open the registration page. 79 | 80 | ![](./images/mod01-003.png) 81 | 82 | 1. Register a new account. 83 | 84 | 2. Get the verification code from your registered email. 85 | 86 | ![](./images/mod01-004.png) 87 | 88 | After you enter the verification code, you should be taken back to the sign-in page. 89 | 90 | 3. Sign in. 91 | 92 | ![](./images/mod01-005.png) 93 | 94 | 4. Wait a moment for the map to load, then click anywhere on the map to put down a marker. This is where you'll hail for a ryde. 95 | 96 | ![](./images/mod01-006.png) 97 | 98 | 5. Click `Request Unicorn`. If the request was successful, then you'll a see unicorn appear and arrive at your marker. 99 | 100 | Do this several times, and you might see `Unicorn not available` because all the unicorns are busy. 101 | 102 | ![](./images/mod01-007.png) 103 | 104 | And from time to time, nothing happens after you click `Request Unicorn` and then you get an error popup like this: 105 | 106 | ![](./images/mod01-008.png) 107 | 108 | So, looks like there are a few problems in this app, let's find them! 109 | 110 |

-------------------------------------------------------------------------------- /02-serverless observability.md: -------------------------------------------------------------------------------- 1 | # Module 2 - serverless observability 2 | 3 | In this module, you will integrate [Lumigo](https://lumigo.io) with the demo application. 4 | 5 |
6 | Integrate Lumigo into the app

7 | 8 | To get started with Lumigo, take the following steps. A more detailed guide can be found at [the Lumigo documentation](https://docs.lumigo.io/docs/create-an-account). 9 | 10 | 1. Head over to https://platform.lumigo.io/signup and sign up for an account 11 | 12 | 2. Once you created your account, Lumigo will guide you through the integration. First, fill in some details. 13 | 14 | ![Lumigo about you](./images/mod02-lumigo-about-you.png) 15 | 16 | 3. Next, we will link Lumigo to our AWS account. To do so all that is required is to deploy its CloudFormation stack to your account. A more detailed walkthrough of this step can be found [here](https://docs.lumigo.io/docs/connect-your-environment) 17 | 18 | ![Lumigo connect AWS](./images/mod02-lumigo-connect-aws.png) 19 | 20 | 4. You should land at the instrumentation step, which will let us choose functions to trace: 21 | 22 | ![Lumigo auto instrumentation](./images/mod02-lumigo-auto-instrumentation.png) 23 | 24 | You can also do this after the initial setup too. Just head over to the [Functions](https://platform.lumigo.io/functions) page at any time, and you can auto-trace any function there: 25 | 26 | ![Lumigo auto trace](./images/mod02-lumigo-auto-trace.png) 27 | 28 | Once you added tracing to the relevant Lambda functions, Lumigo will automatically start monitoring your application. 29 | 30 | 5. Order some unicorn rides, and let's see what's going on in Lumigo! 31 | 32 |

33 | 34 |
35 | Viewing your application in Lumigo

36 | 37 | Lumigo will trace the invocations of your application. The first thing we will use it for is to get an understanding of how our application looks in real life. 38 | 39 | 1. Click on the [System map](https://platform.lumigo.io/system-map) to have an overview of your application's architecture: 40 | 41 | ![Wild Rydes architecture](images/mod02-lumigo-architecture.png) 42 | 43 | Notice how this is identical to the architecture diagram we drew by hand, except it's drawn from the actual invocations that Lumigo has traced, so it's **always up-to-date** and based on actual data. 44 | 45 | 2. Explore the different functions' stats and invocations in your account using the [Functions](https://platform.lumigo.io/functions) page: 46 | 47 | ![Wild Rydes functions](images/mod02-lumigo-functions.png) 48 | 49 | 3. Click into any of the functions to get more details on it: 50 | 51 | ![Lumigo function](images/mod02-lumigo-function-details.png) 52 | 53 | Clicking on the `Metrics` tab would show you some additional metrics like the number of cold starts as well as cold start durations. 54 | 55 | ![Lumigo function](images/mod02-lumigo-function-details-2.png) 56 | 57 | 4. Also, don't forget to check out the [Transactions](https://platform.lumigo.io/transactions) page to see the recent transactions that Lumigo has traced: 58 | 59 | ![Lumigo traces](images/mod02-lumigo-traces.png) 60 | 61 | 5. In this page, if you click on one of the transactions then you can see what happened on that transaction alongside the logs for all the participating functions. Click on one of the transactions that started with the `requestUnicorn` function and you should see something like this: 62 | 63 | ![Lumigo trace details](images/mod02-lumigo-trace-details.png) 64 | 65 | 6. If you click on any of the icons in the graph, you can see even more information about that resource, including any request and response to and fro the resource. For example, if you click on the `requestUnicorn` function, you should see its return value, invocation event, environment variables and its logs: 66 | 67 | ![Lumigo operation](images/mod02-lumigo-operation-function.png) 68 | 69 | Similarly, if you click on the `unicornDispatched` SNS topic, you will see the `sns.Publish` request that `requestUnicorn` function made to it. Notice that sensitive data like API keys and auth tokens are scrubbed and were never sent to Lumigo's backend in the first place. 70 | 71 | ![Lumigo operation](images/mod02-lumigo-operation-sns.png) 72 | 73 | Where a resource was accessed multiple times during a transaction, you can also iterate through all the individual requests too. For example, the `requestUnicorn` function did a `dynamodb.Get` and then `dynamodb.Put` against the `OccupiedUnicorns` table: 74 | 75 | ![Lumigo operation](images/mod02-lumigo-operation-dynamodb.png) 76 | 77 | Having all these information at your fingertips makes it easy for you to understand what **actually happened** during this transaction without spraying your code with manual instrumentation code! 78 | 79 | 7. One final thing, click on `Timeline` shows you where the time was spent on this transaction to help you identify culprits when performance issues arise. 80 | 81 | ![Lumigo timeline](images/mod02-lumigo-timeline.png) 82 | 83 | Now that you know your way around Lumigo, let's use it to troubleshoot the issues we are seeing in the demo app. 84 | 85 |

-------------------------------------------------------------------------------- /03-troubleshooting with Lumigo.md: -------------------------------------------------------------------------------- 1 | # Module 3 - troubleshooting with Lumigo 2 | 3 | In this module, we'll use Lumigo to troubleshoot the issues in the demo app. 4 | 5 | If you go to the [Issues & Alerts](https://platform.lumigo.io/issues) page and you will see at a glance all the issues that Lumigo has identified in your environment. 6 | 7 | ![Lumigo issues](images/mod03-lumigo-issues-and-alerts.png) 8 | 9 |
10 | Troubleshoot timeouts (requestUnicorn)

11 | 12 | 1. If you click on the `Timeout` issue for the `requestUnicorn` function, it will take you to the function details page for the function and show you the invocations that timed out. 13 | 14 | ![requestUnicorn timeouts](images/mod03-lumigo-requestUnicorn-timeouts.png) 15 | 16 | 2. Click on one of the timed out transactions to see what happened in that transaction. 17 | 18 | ![requestUnicorn timed out](images/mod03-lumigo-requestUnicorn-timeout-transaction.png) 19 | 20 | 3. From the function logs, you can see a message like `2020-10-20T11:40:37.402Z 3ea3b770-2986-4926-a0b3-2c6a045bfa20 INFO Finding unicorn for 42.34963749150315 , -71.05718295574066` 21 | 22 | and then 6 seconds later, the invocation timed out. 23 | 24 | ![requestUnicorn timed out](images/mod03-lumigo-requestUnicorn-timeout-transaction-log.png) 25 | 26 | 4. Click on the `Timeline` tab and you will see that the request to `4fsay0n12a.execute-api.us-east-1.amazonaws.com` never completed, hence the `N/A`. So this was the cause for the invocation timing out. 27 | 28 | ![requestUnicorn timed out](images/mod03-lumigo-requestUnicorn-timeout-transaction-timeline.png) 29 | 30 |

31 | 32 |
33 | Troubleshoot timeouts (calcSalaries)

34 | 35 | 1. Go to back the [Issues & Alerts](https://platform.lumigo.io/issues) page and you'll see that the `calcSalaries` function has also timed out a few times. As before, click on the `Timeout` issue for `calcSalaries` and see the timed out invocations. 36 | 37 | ![calcSalaries timeouts](images/mod03-lumigo-calcSalaries-timeouts.png) 38 | 39 | 2. Click on one of the timed out transactions to see what happened. 40 | 41 | ![calcSalaries timed out](images/mod03-lumigo-calcSalaries-timeout-transaction.png) 42 | 43 | 3. Unfortunately, there's nothing in the logs to indicate what happened. But let's click on `Timeline` tab to see what happened. 44 | 45 | ![requestUnicorn timed out](images/mod03-lumigo-requestUnicorn-timeout-transaction-timeline.png) 46 | 47 |

48 | 49 |
50 | Troubleshoot business logic errors (uploadReceipt)

51 | 52 | 1. Go to back the [Issues & Alerts](https://platform.lumigo.io/issues) page and you'll see that the `uploadReceipt` function has thrown a few `TypeError`. 53 | 54 | ![uploadReceipt errors](images/mod03-lumigo-uploadReceipt.png) 55 | 56 | As before, click on the row to see the invocations. 57 | 58 | 2. Click on one of the transactions to see what happened. 59 | 60 | ![uploadReceipt TypeError](images/mod03-lumigo-uploadReceipt-errors.png) 61 | 62 | 3. In this transactions view, you can see that whole transaction starting from the original request to find a unicorn. You can see the `uploadReceipt` function being highlighted as where the problem is. Since SNS is an async event source for Lambda, these failed invocations are retried automatically. From the overlapped Lambda icon (and the fact that it says `3 retries`), you can tell that this invocation was indeed retried, but still failed. 63 | 64 | ![uploadReceipt TypeError](images/mod03-lumigo-uploadReceipt-transaction.png) 65 | 66 | 4. Click on the `uploadReceipt` function's icon to see more details about these invocations. 67 | 68 | ![uploadReceipt TypeError](images/mod03-lumigo-uploadReceipt-transaction-invocation.png) 69 | 70 | Well, we see the error `Cannot read property 'Name' of undefined` and probably have some suspicion as to what it might be - maybe the SNS message is missing properties. 71 | 72 | To find evidence to support our hypothesis, let's look for a successful invocation and compare that with this. 73 | 74 | 5. Click `Show Similar Transactions` on the top right. 75 | 76 | ![show similar transactions](images/mod03-lumigo-show-similar-transactions.png) 77 | 78 | As you can see, a lot of the transactions had a `TypeError`, we're looking for a successful transaction without any issues. 79 | 80 | ![similar transactions](images/mod03-lumigo-show-similar-transactions-successful.png) 81 | 82 | 6. Click on one of the successful transaction. 83 | 84 | ![successful transaction](images/mod03-lumigo-uploadReceipt-successful.png) 85 | 86 | 7. Click on the `uploadReceipt` function to bring up its details. One thing that jumps out is that the SNS message contains an object in `RideDetail` which has a `Name` property. 87 | 88 | ![uploadReceipt function](images/mod03-lumigo-uploadReceipt-invocation-successful.png) 89 | 90 | contrast that with the failed invocation, which complained about being to read `Name` of `undefined`: 91 | 92 | ![uploadReceipt TypeError](images/mod03-lumigo-uploadReceipt-transaction-invocation.png) 93 | 94 | So there's the problem. Looking at the code for `uploadReceipt` confirms this: 95 | 96 | ![uploadReceipt](images/mod03-lumigo-uploadReceipt-error.png) 97 | 98 |

-------------------------------------------------------------------------------- /04-debugging performance issues.md: -------------------------------------------------------------------------------- 1 | # Module 4 - debugging performance issues 2 | 3 | In this module, we'll see how you can identify slow dependencies and debug slow Lambda invocations. 4 | 5 | 1. Go to the [Dashboard page](https://platform.lumigo.io/dashboard), and have a look at the `Service Latency` widget at the bottom right. This shows you the tail latency for serivces that you are calling from your Lambda functions. 6 | 7 | ![service latency](images/mod04-lumigo-service-latency.png) 8 | 9 | 2. By default, this widget is sorted by the `p95 (ms)` column. Somewhere amongst the top, you might see `4fsay0n12a.execute-api.us-east-1.amazonaws.com` up there, by either `p95 (ms)` or `p99 (ms)`. 10 | 11 | ![slow dependency](images/mod04-lumigo-slow-dependency.png) 12 | 13 | 3. Click on the p99 latency value (4337 in my case) 14 | 15 | ![click on the p99 value](images/mod04-lumigo-p99.png) 16 | 17 | This takes you to the [Explore page](https://platform.lumigo.io/search) with a prefilled query that finds the transactions where this service was involved and recorded a latency that's equal to or greater than the latency value you clicked on. 18 | 19 | ![find slow transactions](images/mod04-lumigo-p99-transaction.png) 20 | 21 | 4. Click on one of these transaction to see what happened. 22 | 23 | ![slow transaction](images/mod04-lumigo-slow-transactions.png) 24 | 25 | In this transaction, you can see that we made 3 calls to `4fsay0n12a.execute-api.us-east-1.amazonaws.com`. 26 | 27 | 5. Click on the `Timeline` tab and you will see that one of the requests to `4fsay0n12a.execute-api.us-east-1.amazonaws.com` took 4345ms. 28 | 29 | ![transaction timeline](images/mod04-lumigo-slow-transaction-timeline.png) 30 | 31 | 6. Click on the slow HTTP request, and see that the response was for `Rocinante`. 32 | 33 | ![slow request](images/mod04-lumigo-slow-request.png) 34 | 35 | 7. Go back to the [Explore page](https://platform.lumigo.io/search) and find other transactions where `4fsay0n12a.execute-api.us-east-1.amazonaws.com` had been slow. See if you can spot any commonalities to these slow requests. 36 | 37 | ## What about cold starts? 38 | 39 | Ah, yes, the dreaded Lambda cold starts! So often the cause of many performance concerns, especially for user-facing API functions. 40 | 41 | If you go to the [Functions page](https://platform.lumigo.io/functions) and navigate to any of your function, you can see information about that function's cold starts in the `Metrics` tab. 42 | 43 | ![cold start metrics](images/mod04-lumigo-cold-start-metrics.png) 44 | 45 | When you have lots of functions, it's not feasible to go through each functions individually. In the [Dashboard](https://platform.lumigo.io/dashboard) you can use the `Functions with most Cold Starts` widget to quickly identify problematic functions. 46 | 47 | ![functions with most coldstarts](images/mod04-lumigo-dashboard-cold-starts.png) 48 | 49 | User-facing functions, such as those behind API Gateway, are often latency sensitive. In some cases, you may wish to use [Provisioned Concurrency](https://lumigo.io/blog/provisioned-concurrency-the-end-of-cold-starts/) to eliminate cold starts altogether. For instance, when you have really strict latency requirements, or if you're using JVM/.Net Core runtimes and cannot optimize your code any further to keep cold start duration under an acceptable latency range. 50 | 51 | In some really unfortunate cases, cold starts can also stack up when one API function calls another (via API Gateway) and can cause further delays. You can easily spot these cases in the [Transactions page](https://platform.lumigo.io/transactions), by looking at the `Cold Starts` column. 52 | 53 | ![stacked cold starts](images/mod04-lumigo-transaction-cold-starts.png) 54 | 55 | If this happens frequently, then it might also be a good reason to use Provisioned Concurrency. Maybe one cold start of a few hundred milliseconds is acceptable, but when a few of them stack up on a single transaction, that can result in noticeable delays to users. 56 | 57 | Finally, you can alos use the [lumigo-cli](https://www.npmjs.com/package/lumigo-cli), our open source CLI tool, and run the [analyze-lambda-cold-starts command](https://www.npmjs.com/package/lumigo-cli#lumigo-cli-analyze-lambda-cold-starts) to analyze the cold start performance for all your functions in an AWS account. 58 | 59 | ![analyze-lambda-cold-starts](images/mod04-lumigo-cli-analyze-cold-starts.png) 60 | -------------------------------------------------------------------------------- /05-alerting.md: -------------------------------------------------------------------------------- 1 | # Module 5 - alerting 2 | 3 | In this module, we'll set up alerts in Lumigo. 4 | 5 | 1. Go to the [Alerts](https://platform.lumigo.io/alerts-configurations) page, you can see that Lumigo has configured a couple of default alerts. 6 | 7 | ![Default Alerts](images/mod05-lumigo-default-alerts.png) 8 | 9 | By enabling `auto-trace` on our functions, they have been configured with these default alerts. 10 | 11 | ![Default Alert Functions](images/mod05-lumigo-default-alert-functions.png) 12 | 13 | By default, they're configured to send you at most one alert per hour. You can dial this up or down (up to as frequent as to alert you on `Every Event`). 14 | 15 | 2. Click on each of the alerts and change the `Alert Frequency` in the dialogue to `Every Event`. Don't forget to click `Save Alert` when you're done. 16 | 17 | ![Alert Frequency](images/mod05-lumigo-alert-frequency.png) 18 | 19 | 3. Let's add another alert, click the `Add Alert` button on the top right. In the new dialogue, choose `Alert Type` as `Error Ratio` and set the percentage to 5%. 20 | 21 | ![New Alert](images/mod05-lumigo-new-alert.png) 22 | 23 | Select the 5 functions we have. 24 | 25 | ![New Alert Functions](images/mod05-lumigo-new-alert-functions.png) 26 | 27 | Finally, choose how we want to be notified. If you follow the `here` link below... 28 | 29 | ![Alert Channel](images/mod05-lumigo-new-alert-here.png) 30 | 31 | you will arrive at the [Integrations](https://platform.lumigo.io/integrations) page where you can integrate with other vendor software you might be using already. 32 | 33 | ![Alert Channel](images/mod05-lumigo-integrations.png) 34 | 35 | Finally, click `Add Alert` to finish the process. 36 | 37 | 4. Go back to the demo app, request a bunch of unicorns like you did earlier. You should see errors, and sure enough, a short while later you will receive an alert via the medium you configured: 38 | 39 | ![Notification rules](images/mod05-lumigo-email-alert.png) -------------------------------------------------------------------------------- /06-next steps.md: -------------------------------------------------------------------------------- 1 | # Module 6 - next steps 2 | 3 | I hope you have enjoyed these exercises and got a feel of how easy it can be to debug serverless applications with Lumigo. 4 | 5 | For a chance to win a XBox Series X and to try out Lumigo for real, please raise your hand and join one of our breakout rooms for a 1-2-1 session to help you integrate Lumigo with your production accounts to see what insights Lumigo can give you. 6 | 7 | There is a generous [free tier](https://lumigo.io/pricing) where you can trace up to 150,000 Lambda invocations a month for free. 8 | 9 | ![lumigo pricing](./images/mod06-lumigo-pricing.png) 10 | 11 | Which means you can pretty much trace your dev accounts for free, and maybe even your production accounts, until you have sufficient amount of traffic. 12 | 13 | And if you apply the code `Lumigo500`, under `Settings` -> `Account` -> `I have a special code`, then you can bump that free up to 500,000 traced invocations per month! 14 | 15 | ![lumigo account](./images/mod06-lumigo-account-settings.png) 16 | 17 | ![Lumigo500](./images/mod06-lumigo-lumigo500.png) 18 | 19 | ## What if I have more than 1 AWS account? 20 | 21 | No problems. You can manage multiple accounts (we call them `projects`) with your Lumigo user, and you can quickly switch between different projects with the `Project` drop-down at the top right corner of the screen. 22 | 23 | ![projects](./images/mod06-lumigo-projects.png) 24 | 25 | ## How do I control who has access to the Lumigo platform? 26 | 27 | You can do that in the [Team Management page](https://platform.lumigo.io/users). `Basic` role lets you view and query data in the Lumigo platform. `Admin` role lets you change configurations (e.g. alert configs). 28 | 29 | ![users](./images/mod06-lumigo-users.png) 30 | 31 | For more information, please visit the Lumigo [docs](https://docs.lumigo.io/docs). 32 | 33 | # lumigo-cli 34 | 35 | Besides the core Lumigo platform, we also have a number of popular open source tools you can use for free. 36 | 37 | The most important of which is the [lumigo-cli](https://www.npmjs.com/package/lumigo-cli), a CLI tool that simplifies a lot of your daily serverless tasks, e.g. 38 | 39 | * powertuning a Lambda function to right-size its memory setting 40 | 41 | * analyze Lambda cold starts 42 | 43 | * analyze Lambda costs 44 | 45 | * replay SQS messages from a DLQ to SQS/SNS/Kinesis 46 | 47 | * tail events in SNS/SQS/Kinesis/DynamoDB/EventBridge 48 | 49 | * tail CloudWatch logs 50 | 51 | * switch between AWS CLI profiles 52 | 53 | ![heitor](./images/mod06-heitor.png) 54 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # troubleshooting-serverless-workshop 2 | 3 | Workshop material for "Troubleshooting AWS Serverless Applications" 4 | -------------------------------------------------------------------------------- /images/mod01-000.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod01-000.png -------------------------------------------------------------------------------- /images/mod01-001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod01-001.png -------------------------------------------------------------------------------- /images/mod01-002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod01-002.png -------------------------------------------------------------------------------- /images/mod01-003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod01-003.png -------------------------------------------------------------------------------- /images/mod01-004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod01-004.png -------------------------------------------------------------------------------- /images/mod01-005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod01-005.png -------------------------------------------------------------------------------- /images/mod01-006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod01-006.png -------------------------------------------------------------------------------- /images/mod01-007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod01-007.png -------------------------------------------------------------------------------- /images/mod01-008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod01-008.png -------------------------------------------------------------------------------- /images/mod02-lumigo-about-you.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-about-you.png -------------------------------------------------------------------------------- /images/mod02-lumigo-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-architecture.png -------------------------------------------------------------------------------- /images/mod02-lumigo-auto-instrumentation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-auto-instrumentation.png -------------------------------------------------------------------------------- /images/mod02-lumigo-auto-trace.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-auto-trace.png -------------------------------------------------------------------------------- /images/mod02-lumigo-connect-aws.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-connect-aws.png -------------------------------------------------------------------------------- /images/mod02-lumigo-function-details-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-function-details-2.png -------------------------------------------------------------------------------- /images/mod02-lumigo-function-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-function-details.png -------------------------------------------------------------------------------- /images/mod02-lumigo-functions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-functions.png -------------------------------------------------------------------------------- /images/mod02-lumigo-operation-dynamodb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-operation-dynamodb.png -------------------------------------------------------------------------------- /images/mod02-lumigo-operation-function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-operation-function.png -------------------------------------------------------------------------------- /images/mod02-lumigo-operation-sns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-operation-sns.png -------------------------------------------------------------------------------- /images/mod02-lumigo-timeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-timeline.png -------------------------------------------------------------------------------- /images/mod02-lumigo-trace-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-trace-details.png -------------------------------------------------------------------------------- /images/mod02-lumigo-traces.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod02-lumigo-traces.png -------------------------------------------------------------------------------- /images/mod03-lumigo-calcSalaries-timeout-transaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-calcSalaries-timeout-transaction.png -------------------------------------------------------------------------------- /images/mod03-lumigo-calcSalaries-timeouts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-calcSalaries-timeouts.png -------------------------------------------------------------------------------- /images/mod03-lumigo-issues-and-alerts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-issues-and-alerts.png -------------------------------------------------------------------------------- /images/mod03-lumigo-requestUnicorn-timeout-transaction-log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-requestUnicorn-timeout-transaction-log.png -------------------------------------------------------------------------------- /images/mod03-lumigo-requestUnicorn-timeout-transaction-timeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-requestUnicorn-timeout-transaction-timeline.png -------------------------------------------------------------------------------- /images/mod03-lumigo-requestUnicorn-timeout-transaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-requestUnicorn-timeout-transaction.png -------------------------------------------------------------------------------- /images/mod03-lumigo-requestUnicorn-timeouts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-requestUnicorn-timeouts.png -------------------------------------------------------------------------------- /images/mod03-lumigo-show-similar-transactions-successful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-show-similar-transactions-successful.png -------------------------------------------------------------------------------- /images/mod03-lumigo-show-similar-transactions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-show-similar-transactions.png -------------------------------------------------------------------------------- /images/mod03-lumigo-uploadReceipt-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-uploadReceipt-error.png -------------------------------------------------------------------------------- /images/mod03-lumigo-uploadReceipt-errors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-uploadReceipt-errors.png -------------------------------------------------------------------------------- /images/mod03-lumigo-uploadReceipt-invocation-successful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-uploadReceipt-invocation-successful.png -------------------------------------------------------------------------------- /images/mod03-lumigo-uploadReceipt-successful.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-uploadReceipt-successful.png -------------------------------------------------------------------------------- /images/mod03-lumigo-uploadReceipt-transaction-invocation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-uploadReceipt-transaction-invocation.png -------------------------------------------------------------------------------- /images/mod03-lumigo-uploadReceipt-transaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-uploadReceipt-transaction.png -------------------------------------------------------------------------------- /images/mod03-lumigo-uploadReceipt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod03-lumigo-uploadReceipt.png -------------------------------------------------------------------------------- /images/mod04-lumigo-cli-analyze-cold-starts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod04-lumigo-cli-analyze-cold-starts.png -------------------------------------------------------------------------------- /images/mod04-lumigo-cold-start-metrics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod04-lumigo-cold-start-metrics.png -------------------------------------------------------------------------------- /images/mod04-lumigo-dashboard-cold-starts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod04-lumigo-dashboard-cold-starts.png -------------------------------------------------------------------------------- /images/mod04-lumigo-p99-transaction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod04-lumigo-p99-transaction.png -------------------------------------------------------------------------------- /images/mod04-lumigo-p99.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod04-lumigo-p99.png -------------------------------------------------------------------------------- /images/mod04-lumigo-service-latency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod04-lumigo-service-latency.png -------------------------------------------------------------------------------- /images/mod04-lumigo-slow-dependency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod04-lumigo-slow-dependency.png -------------------------------------------------------------------------------- /images/mod04-lumigo-slow-request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod04-lumigo-slow-request.png -------------------------------------------------------------------------------- /images/mod04-lumigo-slow-transaction-timeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod04-lumigo-slow-transaction-timeline.png -------------------------------------------------------------------------------- /images/mod04-lumigo-slow-transactions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod04-lumigo-slow-transactions.png -------------------------------------------------------------------------------- /images/mod04-lumigo-transaction-cold-starts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod04-lumigo-transaction-cold-starts.png -------------------------------------------------------------------------------- /images/mod05-lumigo-alert-frequency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod05-lumigo-alert-frequency.png -------------------------------------------------------------------------------- /images/mod05-lumigo-default-alert-functions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod05-lumigo-default-alert-functions.png -------------------------------------------------------------------------------- /images/mod05-lumigo-default-alerts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod05-lumigo-default-alerts.png -------------------------------------------------------------------------------- /images/mod05-lumigo-email-alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod05-lumigo-email-alert.png -------------------------------------------------------------------------------- /images/mod05-lumigo-integrations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod05-lumigo-integrations.png -------------------------------------------------------------------------------- /images/mod05-lumigo-new-alert-functions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod05-lumigo-new-alert-functions.png -------------------------------------------------------------------------------- /images/mod05-lumigo-new-alert-here.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod05-lumigo-new-alert-here.png -------------------------------------------------------------------------------- /images/mod05-lumigo-new-alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod05-lumigo-new-alert.png -------------------------------------------------------------------------------- /images/mod06-heitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod06-heitor.png -------------------------------------------------------------------------------- /images/mod06-lumigo-account-settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod06-lumigo-account-settings.png -------------------------------------------------------------------------------- /images/mod06-lumigo-lumigo500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod06-lumigo-lumigo500.png -------------------------------------------------------------------------------- /images/mod06-lumigo-pricing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod06-lumigo-pricing.png -------------------------------------------------------------------------------- /images/mod06-lumigo-projects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod06-lumigo-projects.png -------------------------------------------------------------------------------- /images/mod06-lumigo-users.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod06-lumigo-users.png -------------------------------------------------------------------------------- /images/mod06-lumigo-yan500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lumigo-io/troubleshooting-serverless-workshop/97c0f4e1dcf41df220d4b5b59a057f8889e3ed3c/images/mod06-lumigo-yan500.png --------------------------------------------------------------------------------