fix: remove sensitive telemetry from logs and metrics - #197
Draft
niko-kriznik-globtim wants to merge 4 commits into
Draft
fix: remove sensitive telemetry from logs and metrics#197niko-kriznik-globtim wants to merge 4 commits into
niko-kriznik-globtim wants to merge 4 commits into
Conversation
Remove payload, position, URL, and DevEUI fields from AWS and LoRaCloud logging, drop identifying Prometheus labels, and add privacy canary tests.
Log only route, method, status, and duration for HTTP requests, route server errors through a safe ErrorLog, and write CLI JSON to stdout.
Replace log.Printf result dumps with fmt output so examples do not mix decoded payloads into application logs.
Contributor
Author
|
@coderabbitai review |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
internal/loggerand route HTTP server errors through a safeErrorLog.devEui,base_url, and payload-derived TLV metric labels; add privacy canary tests.Closes truvami/bridge#125
Test plan
go test ./...internal/logger,cmd,pkg/common, andpkg/solverdecoder http --healthand confirm access logs omit query strings, DevEUI, and payloadsdecoder tagsl 1 <payload> --jsonand confirm JSON is written to stdout only/metricsand confirm LoRaCloud/AWS counters no longer expose device or URL labels