Skip to content

Commit

Permalink
PR refinement
Browse files Browse the repository at this point in the history
  • Loading branch information
nine5two7 committed Nov 15, 2023
1 parent 02fb936 commit 70bc635
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 1,015 deletions.
8 changes: 4 additions & 4 deletions aws/logs_monitoring/customized_log_group.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import re

"""
A customized log group is a log group shared by multiple applications of the same type. Based on the feedback from AWS, customers may name
the log group arbitrually. E.g they can name a lambda log group as "/aws/vendedlogs/states/**" which is typically used for Stepfunctions
In addition, potentially, not just Lambda, any other AWS services can use customized log group.
The workaround is to parse the logstream_name to know the source of logs.
Customized log group is a log group shared by multiple applications of the same type. Based on the feedback from AWS,
customers may name the log group arbitrually. E.g they can name a lambda log group as "/aws/vendedlogs/states/**", which is typically used for Stepfunctions
In addition, potentially, not just Lambda, any other AWS services can use a customized log group.
The workaround is to parse the logstream_name to get the source of logs.
"""

# Example: "2023/11/06/test-customized-log-group1[$LATEST]13e304cba4b9446eb7ef082a00038990"
Expand Down
2 changes: 1 addition & 1 deletion aws/logs_monitoring/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ def process_lambda_logs(logs, aws_attributes, context, metadata):
metadata[DD_CUSTOM_TAGS] += ",env:none"


# The lambda function name can be inferred from either a customized logstream name, or loggroup name
# The lambda function name can be inferred from either a customized logstream name, or a loggroup name
def get_lower_cased_lambda_function_name(logs):
logstream_name = logs["logStream"]
# function name parsed from logstream is preferred for handling some edge cases
Expand Down

This file was deleted.

Loading

0 comments on commit 70bc635

Please sign in to comment.