Skip to content

Commit

Permalink
To support extra delimiters for SF execution_arn
Browse files Browse the repository at this point in the history
  • Loading branch information
nine5two7 committed Oct 27, 2023
1 parent 4bf27da commit e922e9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws/logs_monitoring/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,9 @@ def awslogs_handler(event, context, metadata):
message = json.loads(logs["logEvents"][0]["message"])
if message.get("execution_arn") is not None:
execution_arn = message["execution_arn"]
arn_tokens = execution_arn.split(":")
arn_tokens = re.split(r"[:/\\]", execution_arn)
arn_tokens[5] = "stateMachine"
metadata[DD_HOST] = ":".join(arn_tokens[:-1])
metadata[DD_HOST] = ":".join(arn_tokens[:7])
state_machine_arn = ":".join(arn_tokens[:7])
except Exception as e:
logger.debug(
Expand Down

0 comments on commit e922e9e

Please sign in to comment.