Skip to content

feat: emit inferred aws.alb span for ALB-triggered Lambdas#838

Draft
chemystery09 wants to merge 2 commits into
mainfrom
ishara/alb-inferred-span-frsles-851
Draft

feat: emit inferred aws.alb span for ALB-triggered Lambdas#838
chemystery09 wants to merge 2 commits into
mainfrom
ishara/alb-inferred-span-frsles-851

Conversation

@chemystery09

@chemystery09 chemystery09 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add create_inferred_span_from_alb_event to emit an inferred aws.alb span (span_type=http, span.kind=server) for single-value ALB Lambda events, with HTTP request tags (http.method, http.url, http.useragent, etc.).
  • Wire the ALB dispatcher in create_inferred_span using EventSubtypes.ALB.
  • Fix extract_http_tags for ALB events (no requestContext.stage) so http.url, http.route, and http.useragent are populated and copied onto the inferred span by the wrapper post-response.

Closes FRSLES-851 / APMSVLS-542.

Test plan

  • pytest tests/test_trigger.py -k application_load_balancer -v
  • pytest tests/test_tracing.py tests/test_wrapper.py -v
  • Validate on real AWS ALB + Lambda (manual)

Made with Cursor

chemystery09 and others added 2 commits June 25, 2026 16:35
When a Lambda is invoked behind an Application Load Balancer, create an
inferred aws.alb span with HTTP request tags and populate ALB HTTP facet
tags for http.url, http.route, and http.useragent.

FRSLES-851 / APMSVLS-542

Co-authored-by: Cursor <cursoragent@cursor.com>
Cover ALB inferred-span creation, service mapping, inbound trace context,
HTTP trigger tags, and full wrapper lifecycle including status code and
parent/child linkage.

FRSLES-851 / APMSVLS-542

Co-authored-by: Cursor <cursoragent@cursor.com>
@datadog-prod-us1-6

datadog-prod-us1-6 Bot commented Jun 25, 2026

Copy link
Copy Markdown

Pipelines

Fix all issues with BitsAI

⚠️ Warnings

🚦 2 Pipeline jobs failed

DataDog/datadog-lambda-python | lint python   View in Datadog   GitLab

build | lint   View in Datadog   GitHub Actions

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 66fc7da | Docs | Datadog PR Page | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant