-
Notifications
You must be signed in to change notification settings - Fork 312
Open
Labels
Description
Summary
Add support for treating LambdaFunctionURLRequest as a web request.
Desired Behaviour
Currently, this library will treat APIGatewayProxyRequest and ALBTargetGroupRequest as a web request.
go-agent/v3/integrations/nrlambda/events.go
Lines 52 to 64 in ac0e154
| switch r := event.(type) { | |
| case events.APIGatewayProxyRequest: | |
| request.Method = r.HTTPMethod | |
| path = r.Path | |
| headers = r.Headers | |
| case events.ALBTargetGroupRequest: | |
| // https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html#receive-event-from-load-balancer | |
| request.Method = r.HTTPMethod | |
| path = r.Path | |
| headers = r.Headers | |
| default: | |
| return nil | |
| } |
go-agent/v3/integrations/nrlambda/events.go
Lines 97 to 106 in ac0e154
| switch r := event.(type) { | |
| case events.APIGatewayProxyResponse: | |
| code = r.StatusCode | |
| headers = r.Headers | |
| case events.ALBTargetGroupResponse: | |
| code = r.StatusCode | |
| headers = r.Headers | |
| default: | |
| return nil | |
| } |
Please also add support for LambdaFunctionURLRequest and LambdaFunctionURLResponse.
Possible Solution
Amend the aforementioned switch cases.
Additional context
We want to be able to use Lambda function URLs instead of API Gateway.