Redaction blocked_values not working #23804
Unanswered
manishmahajan123
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am not able to make the redaction blocked_values work. Even the allowed_keys are not working. It's displaying all the keys.
Here is what my log looks like(2 lines of logs, starts with datetime stamp):
2023-06-14 00:00:00.0234|Thread: 24| INFO|[engineid: 2][engineID: 2]
4111222233334444
2023-06-14 00:06:26.0568|Thread: 19|DEBUG|[engineid: 2][engineID: 2]
Decisioning/QueueAutoUnassign : Number of Apps to process - 0
and here is my config.yml file
receivers: filelog: include: [ C:\workspace\Test21.log ] start_at: beginning encoding: utf-8 multiline: line_start_pattern: '(?P<date>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{4})' operators: - type: regex_parser regex: '^(?P<date>([^|]+))\|(?P<thread>([^|]+))\|(?P<info>([^|]+))\|(?P<engine>(\[(.*?)\]))(?P<engine2>(\[(.*?)\])) \r\n(?P<logdata>(.*))' timestamp: parse_from: body.date layout: '%Y-%m-%d' exporters: logging: loglevel: error file: path: C:\workspace\parsedTest.log service: pipelines: logs: receivers: - filelog exporters: - file processors: redaction: allow_all_keys: false allowed_keys: - date - logdata blocked_values: - "4[0-9]{12}(?:[0-9]{3})?" summary: debug
and here is the output
{ "resourceLogs": [ { "resource": {}, "scopeLogs": [ { "scope": {}, "logRecords": [ { "observedTimeUnixNano": "1687930846808141400", "body": { "stringValue": "2023-06-14 00:00:00.0234|Thread: 24| INFO|[engineid: 2][engineID: 2] \r\4111222233334444" }, "attributes": [ { "key": "engine", "value": { "stringValue": "[engineid: 2]" } }, { "key": "engine2", "value": { "stringValue": "[engineID: 2]" } }, { "key": "aws_account_id", "value": { "stringValue": "280668260844" } }, { "key": "log.file.name", "value": { "stringValue": "Test21.log" } }, { "key": "logdata", "value": { "stringValue": "4111222233334444" } }, { "key": "date", "value": { "stringValue": "2023-06-14 00:00:00.0234" } }, { "key": "thread", "value": { "stringValue": "Thread: 24" } }, { "key": "info", "value": { "stringValue": " INFO" } } ], "traceId": "", "spanId": "" }, { "observedTimeUnixNano": "1687930846808344600", "body": { "stringValue": "2023-06-14 00:06:26.0568|Thread: 19|DEBUG|[engineid: 2][engineID: 2] \r\nDecisioning/QueueAutoUnassign : Number of Apps to process - 0" }, "attributes": [ { "key": "logdata", "value": { "stringValue": "Decisioning/QueueAutoUnassign : Number of Apps to process - 0" } }, { "key": "date", "value": { "stringValue": "2023-06-14 00:06:26.0568" } }, { "key": "thread", "value": { "stringValue": "Thread: 19" } }, { "key": "info", "value": { "stringValue": "DEBUG" } }, { "key": "aws_account_id", "value": { "stringValue": "280668260844" } }, { "key": "log.file.name", "value": { "stringValue": "Test21.log" } }, { "key": "engine", "value": { "stringValue": "[engineid: 2]" } }, { "key": "engine2", "value": { "stringValue": "[engineID: 2]" } } ], "traceId": "", "spanId": "" } ] } ] } ] }
Please advise. Thanks
Beta Was this translation helpful? Give feedback.
All reactions