Skip to content

Commit c040d12

Browse files
committed
address code review feedback. Moving to classmethod from staticmethod.
1 parent d1a2603 commit c040d12

File tree

1 file changed

+3
-3
lines changed
  • instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions

1 file changed

+3
-3
lines changed

instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/extensions/lmbd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ def extract_attributes(
7777
)
7878
attributes[SpanAttributes.FAAS_INVOKED_REGION] = call_context.region
7979

80-
@staticmethod
81-
def _parse_function_name(call_context: _AwsSdkCallContext):
80+
@classmethod
81+
def _parse_function_name(cls, call_context: _AwsSdkCallContext):
8282
function_name_or_arn = call_context.params.get("FunctionName")
8383
if function_name_or_arn is None:
8484
return None
85-
matches = _OpInvoke.ARN_LAMBDA_PATTERN.match(function_name_or_arn)
85+
matches = cls.ARN_LAMBDA_PATTERN.match(function_name_or_arn)
8686
if matches:
8787
function_name = matches.group(1)
8888
return function_name if function_name else function_name_or_arn

0 commit comments

Comments
 (0)