@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.
- package/CHANGELOG.md +4 -0
- package/dist/compatibilityBase.d.ts +12 -0
- package/dist/compatibilityBase.d.ts.map +1 -1
- package/dist/compatibilityBase.js +18 -4
- package/dist/compatibilityBase.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/summaryUtils.d.ts +8 -2
- package/dist/summaryUtils.d.ts.map +1 -1
- package/dist/summaryUtils.js +12 -2
- package/dist/summaryUtils.js.map +1 -1
- package/lib/compatibilityBase.d.ts +12 -0
- package/lib/compatibilityBase.d.ts.map +1 -1
- package/lib/compatibilityBase.js +15 -2
- package/lib/compatibilityBase.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/summaryUtils.d.ts +8 -2
- package/lib/summaryUtils.d.ts.map +1 -1
- package/lib/summaryUtils.js +13 -3
- package/lib/summaryUtils.js.map +1 -1
- package/package.json +22 -22
- package/src/compatibilityBase.ts +28 -5
- package/src/index.ts +1 -0
- package/src/packageVersion.ts +1 -1
- package/src/summaryUtils.ts +19 -3
package/src/summaryUtils.ts
CHANGED
|
@@ -32,7 +32,11 @@ import type {
|
|
|
32
32
|
ISummarizeResult,
|
|
33
33
|
ITelemetryContextExt,
|
|
34
34
|
} from "@fluidframework/runtime-definitions/internal";
|
|
35
|
-
import {
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
/**
|