Skip to content

Commit

Permalink
fixup! feat(aws): AWSX-1388 Remove som arn extraction to move them to…
Browse files Browse the repository at this point in the history
… ingest

Signed-off-by: Vincent Boutour <vincent.boutour@datadoghq.com>
  • Loading branch information
ViBiOh committed Feb 14, 2025
1 parent d905b9c commit 44940f0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions aws/logs_monitoring/steps/handlers/awslogs_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ def set_host(self, metadata, aws_attributes):
case AwsEventSource.STEPFUNCTION:
self.handle_step_function_source(metadata, aws_attributes)

def handle_verified_access_source(self, metadata, aws_attributes):
try:
message = json.loads(aws_attributes.get_log_events()[0].get("message"))
metadata[DD_HOST] = message.get("http_request").get("url").get("hostname")
except Exception as e:
logger.debug("Unable to set verified-access log host: %s" % e)

def handle_step_function_source(self, metadata, aws_attributes):
state_machine_arn = self.get_state_machine_arn(aws_attributes)
if not state_machine_arn:
Expand Down Expand Up @@ -177,13 +184,6 @@ def get_state_machine_arn(self, aws_attributes):
logger.debug("Unable to get state_machine_arn: %s" % e)
return ""

def handle_verified_access_source(self, metadata, aws_attributes):
try:
message = json.loads(aws_attributes.get_log_events()[0].get("message"))
metadata[DD_HOST] = message.get("http_request").get("url").get("hostname")
except Exception as e:
logger.debug("Unable to set verified-access log host: %s" % e)

def process_eks_logs(self, metadata, aws_attributes):
log_stream = aws_attributes.get_log_stream()
if log_stream.startswith("kube-apiserver-audit-"):
Expand Down

0 comments on commit 44940f0

Please sign in to comment.