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

Add userId to log events #42

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

tlanfer
Copy link
Contributor

@tlanfer tlanfer commented Aug 11, 2022

To follow a specifc users actions throughout logs, we want to add the users ID to log events. We pseudonymize the userId using a sha256 hash to preserve some privacy.

The changes in this PR contain everything to add userIds to log events in Go applications:

  • An extension of the log schema
  • A direct method to add userIds to log events
  • A hook which uses a getter function to dynamically retrieve the userId fromt he current context, hash it, and add it to log events. This hook is designed to be compatible with our IDP client and its middleware functions

@tlanfer tlanfer marked this pull request as draft August 11, 2022 11:54
@d-velop-github-admin d-velop-github-admin changed the base branch from master to main December 1, 2022 13:56
@d-velop-github-admin d-velop-github-admin marked this pull request as ready for review December 1, 2022 14:00
@d-velop-github-admin d-velop-github-admin marked this pull request as draft December 1, 2022 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant