You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally this context would be gathered automatically by the apm-aws-lambda extension and accessible by ecs-logging-nodejs via the agent. But from what I can tell this isn't the case. This library doesn't log any HTTP request/response data as part of it's APM integration. And I don't see that this API Gateway data is collected by the extension today, assuming it is even available from the AWS Lambda Logs/Telemetry APIs.
As a stopgap for an indeterminate period of time I am using AsyncLocalStorage and a Pino mixin to gather this data from my function handlers and include it in my logs following ECS conventions.
If #68 resolves with a namespace-based solution and APM support remains lacking I would like to continue logging HTTP details on top-level ECS fields for consistency with non-Lambda services. This seems possible if I could create compatible instances of http.IncomingMessage and http.ServiceResponse but Node's HTTP API seems excessively complicated for this case.
Ideally I could explicitly provide the ECS fields, similar to what I do today and how existing req/res support works. Alternately support for Fetch API Request and Response objects.
The text was updated successfully, but these errors were encountered:
Note in that linked-to code that the variable name is pseudoReq. This is creating an object that looks enough like a http.IncomingMessage for the data extraction that the APM agent's handler is doing. I'm not sure if the convertReqRes handling in the current ecs-logging-nodejs formatters could work similarly.
And yah... supporting Fetch API objects eventually is a good idea.
In my case I am running Node in an AWS Lambda environment where there is not a Node server running. Request data is available as APIGatewayProxyEvent or APIGatewayEventRequestContextV2 and responses as APIGatewayProxyResult or APIGatewayProxyStructuredResultV2.
Ideally this context would be gathered automatically by the apm-aws-lambda extension and accessible by ecs-logging-nodejs via the agent. But from what I can tell this isn't the case. This library doesn't log any HTTP request/response data as part of it's APM integration. And I don't see that this API Gateway data is collected by the extension today, assuming it is even available from the AWS Lambda Logs/Telemetry APIs.
As a stopgap for an indeterminate period of time I am using AsyncLocalStorage and a Pino mixin to gather this data from my function handlers and include it in my logs following ECS conventions.
If #68 resolves with a namespace-based solution and APM support remains lacking I would like to continue logging HTTP details on top-level ECS fields for consistency with non-Lambda services. This seems possible if I could create compatible instances of
http.IncomingMessage
andhttp.ServiceResponse
but Node's HTTP API seems excessively complicated for this case.Ideally I could explicitly provide the ECS fields, similar to what I do today and how existing req/res support works. Alternately support for Fetch API Request and Response objects.
The text was updated successfully, but these errors were encountered: