Skip to content

Disable createSpanUrlMap #7060

Description

@jeengbe

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which package are you using?

@sentry/node

SDK Version

7.31.1

Framework Version

n/a

Link to Sentry event

n/a

SDK Setup

Sentry.init({
...
integrations: [newSentry.Integrations.Http({tracing: {shouldCreateSpanForRequest: url=>!url.includes('newrelic.com'),},}),],});

Steps to Reproduce

See Actual Result

Expected Result

See Actual Result

Actual Result

In https://github.com/getsentry/sentry-javascript/blob/develop/packages/node/src/integrations/http.ts#L141-L156, shouldCreateSpanForRequest requests are cached in a map. This is intended behaviour with good thought, but a way to disable this would be good.

In our application, we are making a lot of network requests to a variety of different URLs that contain a many distinct combinations of many IDs. Over time, this has led to roughly 250 MB of strings only, stored in that very object.
As caching these lookups is not worth it in our case, an option would be good to disable this behaviour.

Activity

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

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions