Skip to content

Commit

Permalink
aws-sdk-lambda: DRY up region fetch
Browse files Browse the repository at this point in the history
don't attempt to determine the region twice within a single method and
simply re-use the result of the single call
  • Loading branch information
fallwith committed Nov 2, 2024
1 parent eac1423 commit 7d64822
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def generate_segment(action, options = {})

segment = NewRelic::Agent::Tracer.start_external_request_segment(
library: INSTRUMENTATION_NAME,
uri: "https://lambda.#{aws_region || 'unknown-region'}.amazonaws.com",
uri: "https://lambda.#{region || 'unknown-region'}.amazonaws.com",
procedure: action
)
segment.name = "External/Lambda/#{action}/#{function}"
Expand Down

0 comments on commit 7d64822

Please sign in to comment.