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: 1 addition & 1 deletion packages/types/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface RequestSession {

export interface Session {
sid: string;
did?: string;
did?: string | number;
Copy link
Contributor

Choose a reason for hiding this comment

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

https://develop.sentry.dev/sdk/sessions/#session-update-payload

did is typed as string in Relay. If we wanna allow number here we have to stringify it before sending.

Copy link
Member

Choose a reason for hiding this comment

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

did should be string - we should only be changing user.id

Copy link
Contributor

Choose a reason for hiding this comment

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

We can change what we allow here but we should only send the stringified version. Which we already do - I think Daniel found that out.

init: boolean;
// seconds since the UNIX epoch
timestamp: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/user.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** JSDoc */
export interface User {
[key: string]: any;
id?: string;
id?: string | number;
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like relay theoretically allows numbers here:

https://github.com/getsentry/relay/blob/4a7c73a1e3e00215929b4b76644043771517c08c/relay-general/src/protocol/user.rs#L49

LenientString is like python's str(). We should still double check this.

Copy link
Member

Choose a reason for hiding this comment

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

LenientString allows any json type

ip_address?: string;
email?: string;
username?: string;
Expand Down