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

fix: improve user telemetry #3972

Merged
merged 10 commits into from
Nov 16, 2023
Merged

fix: improve user telemetry #3972

merged 10 commits into from
Nov 16, 2023

Conversation

makeavish
Copy link
Member

  • move GetEmailFromJwt to common function
  • update AttachJwtToContext() to use standard way of attaching value to context
  • update userEmail in every possible sendEvent call
  • send groupId in sendEvent call for SaaS operator analytics

- move GetEmailFromJwt to common function
- update AttachJwtToContext() to use standard way of attaching value to context
- update userEmail in every possible sendEvent call
- send groupId in sendEvent call for SaaS operator analytics
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions github-actions bot added the bug Something isn't working label Nov 15, 2023
Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

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

The user object is already attached to every request context. You can use common.GetUserFromContext(ctx). There is no need to call auth.AttachJwtToContext under every route that you need email.

ee/query-service/app/api/license.go Outdated Show resolved Hide resolved
ee/query-service/app/server.go Outdated Show resolved Hide resolved
srikanthccv
srikanthccv previously approved these changes Nov 16, 2023
@makeavish makeavish merged commit 5b419cb into develop Nov 16, 2023
11 checks passed
@makeavish makeavish deleted the fix/improve-user-telemetry branch November 16, 2023 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants