Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/core/src/tracing/dynamicSamplingContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export function getDynamicSamplingContextFromClient(
const options = client.getOptions();

const { publicKey: public_key } = client.getDsn() || {};
// TODO(v8): Remove segment from User
Copy link
Member

Choose a reason for hiding this comment

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

Nice, that means we won't need the scope anymore for the dsc, right? Cc @Lms24 we can simplify this a bit in V8 then 🎉

Copy link
Member Author

Choose a reason for hiding this comment

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

yup no scope for the DSC!

// eslint-disable-next-line deprecation/deprecation
const { segment: user_segment } = (scope && scope.getUser()) || {};

const dsc = dropUndefinedKeys({
Expand Down
3 changes: 3 additions & 0 deletions packages/types/src/envelope.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ export type DynamicSamplingContext = {
release?: string;
environment?: string;
transaction?: string;
/**
* @deprecated Functonality for segment has been removed.
*/
user_segment?: string;
replay_id?: string;
sampled?: string;
Expand Down
7 changes: 6 additions & 1 deletion packages/types/src/user.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
/** JSDoc */
/**
* An interface describing a user of an application or a handled request.
*/
export interface User {
[key: string]: any;
id?: string | number;
ip_address?: string;
email?: string;
username?: string;
/**
* @deprecated Functonality for segment has been removed. Use a custom tag or context instead to capture this information.
*/
segment?: string;
}

Expand Down