open-telemetry / opentelemetry-lambda

Create your own Lambda Layer in each OTel language using this starter code. Add the Lambda Layer to your Lamdba Function to get tracing with OpenTelemetry.
https://opentelemetry.io
Apache License 2.0
281 stars 169 forks source link

Callback function returns a null response #198

Closed vkodalibp closed 1 month ago

vkodalibp commented 2 years ago

Hi Team, I instrumented a lambda function with AWS Distro Lambda Layer, after changes able to send traces to defined exporters in collector, however function returns response "null" instead of actual response. Need your assistance to solve the issue

Note: Null response coming, when i use the callback function inside handler retuning a correct response, if i use return response instead of return callback(null, response) in following function code

Here is function code: exports.handler = async (event, ctx, callback) => { console.info(event); // TODO implement const response = { statusCode: 200, body: JSON.stringify('Hello from Lambda!'), }; return callback(null, response); };

Regards, Venakt

github-actions[bot] commented 3 months ago

This issue was marked stale. It will be closed in 30 days without additional activity.

github-actions[bot] commented 1 month ago

Closed as inactive. Feel free to reopen if this issue is still relevant.