blocky
blocky copied to clipboard
feature: hide client ip/name in querylog
I'd like to hide the Client IP and Name in the querylog for privacy reasons.
- [x] Extend config
- [x] Fix tests
- [x] Implement for CSV etc. as well
- [x] Move logic to QueryLoggingResolver.writeLog~~Resolve or LogEntry~~
Codecov Report
Merging #575 (61175b7) into development (3009eec) will increase coverage by
0.02%
. The diff coverage is100.00%
.
:exclamation: Current head 61175b7 differs from pull request most recent head 6751c15. Consider uploading reports for the commit 6751c15 to get more accurate results
@@ Coverage Diff @@
## development #575 +/- ##
===============================================
+ Coverage 92.74% 92.76% +0.02%
===============================================
Files 37 37
Lines 3251 3260 +9
===============================================
+ Hits 3015 3024 +9
Misses 170 170
Partials 66 66
Impacted Files | Coverage Δ | |
---|---|---|
config/config.go | 94.87% <ø> (ø) |
|
querylog/database_writer.go | 97.05% <100.00%> (+0.23%) |
:arrow_up: |
resolver/query_logging_resolver.go | 100.00% <100.00%> (ø) |
|
resolver/upstream_resolver.go | 91.15% <0.00%> (+0.12%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 3009eec...6751c15. Read the comment docs.
Thanks for your work! If I understand it right, "hideClient" is only used in databaseWriter (mysql and postgres), but not for CSV and console. I think, it would also make sense to hide client for all logging types, what do you think?
Maybe we can hide or obfuscate client/IP in QueryLoggingResolver.Resolve or LogEntry?
Sounds good. I will try to implement this for CSV etc. as well.
Also moving the logic to a more central place is surely a good approach.
replaced with #766