Skip to content

@sentry/serverless adds ~300ms to function duration #3051

Description

@kostia-official

Package + Version

"@sentry/node": "^5.27.4",
"@sentry/serverless": "^5.27.4",

Description

I've noticed that the response time of my functions is slow, added tracing, and noticed that at the end of every invocation my lambda sends POST request to sentry. Here you can see a trace:
image

It's okay to increase response time for requests with error, but if there is no error, I expect that response would be sent immediately. There is minimal code that I've tested:

import*asSentryfrom'@sentry/serverless';Sentry.AWSLambda.init({dsn: process.env.SENTRY_DSN,tracesSampleRate: 1.0});exportconsthandler=Sentry.AWSLambda.wrapHandler((event,context,callback)=>{context.callbackWaitsForEmptyEventLoop=false;callback(null,{statusCode: 200});},{callbackWaitsForEmptyEventLoop: false,flushTimeout: 2000});

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions