@@ -491,16 +491,7 @@ private DRSAccessURL getAccessURL(
491
491
492
492
BillingProfileModel billingProfileModel = cachedSnapshot .datasetBillingProfileModel ;
493
493
494
- loggingMetrics .set (BardEventProperties .DATASET_ID_FIELD_NAME , cachedSnapshot .getDatasetId ());
495
- loggingMetrics .set (
496
- BardEventProperties .DATASET_NAME_FIELD_NAME , cachedSnapshot .getDatasetName ());
497
- loggingMetrics .set (BardEventProperties .SNAPSHOT_ID_FIELD_NAME , snapshotId );
498
- loggingMetrics .set (BardEventProperties .SNAPSHOT_NAME_FIELD_NAME , cachedSnapshot .getName ());
499
- loggingMetrics .set (
500
- BardEventProperties .BILLING_PROFILE_ID_FIELD_NAME ,
501
- cachedSnapshot .getSnapshotBillingProfileId ());
502
- loggingMetrics .set (
503
- BardEventProperties .CLOUD_PLATFORM_FIELD_NAME , cachedSnapshot .getCloudPlatform ());
494
+ logAdditionalProperties (cachedSnapshot );
504
495
505
496
assertAccessMethodMatchingAccessId (accessId , drsObject );
506
497
@@ -526,6 +517,23 @@ private DRSAccessURL getAccessURL(
526
517
}
527
518
}
528
519
520
+ /**
521
+ * Include additional properties in the event log sent to Bard
522
+ * @param cachedSnapshot
523
+ */
524
+ private void logAdditionalProperties (SnapshotCacheResult cachedSnapshot ) {
525
+ loggingMetrics .set (BardEventProperties .DATASET_ID_FIELD_NAME , cachedSnapshot .getDatasetId ());
526
+ loggingMetrics .set (
527
+ BardEventProperties .DATASET_NAME_FIELD_NAME , cachedSnapshot .getDatasetName ());
528
+ loggingMetrics .set (BardEventProperties .SNAPSHOT_ID_FIELD_NAME , cachedSnapshot .getId ());
529
+ loggingMetrics .set (BardEventProperties .SNAPSHOT_NAME_FIELD_NAME , cachedSnapshot .getName ());
530
+ loggingMetrics .set (
531
+ BardEventProperties .BILLING_PROFILE_ID_FIELD_NAME ,
532
+ cachedSnapshot .getSnapshotBillingProfileId ());
533
+ loggingMetrics .set (
534
+ BardEventProperties .CLOUD_PLATFORM_FIELD_NAME , cachedSnapshot .getCloudPlatform ());
535
+ }
536
+
529
537
@ VisibleForTesting
530
538
DrsId resolveDrsObjectId (String drsObjectId ) {
531
539
// If the drsObjectId is not a TDR generated DRS ID, then assume it's an alias and resolve it
0 commit comments