File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
aws-opentelemetry-distro/src/amazon/opentelemetry/distro/patches Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,12 @@ def _apply_botocore_lambda_patch() -> None:
6262
6363 def patch_extract_attributes (self , attributes : _AttributeMapT ):
6464 old_extract_attributes (self , attributes )
65- function_name = self ._call_context .params .get ("FunctionName" )
66- if function_name :
65+ # This param can be passed as an arn or a name. We standardize it to be the name.
66+ function_name_param = self ._call_context .params .get ("FunctionName" )
67+ if function_name_param :
68+ function_name = function_name_param
69+ if function_name_param .startswith ("arn:aws:lambda:" ):
70+ function_name = function_name_param .split (":" )[- 1 ]
6771 attributes [AWS_LAMBDA_FUNCTION_NAME ] = function_name
6872 resource_mapping_id = self ._call_context .params .get ("UUID" )
6973 if resource_mapping_id :
You can’t perform that action at this time.
0 commit comments