Skip to content

Commit

Permalink
fix(aws): Remove none extracted value by regex (#870)
Browse files Browse the repository at this point in the history
* fix(aws): Remove none extracted value by regex

Signed-off-by: Vincent Boutour <[email protected]>

* fixup! fix(aws): Remove none extracted value by regex

Signed-off-by: Vincent Boutour <[email protected]>

---------

Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh authored Nov 22, 2024
1 parent c95c41d commit 1109a8b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions aws/logs_monitoring/steps/handlers/s3_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import boto3
import botocore

from settings import (
CN_STRING,
DD_CUSTOM_TAGS,
Expand Down Expand Up @@ -293,8 +294,10 @@ def _extract_other_logs(self):
self.data_store.data = self.data_store.data.decode("utf-8", errors="ignore")

if self.multiline_regex_start_pattern.match(self.data_store.data):
self.data_store.data = self.multiline_regex_pattern.split(
self.data_store.data
self.data_store.data = list(
filter(
None, self.multiline_regex_pattern.split(self.data_store.data)
)
)
else:
self.logger.debug(
Expand Down

0 comments on commit 1109a8b

Please sign in to comment.