getsentry / sentry-cocoa

The official Sentry SDK for iOS, tvOS, macOS, watchOS.
https://sentry.io/for/cocoa/
MIT License
779 stars 311 forks source link

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

Open lhunath opened 2 months ago

lhunath commented 2 months ago

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

brustolin commented 2 months ago

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?

lhunath commented 2 months ago

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.

brustolin commented 1 month ago

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

getsantry[bot] commented 3 weeks ago

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 🥀

lhunath commented 3 weeks ago

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

image
kahest commented 2 weeks ago

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.