@fluidframework/runtime-utils 2.74.0 → 2.80.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,7 +32,11 @@ import type {
32
32
  ISummarizeResult,
33
33
  ITelemetryContextExt,
34
34
  } from "@fluidframework/runtime-definitions/internal";
35
- import { gcDataBlobKey } from "@fluidframework/runtime-definitions/internal";
35
+ import {
36
+ currentSummarizeStepPrefix,
37
+ currentSummarizeStepPropertyName,
38
+ gcDataBlobKey,
39
+ } from "@fluidframework/runtime-definitions/internal";
36
40
  import type { TelemetryEventPropertyTypeExt } from "@fluidframework/telemetry-utils/internal";
37
41
 
38
42
  /**
@@ -520,14 +524,18 @@ export class TelemetryContext implements ITelemetryContext, ITelemetryContextExt
520
524
  }
521
525
 
522
526
  /**
523
- * {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.get}
527
+ * Get the telemetry data being tracked
528
+ * @param prefix - unique prefix to tag this data with (ex: "fluid:map:")
529
+ * @param property - property name of the telemetry data being tracked (ex: "DirectoryCount")
530
+ * @returns undefined if item not found
524
531
  */
525
532
  public get(prefix: string, property: string): TelemetryEventPropertyTypeExt {
526
533
  return this.telemetry.get(`${prefix}${property}`);
527
534
  }
528
535
 
529
536
  /**
530
- * {@inheritDoc @fluidframework/runtime-definitions#ITelemetryContext.serialize}
537
+ * Returns a serialized version of all the telemetry data.
538
+ * Should be used when logging in telemetry events.
531
539
  */
532
540
  public serialize(): string {
533
541
  const jsonObject = {};
@@ -536,6 +544,14 @@ export class TelemetryContext implements ITelemetryContext, ITelemetryContextExt
536
544
  }
537
545
  return JSON.stringify(jsonObject);
538
546
  }
547
+
548
+ public getCurrentSummarizeStep(): TelemetryEventPropertyTypeExt {
549
+ return this.get(currentSummarizeStepPrefix, currentSummarizeStepPropertyName);
550
+ }
551
+
552
+ public setCurrentSummarizeStep(value: TelemetryEventPropertyTypeExt): void {
553
+ this.set(currentSummarizeStepPrefix, currentSummarizeStepPropertyName, value);
554
+ }
539
555
  }
540
556
 
541
557
  /**