Skip to content

Add userId to log events#42

Draft
tlanfer wants to merge 4 commits intod-velop:mainfrom
tlanfer:feature/uid
Draft

Add userId to log events#42
tlanfer wants to merge 4 commits intod-velop:mainfrom
tlanfer:feature/uid

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 requested review from mtestrot and sterschl August 11, 2022 08:32
@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