Open
Description
There are cases where we want to log input parameters but we need to process them before logging them. This happens when they might contain sensitive information. For example, in ploomber-engine, users can pass arbitrary parameters to a notebook. However, the values might contain sensitive data, so we only want to log the parameters' keys.
We can add something like this:
@telemetry.log_call(log_args=True, preprocessors={"parameters": lambda params: list(parameters)})
def do_stuff(parameters):
pass
Then, when calling:
do_stuff(parameters={"key": "value", "key_another": "value_another"})
We log: ["key", "key_another"]
Metadata
Metadata
Assignees
Labels
No labels