Skip to content

Commit c7767fa

Browse files
authored
Update fetch snapshot event to include file version (#25433)
In order to identify when a versioned document is loaded from the telemetry, add the file version to the existing event for fetch snapshot. [AB#44882](https://dev.azure.com/fluidframework/235294da-091d-4c29-84fc-cdfc3d90890b/_workitems/edit/44882)
1 parent cff569c commit c7767fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/drivers/odsp-driver/src/fetchSnapshot.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ async function fetchLatestSnapshotCore(
294294
const internalFarmType = checkForKnownServerFarmType(odspResolvedUrl.siteUrl);
295295
const isRedemptionNonDurable: boolean =
296296
odspResolvedUrl.shareLinkInfo?.isRedemptionNonDurable === true;
297+
const fileVersion = odspResolvedUrl.fileVersion ?? undefined;
297298

298299
const perfEvent = {
299300
eventName,
@@ -547,6 +548,7 @@ async function fetchLatestSnapshotCore(
547548
useLegacyFlowWithoutGroups:
548549
useLegacyFlowWithoutGroupsForSnapshotFetch(loadingGroupIds),
549550
userOps: snapshot.ops?.filter((op) => isRuntimeMessage(op)).length ?? 0,
551+
fileVersion,
550552
// Measures time to make fetch call. Should be similar to
551553
// fetchStartToResponseEndTime - receiveContentTime, i.e. it looks like it's time till first byte /
552554
// end of response headers

0 commit comments

Comments
 (0)