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

Performant in-process log stripping #76

Closed
davidmarkclements opened this issue Jul 28, 2016 · 17 comments
Closed

Performant in-process log stripping #76

davidmarkclements opened this issue Jul 28, 2016 · 17 comments

Comments

@davidmarkclements
Copy link
Member

Sometimes we want to avoid logging sensitive information, post processing isn't ideal for this case so it must be done in process.

We can achieve this with a serialiser generator, which should be a separate module

Once created we can add a section to the readme about handling sensitive info

Cc @mcollina @emilyrose

@mcollina
Copy link
Member

We need to support this in the web framework modules too!

@XVincentX
Copy link
Contributor

This is the only thing that is preventing us from seriously evaluate this tool!
Looking forward!

@mcollina
Copy link
Member

@XVincentX, this is already possible, but probably not easy nor documented :D.

@davidmarkclements we should test this in the context of hapi-pino and pino-http. Probably we need options added there too.

@davidmarkclements
Copy link
Member Author

@XVincentX got a first pass going on here https://github.com/davidmarkclements/pino-noir won't be long coming :)

@davidmarkclements
Copy link
Member Author

@mcollina agreed - maybe pino-noir should be included in pino-http and hapi-pino by default and just pass a filter object through - is that your position?

@davidmarkclements
Copy link
Member Author

Ok, https://github.com/davidmarkclements/pino-noir is fully working, version 0.0.1 publish to npm too

Works for top level keys and nested keys, does not yet support wildcards, we need to run benchmarks & profile but it should be quite fast since we avoid copying objects to redact nested values by piggy backing on the subsequent JSON.stringify loop

@emilyrose would love to get your feedback for pino-noir API

@davidmarkclements
Copy link
Member Author

davidmarkclements commented Jul 30, 2016

@mcollina - just to say, since all inputs are strings (or array of strings), we can obv go faster by removing closure scope and compiling a string and passing to new Function, and again apply this same thinking to _.get and _.set - however, I'd like to benchmark the diff if it's not significant enough I'd rather not use new Function

@XVincentX
Copy link
Contributor

That sounds great. Let me marinate the new things and I'll give it a try.

@UnidentifiedContributor
Copy link

@davidmarkclements, just now getting back to GitHub.

It looks beautiful! I love it.

@davidmarkclements
Copy link
Member Author

@emilyrose - I've started on wildcard functionality on the plane, it's not quite there - my time is limited next couple of days so - I'll push anyway in case you want to bring it to land (@XVincentX feel free to PR too!) - immediate steps after that are setting up an integration benchmark, we can copy the object logging benchmarks from pino, and put pino-noir in the middle to benchmark general usage, and wildcard usage

@XVincentX
Copy link
Contributor

I'd love to but I am not sure I'm the right person (time/competencies ratio) to do that!

@mcollina
Copy link
Member

@davidmarkclements what's the status of this?

@davidmarkclements
Copy link
Member Author

it needs a few hours input to get wildcard done - just need the time

@davidmarkclements
Copy link
Member Author

davidmarkclements commented Oct 3, 2016

done :)

http://npm.im/pino-noir

@davidmarkclements
Copy link
Member Author

oh wait, need to add to pino readme - doing

@davidmarkclements
Copy link
Member Author

Oh yah this is done

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants