-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): Don't return trace data in getTraceData
and getTraceMetaTags
if SDK is disabled
#13760
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Lms24
requested review from
s1gr1d,
a team and
AbhiPrasad
and removed request for
a team
September 24, 2024 08:08
Lms24
changed the title
fix(core): Don't emit trace data in
fix(core): Don't return trace data in Sep 24, 2024
getTraceData
and getTraceMetaTags
if SDK is disabledgetTraceData
and getTraceMetaTags
if SDK is disabled
s1gr1d
approved these changes
Sep 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for adding this 🙌
Lms24
force-pushed
the
lms/fix-core-getTraceData-sdk-disabled
branch
from
September 24, 2024 14:57
f40a005
to
6453d88
Compare
AbhiPrasad
approved these changes
Sep 26, 2024
Lms24
force-pushed
the
lms/fix-core-getTraceData-sdk-disabled
branch
from
September 26, 2024 14:31
b51915c
to
ca986f6
Compare
alexandresoro
pushed a commit
to alexandresoro/ouca
that referenced
this pull request
Oct 3, 2024
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@sentry/node](https://github.com/getsentry/sentry-javascript/tree/master/packages/node) ([source](https://github.com/getsentry/sentry-javascript)) | dependencies | minor | [`8.32.0` -> `8.33.1`](https://renovatebot.com/diffs/npm/@sentry%2fnode/8.32.0/8.33.1) | | [@sentry/react](https://github.com/getsentry/sentry-javascript/tree/master/packages/react) ([source](https://github.com/getsentry/sentry-javascript)) | dependencies | minor | [`8.32.0` -> `8.33.1`](https://renovatebot.com/diffs/npm/@sentry%2freact/8.32.0/8.33.1) | --- ### Release Notes <details> <summary>getsentry/sentry-javascript (@​sentry/node)</summary> ### [`v8.33.1`](https://github.com/getsentry/sentry-javascript/releases/tag/8.33.1) [Compare Source](getsentry/sentry-javascript@8.33.0...8.33.1) - fix(core): Update trpc middleware types ([#​13859](getsentry/sentry-javascript#13859)) - fix(fetch): Fix memory leak when handling endless streaming ([#​13809](getsentry/sentry-javascript#13809)) Work in this release was contributed by [@​soapproject](https://github.com/soapproject). Thank you for your contribution! ##### Bundle size 📦 | Path | Size | | ---------------------------------------------------------------- | ----------------- | | [@​sentry/browser](https://github.com/sentry/browser) | 22.64 KB | | [@​sentry/browser](https://github.com/sentry/browser) - with treeshaking flags | 21.42 KB | | [@​sentry/browser](https://github.com/sentry/browser) (incl. Tracing) | 34.87 KB | | [@​sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay) | 71.38 KB | | [@​sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay) - with treeshaking flags | 61.81 KB | | [@​sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay with Canvas) | 75.73 KB | | [@​sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay, Feedback) | 88.5 KB | | [@​sentry/browser](https://github.com/sentry/browser) (incl. Tracing, Replay, Feedback, metrics) | 90.38 KB | | [@​sentry/browser](https://github.com/sentry/browser) (incl. metrics) | 26.91 KB | | [@​sentry/browser](https://github.com/sentry/browser) (incl. Feedback) | 39.78 KB | | [@​sentry/browser](https://github.com/sentry/browser) (incl. sendFeedback) | 27.3 KB | | [@​sentry/browser](https://github.com/sentry/browser) (incl. FeedbackAsync) | 32.08 KB | | [@​sentry/react](https://github.com/sentry/react) | 25.39 KB | | [@​sentry/react](https://github.com/sentry/react) (incl. Tracing) | 37.86 KB | | [@​sentry/vue](https://github.com/sentry/vue) | 26.8 KB | | [@​sentry/vue](https://github.com/sentry/vue) (incl. Tracing) | 36.77 KB | | [@​sentry/svelte](https://github.com/sentry/svelte) | 22.77 KB | | CDN Bundle | 23.95 KB | | CDN Bundle (incl. Tracing) | 36.66 KB | | CDN Bundle (incl. Tracing, Replay) | 71.15 KB | | CDN Bundle (incl. Tracing, Replay, Feedback) | 76.45 KB | | CDN Bundle - uncompressed | 70.17 KB | | CDN Bundle (incl. Tracing) - uncompressed | 108.68 KB | | CDN Bundle (incl. Tracing, Replay) - uncompressed | 220.58 KB | | CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed | 233.79 KB | | [@​sentry/nextjs](https://github.com/sentry/nextjs) (client) | 37.82 KB | | [@​sentry/sveltekit](https://github.com/sentry/sveltekit) (client) | 35.45 KB | | [@​sentry/node](https://github.com/sentry/node) | 125.13 KB | | [@​sentry/node](https://github.com/sentry/node) - without tracing | 93.58 KB | | [@​sentry/aws-serverless](https://github.com/sentry/aws-serverless) | 103.28 KB | ### [`v8.33.0`](https://github.com/getsentry/sentry-javascript/blob/HEAD/CHANGELOG.md#8330) [Compare Source](getsentry/sentry-javascript@8.32.0...8.33.0) ##### Important Changes - **feat(nextjs): Support new async APIs (`headers()`, `params`, `searchParams`) ([#​13828](getsentry/sentry-javascript#13828 Adds support for [new dynamic Next.js APIs](vercel/next.js#68812). - **feat(node): Add `lru-memoizer` instrumentation ([#​13796](getsentry/sentry-javascript#13796 Adds integration for lru-memoizer using [@​opentelemetry/instrumentation-lru-memoizer](https://github.com/opentelemetry/instrumentation-lru-memoizer). - **feat(nuxt): Add `unstable_sentryBundlerPluginOptions` to module options ([#​13811](getsentry/sentry-javascript#13811 Allows passing other options from the bundler plugins (vite and rollup) to Nuxt module options. ##### Other Changes - fix(browser): Ensure `wrap()` only returns functions ([#​13838](getsentry/sentry-javascript#13838)) - fix(core): Adapt trpc middleware input attachment ([#​13831](getsentry/sentry-javascript#13831)) - fix(core): Don't return trace data in `getTraceData` and `getTraceMetaTags` if SDK is disabled ([#​13760](getsentry/sentry-javascript#13760)) - fix(nuxt): Don't restrict source map assets upload ([#​13800](getsentry/sentry-javascript#13800)) - fix(nuxt): Use absolute path for client config ([#​13798](getsentry/sentry-javascript#13798)) - fix(replay): Stop global event handling for paused replays ([#​13815](getsentry/sentry-javascript#13815)) - fix(sveltekit): add url param to source map upload options ([#​13812](getsentry/sentry-javascript#13812)) - fix(types): Add jsdocs to cron types ([#​13776](getsentry/sentry-javascript#13776)) - fix(nextjs): Loosen [@​sentry/nextjs](https://github.com/sentry/nextjs) webpack peer dependency ([#​13826](getsentry/sentry-javascript#13826)) Work in this release was contributed by [@​joshuajaco](https://github.com/joshuajaco). Thank you for your contribution! </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMDYuNCIsInVwZGF0ZWRJblZlciI6IjM4LjEwNy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=--> Reviewed-on: https://git.tristess.app/alexandresoro/ouca/pulls/186 Reviewed-by: Alexandre Soro <[email protected]> Co-authored-by: renovate <[email protected]> Co-committed-by: renovate <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This came up in a discussion with @s1gr1d: The
getTraceData
andgetTraceMetaTags
functions returned data, even if the SDK was disabled entirely (enabled: false
). These APIs are publicly exposed and users probably call them without being aware of this limitation (as well as us in our meta framework SDKs). This PR ensures that we don't return data in case the SDK is disabled.Added more tests to ensure this is now properly covered, along with a test for behaviour with
tracesSampleRate: 0
.