Skip to content
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

Support logging the impersonator user, if any #647

Merged
merged 2 commits into from Jul 15, 2022

Conversation

ste93cry
Copy link
Collaborator

@ste93cry ste93cry commented Jul 6, 2022

Fixes #642 by logging the impersonator user as part of the metadata of the User Interface. @hunhejj given that you asked for this feature, would you mind trying this out and see if it works?

@ste93cry ste93cry added this to the 4.4 milestone Jul 6, 2022
@ste93cry ste93cry requested a review from Jean85 Jul 6, 2022
@ste93cry ste93cry force-pushed the track-impersonator-user branch 3 times, most recently from f842070 to eb454a8 Compare Jul 6, 2022
CHANGELOG.md Show resolved Hide resolved
tests/EventListener/RequestListenerTest.php Outdated Show resolved Hide resolved
@hunhejj
Copy link

hunhejj commented Jul 11, 2022

I tried to test it on our project @ste93cry but unfortunately I get way too many conflicts when trying to install the branch directly.

@hunhejj
Copy link

hunhejj commented Jul 11, 2022

Btw. in your original thread you suggested using a dedicated tag but I see in the implementation that you ended up with user meta. Out of curiosity what is the advantage of it @ste93cry ?

@Jean85 Jean85 linked an issue Jul 13, 2022 that may be closed by this pull request
@ste93cry ste93cry force-pushed the track-impersonator-user branch from 01350f0 to 0d8e254 Compare Jul 13, 2022
@ste93cry ste93cry requested a review from Jean85 Jul 13, 2022
@ste93cry
Copy link
Collaborator Author

you suggested using a dedicated tag but I see in the implementation that you ended up with user meta

Right, I didn't check at that time and I though that the user was logged as a tag, but actually there is a specific User Interface provided by Sentry to store the user information that we were already using. From the UI's perspective, the only difference is that the impersonator user is shown in the section dedicated to the user details instead of the section of the tags. However, it looks like all the extra fields that belongs to that Interface are not indexed and so aren't searchable. I think that for consistency purposes and also because "it feels more appropriate" we should keep going this way, but, as a side note, I would support the idea of asking Sentry if it was possible to make searchable all the extra fields of the user.

@ste93cry ste93cry force-pushed the track-impersonator-user branch from 0d8e254 to a6fb690 Compare Jul 14, 2022
Jean85
Jean85 approved these changes Jul 15, 2022
@ste93cry ste93cry merged commit 3314c20 into develop Jul 15, 2022
24 checks passed
@ste93cry ste93cry deleted the track-impersonator-user branch Jul 15, 2022
@cleptric cleptric mentioned this pull request Oct 13, 2022
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: log the impersonator
3 participants