zeroae / zeroae/zae-limiter

Add X-Ray SDK instrumentation to Lambda aggregator

Open
#194 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/aggregator area/infra
Dominant language
Python
Stars
0
Forks
0
Avg merge
6h 51m
Merged PRs (30d)
104

Description

Summary

The Lambda aggregator function needs X-Ray SDK instrumentation to capture DynamoDB subsegments in traces.

Background

Issue #107 Phase 1 added X-Ray tracing infrastructure:

  • TracingConfig.Mode: Active on Lambda
  • Conditional X-Ray IAM permissions
  • enable_tracing flag in StackOptions/CLI

However, Lambda invocations are traced but DynamoDB calls are not captured as subsegments because the aggregator uses plain boto3 without X-Ray SDK patching.

Proposed Solution

  1. Add aws-xray-sdk to Lambda dependencies
  2. Patch boto3 in the Lambda handler:
    from aws_xray_sdk.core import patch_all
    patch_all()
    
  3. Update lambda_builder.py to include the X-Ray SDK in the deployment package

Impact

  • Lambda deployment package size will increase
  • DynamoDB calls will appear as subsegments in X-Ray traces
  • Enables end-to-end tracing visibility

Related

  • Parent: #107 (AWS X-Ray Tracing Integration)
  • Prerequisite: May require changes to how Lambda packages are built

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading lambda_builder.py and locating the Lambda aggregator handler, then inspect how its dependencies are assembled. Add the aws-xray-sdk dependency and verify that DynamoDB calls from the packaged Lambda appear as X-Ray subsegments while the existing deployment packaging still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
cloud, databases, observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.