sentry-cocoa icon indicating copy to clipboard operation
sentry-cocoa copied to clipboard

`SentryUser.name` & `.segment` properties ignored

Open lhunath opened this issue 1 year ago • 6 comments

Platform

iOS

Environment

Production, Develop

Installed

Swift Package Manager

Version

8.25.0

Did it work on previous versions?

No response

Steps to Reproduce

  1. Create a SentryUser with a certain identifier.
  2. Set the user's username and name properties.
  3. Report a Sentry event.
self.sentryUser = userId.flatMap(Sentry.User.init)
self.sentryUser?.email = userEmail
self.sentryUser?.username = userName
self.sentryUser?.name = userName
self.sentryUser?.segment = userManager == "yes" ? "manager" : "user"
SentrySDK.setUser(self.sentryUser)

Example event: us.sentry.io.json

Expected Result

The event payload & web app reports the user's human readable name and segment.

Actual Result

The event payload & web app only report the user's userId, email and userName. image

Are you willing to submit a PR?

No response

lhunath avatar May 02 '24 23:05 lhunath

Hello @lhunath, thanks for reaching out.

I could reproduce this, but it seems that the behaviour is not straight forward. After waiting a little bit more and refreshing the issue page the name appears.

Can you test this?

brustolin avatar May 03 '24 12:05 brustolin

I have not seen the missing information appear on the issue page (this is the issue page for the error event attached in the description). I should point out that the information is also missing from the event JSON, so it would be surprising to me if it did show up later.

lhunath avatar May 03 '24 14:05 lhunath

I cant reproduce this. The name appears, but sometimes I need to refresh the issue page to see it.

brustolin avatar May 06 '24 15:05 brustolin

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Jun 13 '24 07:06 getsantry[bot]

Segment continues to be absent from the issue page. sentry.json image

lhunath avatar Jun 13 '24 17:06 lhunath

user.segment is going to be removed from the product side and isn't supported by the new Contexts view. We're going to deprecate and remove the property from all SDKs soon. Apologies for the confusion. If you need to report segment information, you can use Context or Tags.

kahest avatar Jun 17 '24 09:06 kahest

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you remove the label Waiting for: Community, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

getsantry[bot] avatar Jul 10 '24 07:07 getsantry[bot]