Skip to content

High CPU usage because of a uuid4 call #3908

Closed

Description

@debugger22

How do you use Sentry?

Sentry Saas (sentry.io)

Version

2.19.2

Steps to Reproduce

https://github.com/getsentry/sentry-python/blob/master/sentry_sdk/tracing.py#L290

My APM is reporting high cou usage from the above line.

My sentry init -

sentry_sdk.init(
    dsn=config.SENTRY_URL,
    integrations=[DjangoIntegration(), CeleryIntegration()],
    send_default_pii=True,
    enable_tracing=False,
    environment=ENV,
    max_request_body_size="always",
    server_name=os.environ.get("CONTAINER_NAME", socket.getfqdn()),
)

Expected Result

The overhead should be very little.

Actual Result

Image

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jan 9, 2025
  2. added
    Component: SDK Core
    on Jan 13, 2025
  3. antonpirker commented on Jan 13, 2025

    @antonpirker
    Contributor

    Hey @debugger22 thanks for writing in.

    There was a PR that addressed a similar problem but it was not merged because we thought it was fixed with another PR.

    So maybe it is time to reopen this PR.

  4. added a commit that references this issue on Aug 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions