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
Configure PII Anonymization for logs #12492
Conversation
befc166
to
802726b
Compare
802726b
to
4ab4ffd
Compare
75d5c74
to
00c0a33
Compare
2a03fdd
to
deea9e5
Compare
deea9e5
to
f78e9e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work 😎 ! Some tiny comments from me.
41162b1
to
197b69b
Compare
e2b20ae
to
4ce3dcd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to take another look at all the logs to make sure they're not using event
as kwarg and discovered a few places that should be updated 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one thing to consider for the future: some of the log messages are actually intended for our users - for them it would be be better to have natural language text in addition to the event name but can prob be tackled in another PR
@tmbo Can that be added as an extra key to structlog? say If that's all that's required, I'll prefer to make the changes in this PR. |
Yes I think an additional attribute should work. We can then sublcass the class HumanConsoleRenderer(ConsoleRenderer):
def __call__(
self, logger: WrappedLogger, name: str, event_dict: EventDict
) -> str:
if "event_info" in event_dict:
event_key = event_dict["event"]
event_dict["event"] = event_dict["event_info"]
event_dict["event_key"] = event_key
return super(ConsoleRenderer).__call__(logger, name, event_dict) and then use that instead of the console renderer in the structlog config. this would use the info key as the text line for console output but keep the event key for structured logging in json, e.g. on a server |
49f0ac4
to
cf464a1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a small nitpick.
cf464a1
to
26bd0e5
Compare
26bd0e5
to
8a559a9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💥
🚀 A preview of the docs have been deployed at the following URL: https://12492--rasahq-docs-rasa-v2.netlify.app/docs/rasa |
Proposed changes:
Status (please check what you already did):
black
(please check Readme for instructions)