Skip to content

sentry_sdk.spotlight adds 11mb to RSS regardless of whether it is used #4605

@beaugunderson

Description

@beaugunderson

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2.33.1

Steps to Reproduce

import sentry_sdk

By tracing every import and comparing the before/after memory usage we can see that sentry_sdk.client imports sentry_sdk.spotlight, which pulls in many large Django libraries to the tune of 11mb RSS.

We're in a memory-constrained environment and this is unacceptable to us.

Expected Result

I would expect sentry_sdk.spotlight to be imported only if spotlight=True in the Sentry settings (we're explicitly setting it to False).

Actual Result

Full import tracing tree for sentry_sdk.spotlight attached.

tree.txt

Metadata

Metadata

Assignees

Labels

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions