Skip to content

Commit

Permalink
Minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tippmar-nr committed Dec 5, 2024
1 parent 3d071bc commit 3c67d82
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,10 @@ public static AfterWrappedMethodDelegate HandleDynamoDbRequest(InstrumentedMetho
// has a TableName property
string model = request.TableName;

// TODO: The entity relationship docs suggest cloud.resource_id should be a span attribute, so maybe we added it to the DataStore segment below instead??
// get the arn and send it in an attribute - used for entity relationship linking
var arn = builder.Build("dynamodb", $"table/{model}");
if (!string.IsNullOrEmpty(arn))
transaction.AddCloudSdkAttribute("cloud.resource_id", arn);
else
{
agent.Logger.Debug($"Unable to build ARN for DynamoDB request. ArnBuilder reports: {builder}");
}

var segment = transaction.StartDatastoreSegment(instrumentedMethodCall.MethodCall, new ParsedSqlStatement(DatastoreVendor.DynamoDB, model, operation), isLeaf: true);

Expand Down

0 comments on commit 3c67d82

Please sign in to comment.