Skip to content
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

ref(tracing): Remove transaction name and user_id from DSC #5363

Merged
merged 7 commits into from
Jul 5, 2022

Conversation

Lms24
Copy link
Member

@Lms24 Lms24 commented Jul 5, 2022

This patch temporarily removes the user_id and transaction (name) fields from the dynamic sampling context, meaning they will no longer propagated with outgoing requests via the baggage Http header or sent to sentry via the trace envelope header.

We're taking this temporary measure to ensure that for the moment PII is not sent to third parties. Developer spec is update in getsentry/develop#631.

temporary fix to no longer propagate potential PII
@Lms24 Lms24 requested a review from lobsterkatie July 5, 2022 14:39
@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.34 KB (0%)
@sentry/browser - ES5 CDN Bundle (minified) 59.86 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 17.94 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 52.78 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 19.71 KB (0%)
@sentry/browser - Webpack (minified) 64.16 KB (0%)
@sentry/react - Webpack (gzipped + minified) 19.73 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 43.89 KB (-0.04% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 25.66 KB (-0.13% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 23.93 KB (-0.07% 🔽)

packages/node-integration-tests/package.json Outdated Show resolved Hide resolved
@@ -79,8 +79,7 @@ test('Should populate and propagate sentry baggage if sentry-trace header does n
test_data: {
host: 'somewhere.not.sentry',
baggage: expect.stringContaining(
'sentry-environment=prod,sentry-release=1.0,sentry-transaction=GET%20%2Ftest%2Fexpress,' +
'sentry-public_key=public,sentry-trace_id=',
'sentry-environment=prod,sentry-release=1.0,sentry-public_key=public,sentry-trace_id=',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny tiny nit: If we're commenting stuff out in the other tests rather than modifying said stuff, I'd leave the old value here, commented out (in addition to the new value, of course).

(Same in the other spots where this applies.)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 5249b77

Comment on lines 6 to 7
// Skipping this test because right now we're not including user_id at all
test.skip('Includes user_id in baggage if sendDefaultPii is set to true', async () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since, as discussed in the meeting earlier, we're not going to be using sendDefaultPII to control this (now or ever), we should pull it from any tests it's in.

We can leave this test, maybe, since something will eventually control that, but if so I'd probably do something like

Suggested change
// Skipping this test because right now we're not including user_id at all
test.skip('Includes user_id in baggage if sendDefaultPii is set to true', async () => {
// TODO: Skipping this test because right now we're rethinking the mechanism for including such data
test.skip('Includes user_id in baggage if <optionTBA> is set to true', async () => {

and add a similar TODO to the companion file which sets up the test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done c8aac6e

transaction: this.name,
...(hub.shouldSendDefaultPii() && { user_id }),
// transaction: this.name,
// ...(hub.shouldSendDefaultPii() && { user_id }),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above re: sendDefaultPII.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 4415ab8

@Lms24 Lms24 requested a review from lobsterkatie July 5, 2022 16:00
Copy link
Member

@lobsterkatie lobsterkatie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@AbhiPrasad AbhiPrasad added this to the Dynamic Sampling Context milestone Jul 5, 2022
@Lms24 Lms24 self-assigned this Jul 5, 2022
@Lms24 Lms24 merged commit f372d84 into master Jul 5, 2022
@Lms24 Lms24 deleted the lms-no-userid-transaction branch July 5, 2022 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants