File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 2727
2828# metadata: Additional metadata to send with the logs
2929metadata = {
30- "aws" : {
31- "type" : "s3_logs"
32- },
3330 "ddsourcecategory" : "aws" ,
3431}
3532
4037
4138
4239DD_SOURCE = "ddsource"
40+ DD_CUSTOM_TAGS = "ddtags"
4341
4442def lambda_handler (event , context ):
4543 # Check prerequisites
@@ -59,10 +57,10 @@ def lambda_handler(event, context):
5957 if "aws" not in metadata :
6058 metadata ["aws" ] = {}
6159 aws_meta = metadata ["aws" ]
62- aws_meta ["function_name" ] = context .function_name
6360 aws_meta ["function_version" ] = context .function_version
6461 aws_meta ["invoked_function_arn" ] = context .invoked_function_arn
65- aws_meta ["memory_limit_in_mb" ] = context .memory_limit_in_mb
62+ #Add custom tags here by adding new value with the following format "key1:value1, key2:value2" - might be subject to modifications
63+ metadata [DD_CUSTOM_TAGS ] = "functionname:" + context .function_name + ",memorysize:" + context .memory_limit_in_mb
6664
6765
6866 try :
You can’t perform that action at this time.
0 commit comments