Skip to content

Slow Initialization Time for Sentry SDK in AWS Lambda #3763

Description

@kalyan-koneru

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2.18.0

Steps to Reproduce

While implementing a simple AWS Lambda function, I observed significant delays related to Sentry SDK initialization. Specifically:

  1. import sentry_sdk takes approximately ~ 300 ms.
  2. sentry_sdk.init takes an additional 25SampleSentrySdkFunction.zip
    0 ms.

These delays contribute to an increased cold start time for AWS Lambda functions, which could impact performance in latency-sensitive applications.

I have attached the lambda function I used to test the performance

Expected Result

Expect the sentry initialization time to be under 50ms

Actual Result

Sentry initialization time is over 500ms

Elapsed time import sentry_sdk: 304 ms
Elapsed time sentry_sdk.init: 257 ms

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

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions