Skip to content

Instantly share code, notes, and snippets.

View xuan-cao-swi's full-sized avatar
🍁
Hooooola

Xuan xuan-cao-swi

🍁
Hooooola
View GitHub Profile

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@xuan-cao-swi
xuan-cao-swi / lambda_test.md
Created December 13, 2023 17:09
Testing lambda instrumentation with lambda layer

Lambda Instrumentation and Layer Test Environment Setup

This guide outlines detailed steps for setting up a test environment to evaluate both Lambda instrumentation (PR) and the Lambda layer (PR) for OpenTelemetry.

Step 1: Creating the Lambda Layer

  1. Clone the repository using the ruby-layer-wrapper branch from this location. This branch contains the wrapper file absent in the original PR.
  2. Navigate to ruby/src/ and execute sam build -u -t template.yml. This action generates the .aws-sam folder. Finally, run the script ./zip_ruby_layer.sh -n <your_layer_name> to create the zip file suitable for upload to AWS Lambda via the AWS console.
  3. If using a different tracing platform, ensure its installation before creating the layers.
  4. The gems listed in ruby/layer/Gemfile a