-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(tracing): Remove transaction name and user_id from DSC #5363
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
Changes from 1 commit
d89138a
b7f50a3
ed3ed28
c8aac6e
4415ab8
5249b77
a06a107
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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=', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 5249b77 |
||
), | ||
}, | ||
}); | ||
|
@@ -99,8 +98,7 @@ test('Should populate Sentry and ignore 3rd party content if sentry-trace header | |
host: 'somewhere.not.sentry', | ||
// TraceId changes, hence we only expect that the string contains the traceid key | ||
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=', | ||
), | ||
}, | ||
}); | ||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -3,7 +3,8 @@ import * as path from 'path'; | |||||||||
import { getAPIResponse, runServer } from '../../../../utils/index'; | ||||||||||
import { TestAPIResponse } from '../server'; | ||||||||||
|
||||||||||
test('Includes user_id in baggage if sendDefaultPii is set to true', async () => { | ||||||||||
// 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 () => { | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 We can leave this test, maybe, since something will eventually control that, but if so I'd probably do something like
Suggested change
and add a similar TODO to the companion file which sets up the test. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done c8aac6e |
||||||||||
const url = await runServer(__dirname, `${path.resolve(__dirname, '.')}/server.ts`); | ||||||||||
|
||||||||||
const response = (await getAPIResponse(new URL(`${url}/express`))) as TestAPIResponse; | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,15 +229,18 @@ export class Transaction extends SpanClass implements TransactionInterface { | |
? rate.toLocaleString('fullwide', { useGrouping: false, maximumFractionDigits: 16 }) | ||
: undefined; | ||
|
||
// For now we're not sending the transaction name and user_id due to PII concerns | ||
// commenting it out for now because we'll probably need it in the future | ||
|
||
const scope = hub.getScope(); | ||
const { id: user_id, segment: user_segment } = (scope && scope.getUser()) || {}; | ||
const { /* id: user_id, */ segment: user_segment } = (scope && scope.getUser()) || {}; | ||
|
||
return createBaggage( | ||
dropUndefinedKeys({ | ||
environment, | ||
release, | ||
transaction: this.name, | ||
...(hub.shouldSendDefaultPii() && { user_id }), | ||
// transaction: this.name, | ||
// ...(hub.shouldSendDefaultPii() && { user_id }), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above re: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 4415ab8 |
||
user_segment, | ||
public_key, | ||
trace_id: this.traceId, | ||
|
Uh oh!
There was an error while loading. Please reload this page.