lib/new_relic/agent/instrumentation/dynamodb/instrumentation.rb in newrelic_rpm-9.10.1 vs lib/new_relic/agent/instrumentation/dynamodb/instrumentation.rb in newrelic_rpm-9.10.2

- old
+ new

@@ -47,12 +47,18 @@ def build_request_with_new_relic(*args) @nr_captured_request = yield end + def nr_account_id + return @nr_account_id if defined?(@nr_account_id) + + @nr_account_id = NewRelic::Agent::Aws.get_account_id(config) + end + def get_arn(params) - return unless params[:table_name] + return unless params[:table_name] && nr_account_id - NewRelic::Agent::Aws.create_arn(PRODUCT.downcase, "table/#{params[:table_name]}", config) + NewRelic::Agent::Aws.create_arn(PRODUCT.downcase, "table/#{params[:table_name]}", config&.region, nr_account_id) end end end