Skip to content

Commit

Permalink
minor polish
Browse files Browse the repository at this point in the history
  • Loading branch information
videnkz committed Oct 24, 2023
1 parent afa09e4 commit 4814585
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ protected void setTransactionTriggerData(Transaction transaction, S3Event s3Even
cloudOrigin.withRegion(s3NotificationRecord.getAwsRegion());

if (null != s3NotificationRecord.getS3()) {
if (null != s3NotificationRecord.getS3().getBucket()) {
S3EventNotification.S3BucketEntity bucket = s3NotificationRecord.getS3().getBucket();
S3EventNotification.S3BucketEntity bucket = s3NotificationRecord.getS3().getBucket();
if (null != bucket) {
ServiceOrigin serviceOrigin = transaction.getContext().getServiceOrigin();
serviceOrigin.withId(bucket.getArn());
serviceOrigin.withName(bucket.getName());
serviceOrigin.withVersion(s3NotificationRecord.getEventVersion());

transaction.withOtelAttribute("aws.s3.bucket", bucket.getName());
}
if (null != s3NotificationRecord.getS3().getObject()) {
final S3EventNotification.S3ObjectEntity object = s3NotificationRecord.getS3().getObject();
S3EventNotification.S3ObjectEntity object = s3NotificationRecord.getS3().getObject();
if (null != object) {
transaction.withOtelAttribute("aws.s3.key", object.getKey());
}
}
Expand Down

0 comments on commit 4814585

Please sign in to comment.