fix: classify ALB events as load_balancer, not API Gateway#63
Merged
Conversation
ALB target-group events carry requestContext.elb. The dispatcher keyed off requestContext alone, so ALB-triggered Lambdas were emitted as an aws:api_gateway trigger-chain hop. Detect requestContext.elb first and emit an aws:load_balancer hop carrying the target group ARN and name. Mirrors the same fix in tracing-ingestion's trigger_chain.py so both ingestion paths agree on the aws:load_balancer chain type. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
mosheshaham-dash0
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ALB target-group events carry
requestContext.elb. The dispatcher classified anything withrequestContextas API Gateway, so ALB-triggered Lambdas were emitted as anaws:api_gatewaytrigger-chain hop.Fix: detect
requestContext.elbbefore the API Gateway branch and emit anaws:load_balancerhop with the target group ARN + name (parsed as the segment aftertargetgroup/, since the generic ARN parser would return the trailing id).Mirrors the same fix on the other ingestion path (tracing-ingestion #2156) so both agree on the
aws:load_balancerchain type; the FE renders it via dash0 #13367.Tests: ALB →
aws:load_balancerhop with target-group name/ARN; not misclassified as API Gateway; missingtargetGroupArnstill yields a load_balancer hop.cargo test trigger_chain46 pass,cargo fmt --checkclean.