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

Can it be made possible to set the User also via a Header if not present? #85

Open
Ben-Bock opened this issue Nov 8, 2021 · 1 comment

Comments

@Ben-Bock
Copy link

Ben-Bock commented Nov 8, 2021

Hi, great package! Could it made possible to set the User (like correlation-Id)?

Background is that I'm in a situation where I orchestrate some microservices (in my case with Fastapi) and not all of them have/need authentication. But if Service A calls B, C, D, ... it would be very easy to send an Header (e.g. X-User-Id) so that I can use this (like the correlation id) for my distributed logs.

Thx

@bobevenup
Copy link

you can either use https://github.com/bobbui/json-logging-python#24-log-extra-properties
or if you want it be in place of correlation-id you can override the value of CORRELATION_ID_HEADERS to add your own headers

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

No branches or pull requests

2 participants