Skip to content

Commit 98bb3f4

Browse files
PetrHeinzclaude
andauthored
T-22594 Rewrite the tag enrichment Lambdas in Rust on provided.al2023 (#12)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 2c67c9a commit 98bb3f4

25 files changed

Lines changed: 4849 additions & 1727 deletions

‎.github/workflows/e2e.yml‎

Lines changed: 71 additions & 31 deletions
Large diffs are not rendered by default.

‎.github/workflows/test.yml‎

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,24 @@ on:
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12-
strategy:
13-
matrix:
14-
spec:
15-
- spec/lambda/firehose_metrics_tag_enrichment_spec.rb
16-
- spec/lambda/firehose_logs_tag_enrichment_spec.rb
12+
defaults:
13+
run:
14+
working-directory: lambda
1715
steps:
1816
- uses: actions/checkout@v7
1917

20-
- uses: ruby/setup-ruby@v1
18+
- uses: actions/cache@v6
2119
with:
22-
ruby-version: '3.2'
23-
bundler-cache: true
20+
path: |
21+
~/.cargo/registry
22+
lambda/target
23+
key: cargo-test-${{ hashFiles('lambda/Cargo.lock') }}
2424

2525
- name: Run tests
26-
run: bundle exec rspec ${{ matrix.spec }} --format documentation
26+
run: cargo test --locked
27+
28+
- name: Lint
29+
run: cargo clippy --all-targets --locked -- -D warnings
30+
31+
- name: Check formatting
32+
run: cargo fmt --check

‎.gitignore‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
Thumbs.db
44

55
.claude/
6+
# Rust build output and the Docker build cache
7+
lambda/target/
8+
lambda/.cache/
69
# Lambda zips built by lambda/build.sh
710
lambda/dist/

‎Gemfile‎

Lines changed: 0 additions & 14 deletions
This file was deleted.

‎Gemfile.lock‎

Lines changed: 0 additions & 61 deletions
This file was deleted.

‎cloudformation/full/better-stack-full.yaml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -711,10 +711,10 @@ Resources:
711711
Properties:
712712
FunctionName: !Sub 'better-stack-metrics'
713713
Description: Enriches CloudWatch metric records with AWS resource tags
714-
Runtime: ruby3.3
714+
Runtime: provided.al2023
715715
Architectures:
716716
- arm64
717-
Handler: firehose_metrics_tag_enrichment.lambda_handler
717+
Handler: bootstrap
718718
Role: !If
719719
- ShouldCreateGlobalResources
720720
- !GetAtt TagEnrichmentLambdaRole.Arn
@@ -744,10 +744,10 @@ Resources:
744744
Properties:
745745
FunctionName: !Sub 'better-stack-logs'
746746
Description: Enriches CloudWatch log records with AWS resource tags
747-
Runtime: ruby3.3
747+
Runtime: provided.al2023
748748
Architectures:
749749
- arm64
750-
Handler: firehose_logs_tag_enrichment.lambda_handler
750+
Handler: bootstrap
751751
Role: !If
752752
- ShouldCreateGlobalResources
753753
- !GetAtt TagEnrichmentLambdaRole.Arn

0 commit comments

Comments
 (0)