@fluidframework/container-runtime 2.23.0-325054 → 2.30.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 +52 -0
- package/api-report/container-runtime.legacy.alpha.api.md +0 -246
- package/dist/blobManager/blobManager.d.ts +11 -9
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +38 -39
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.d.ts +2 -4
- package/dist/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/dist/blobManager/blobManagerSnapSum.js +6 -6
- package/dist/blobManager/blobManagerSnapSum.js.map +1 -1
- package/dist/channelCollection.d.ts +1 -7
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +1 -26
- package/dist/channelCollection.js.map +1 -1
- package/dist/connectionTelemetry.d.ts +0 -43
- package/dist/connectionTelemetry.d.ts.map +1 -1
- package/dist/connectionTelemetry.js.map +1 -1
- package/dist/containerRuntime.d.ts +21 -141
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +49 -290
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +0 -13
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +2 -25
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +2 -20
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcConfigs.d.ts.map +1 -1
- package/dist/gc/gcConfigs.js +0 -2
- package/dist/gc/gcConfigs.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +8 -24
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js +1 -3
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcHelpers.d.ts.map +1 -1
- package/dist/gc/gcHelpers.js +1 -4
- package/dist/gc/gcHelpers.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +0 -1
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +4 -16
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +0 -29
- package/dist/messageTypes.d.ts.map +1 -1
- package/dist/messageTypes.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.d.ts.map +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/signalTelemetryProcessing.d.ts +33 -0
- package/dist/signalTelemetryProcessing.d.ts.map +1 -0
- package/dist/signalTelemetryProcessing.js +149 -0
- package/dist/signalTelemetryProcessing.js.map +1 -0
- package/dist/summary/documentSchema.d.ts +7 -31
- package/dist/summary/documentSchema.d.ts.map +1 -1
- package/dist/summary/documentSchema.js +2 -18
- package/dist/summary/documentSchema.js.map +1 -1
- package/dist/summary/index.d.ts +2 -1
- package/dist/summary/index.d.ts.map +1 -1
- package/dist/summary/index.js +7 -1
- package/dist/summary/index.js.map +1 -1
- package/dist/summary/orderedClientElection.d.ts +1 -3
- package/dist/summary/orderedClientElection.d.ts.map +1 -1
- package/dist/summary/orderedClientElection.js.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.d.ts +1 -3
- package/dist/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/dist/summary/runWhileConnectedCoordinator.js +2 -7
- package/dist/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/dist/summary/runningSummarizer.d.ts +1 -2
- package/dist/summary/runningSummarizer.d.ts.map +1 -1
- package/dist/summary/runningSummarizer.js +4 -23
- package/dist/summary/runningSummarizer.js.map +1 -1
- package/dist/summary/summarizer.d.ts +2 -5
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +3 -11
- package/dist/summary/summarizer.js.map +1 -1
- package/dist/summary/summarizerClientElection.d.ts.map +1 -1
- package/dist/summary/summarizerClientElection.js +0 -1
- package/dist/summary/summarizerClientElection.js.map +1 -1
- package/dist/summary/summarizerHeuristics.d.ts +1 -1
- package/dist/summary/summarizerHeuristics.d.ts.map +1 -1
- package/dist/summary/summarizerHeuristics.js.map +1 -1
- package/dist/summary/summarizerTypes.d.ts +109 -22
- package/dist/summary/summarizerTypes.d.ts.map +1 -1
- package/dist/summary/summarizerTypes.js.map +1 -1
- package/dist/summary/summaryFormat.d.ts +3 -9
- package/dist/summary/summaryFormat.d.ts.map +1 -1
- package/dist/summary/summaryFormat.js.map +1 -1
- package/dist/summary/summaryGenerator.d.ts.map +1 -1
- package/dist/summary/summaryGenerator.js +3 -9
- package/dist/summary/summaryGenerator.js.map +1 -1
- package/dist/summary/summaryHelpers.d.ts +19 -0
- package/dist/summary/summaryHelpers.d.ts.map +1 -0
- package/dist/summary/summaryHelpers.js +90 -0
- package/dist/summary/summaryHelpers.js.map +1 -0
- package/dist/summary/summaryManager.d.ts.map +1 -1
- package/dist/summary/summaryManager.js +0 -2
- package/dist/summary/summaryManager.js.map +1 -1
- package/lib/blobManager/blobManager.d.ts +11 -9
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +37 -37
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.d.ts +2 -4
- package/lib/blobManager/blobManagerSnapSum.d.ts.map +1 -1
- package/lib/blobManager/blobManagerSnapSum.js +6 -6
- package/lib/blobManager/blobManagerSnapSum.js.map +1 -1
- package/lib/channelCollection.d.ts +1 -7
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +2 -29
- package/lib/channelCollection.js.map +1 -1
- package/lib/connectionTelemetry.d.ts +0 -43
- package/lib/connectionTelemetry.d.ts.map +1 -1
- package/lib/connectionTelemetry.js.map +1 -1
- package/lib/containerRuntime.d.ts +21 -141
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +51 -298
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +0 -13
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +2 -25
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +3 -23
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcConfigs.d.ts.map +1 -1
- package/lib/gc/gcConfigs.js +0 -2
- package/lib/gc/gcConfigs.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +8 -24
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js +1 -3
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcHelpers.d.ts.map +1 -1
- package/lib/gc/gcHelpers.js +1 -4
- package/lib/gc/gcHelpers.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +0 -1
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +5 -19
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +0 -29
- package/lib/messageTypes.d.ts.map +1 -1
- package/lib/messageTypes.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.d.ts.map +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/signalTelemetryProcessing.d.ts +33 -0
- package/lib/signalTelemetryProcessing.d.ts.map +1 -0
- package/lib/signalTelemetryProcessing.js +145 -0
- package/lib/signalTelemetryProcessing.js.map +1 -0
- package/lib/summary/documentSchema.d.ts +7 -31
- package/lib/summary/documentSchema.d.ts.map +1 -1
- package/lib/summary/documentSchema.js +2 -18
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/summary/index.d.ts +2 -1
- package/lib/summary/index.d.ts.map +1 -1
- package/lib/summary/index.js +1 -0
- package/lib/summary/index.js.map +1 -1
- package/lib/summary/orderedClientElection.d.ts +1 -3
- package/lib/summary/orderedClientElection.d.ts.map +1 -1
- package/lib/summary/orderedClientElection.js.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.d.ts +1 -3
- package/lib/summary/runWhileConnectedCoordinator.d.ts.map +1 -1
- package/lib/summary/runWhileConnectedCoordinator.js +2 -7
- package/lib/summary/runWhileConnectedCoordinator.js.map +1 -1
- package/lib/summary/runningSummarizer.d.ts +1 -2
- package/lib/summary/runningSummarizer.d.ts.map +1 -1
- package/lib/summary/runningSummarizer.js +4 -23
- package/lib/summary/runningSummarizer.js.map +1 -1
- package/lib/summary/summarizer.d.ts +2 -5
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +3 -11
- package/lib/summary/summarizer.js.map +1 -1
- package/lib/summary/summarizerClientElection.d.ts.map +1 -1
- package/lib/summary/summarizerClientElection.js +0 -1
- package/lib/summary/summarizerClientElection.js.map +1 -1
- package/lib/summary/summarizerHeuristics.d.ts +1 -1
- package/lib/summary/summarizerHeuristics.d.ts.map +1 -1
- package/lib/summary/summarizerHeuristics.js.map +1 -1
- package/lib/summary/summarizerTypes.d.ts +109 -22
- package/lib/summary/summarizerTypes.d.ts.map +1 -1
- package/lib/summary/summarizerTypes.js.map +1 -1
- package/lib/summary/summaryFormat.d.ts +3 -9
- package/lib/summary/summaryFormat.d.ts.map +1 -1
- package/lib/summary/summaryFormat.js.map +1 -1
- package/lib/summary/summaryGenerator.d.ts.map +1 -1
- package/lib/summary/summaryGenerator.js +3 -9
- package/lib/summary/summaryGenerator.js.map +1 -1
- package/lib/summary/summaryHelpers.d.ts +19 -0
- package/lib/summary/summaryHelpers.d.ts.map +1 -0
- package/lib/summary/summaryHelpers.js +84 -0
- package/lib/summary/summaryHelpers.js.map +1 -0
- package/lib/summary/summaryManager.d.ts.map +1 -1
- package/lib/summary/summaryManager.js +0 -2
- package/lib/summary/summaryManager.js.map +1 -1
- package/package.json +27 -20
- package/src/blobManager/blobManager.ts +70 -62
- package/src/blobManager/blobManagerSnapSum.ts +7 -9
- package/src/channelCollection.ts +3 -31
- package/src/connectionTelemetry.ts +0 -51
- package/src/containerRuntime.ts +111 -522
- package/src/dataStoreContext.ts +2 -32
- package/src/gc/garbageCollection.ts +9 -26
- package/src/gc/gcConfigs.ts +3 -6
- package/src/gc/gcDefinitions.ts +10 -28
- package/src/gc/gcHelpers.ts +0 -5
- package/src/gc/gcSummaryStateTracker.ts +1 -2
- package/src/gc/gcTelemetry.ts +6 -13
- package/src/index.ts +6 -6
- package/src/messageTypes.ts +0 -2
- package/src/packageVersion.ts +1 -1
- package/src/signalTelemetryProcessing.ts +233 -0
- package/src/summary/documentSchema.ts +7 -38
- package/src/summary/index.ts +12 -0
- package/src/summary/orderedClientElection.ts +1 -3
- package/src/summary/runWhileConnectedCoordinator.ts +3 -8
- package/src/summary/runningSummarizer.ts +12 -20
- package/src/summary/summarizer.ts +6 -18
- package/src/summary/summarizerClientElection.ts +0 -2
- package/src/summary/summarizerHeuristics.ts +1 -2
- package/src/summary/summarizerTypes.ts +119 -23
- package/src/summary/summaryFormat.ts +4 -13
- package/src/summary/summaryGenerator.ts +1 -8
- package/src/summary/summaryHelpers.ts +118 -0
- package/src/summary/summaryManager.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gcTelemetry.js","sourceRoot":"","sources":["../../src/gc/gcTelemetry.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,uEAMkD;AAMlD,yDAO4B;AA8E5B;;;;;;;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AAC,SAAS,CAAC;gBACjF,MAAM,KAAK,GAAG;oBACb,SAAS,EAAE,GAAG,KAAK,UAAU,SAAS,EAAE;oBACxC,EAAE;oBACF,MAAM;oBACN,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE;oBACvB,OAAO,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,eAAe,EAAE;oBACjD,SAAS;oBACT,GAAG,IAAA,2BAAgB,EAAC;wBACnB,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC;wBACnB,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC;qBAC3B,CAAC;iBACF,CAAC;gBAEF,wGAAwG;gBACxG,4DAA4D;gBAC5D,MAAM,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAClC,CAAC;QACF,CAAC;QACD,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;IAC9B,CAAC;CACD;AA5UD,gDA4UC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Tagged } from \"@fluidframework/core-interfaces\";\nimport { IGarbageCollectionData } from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tITelemetryLoggerExt,\n\tMonitoringContext,\n\tgenerateStack,\n\ttagCodeArtifacts,\n\ttype ITelemetryPropertiesExt,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport { RuntimeHeaderData } from \"../containerRuntime.js\";\n// eslint-disable-next-line import/no-deprecated\nimport { ICreateContainerMetadata } from \"../summary/index.js\";\n\nimport {\n\t// eslint-disable-next-line import/no-deprecated\n\tGCFeatureMatrix,\n\t// eslint-disable-next-line import/no-deprecated\n\tGCNodeType,\n\tIGarbageCollectorConfigs,\n\tUnreferencedState,\n} from \"./gcDefinitions.js\";\nimport { UnreferencedStateTracker } from \"./gcUnreferencedStateTracker.js\";\n\ntype NodeUsageType = \"Changed\" | \"Loaded\" | \"Revived\" | \"Realized\";\n\n/**\n * Properties that are common to IUnreferencedEventProps and INodeUsageProps\n */\ninterface ICommonProps {\n\tusageType: NodeUsageType;\n\tcompletedGCRuns: number;\n\tisTombstoned: boolean;\n\tlastSummaryTime?: number;\n\theaders?: RuntimeHeaderData;\n\tadditionalProps?: ITelemetryPropertiesExt;\n}\n\n/**\n * The event that is logged when unreferenced node is used after a certain time.\n */\n// eslint-disable-next-line import/no-deprecated\ninterface IUnreferencedEventProps extends ICreateContainerMetadata, ICommonProps {\n\t/**\n\t * The id that GC uses to track the node. May or may not match id\n\t */\n\ttrackedId: string;\n\tstate: UnreferencedState;\n\t/**\n\t * The full path (in GC Path format) to the node in question\n\t */\n\tid: Tagged<string>;\n\tfromId?: Tagged<string>;\n\t// eslint-disable-next-line import/no-deprecated\n\ttype: GCNodeType;\n\tunrefTime: number;\n\tage: number;\n\t// Expanding GC feature matrix. Without doing this, the configs cannot be logged in telemetry directly.\n\tgcConfigs: Omit<IGarbageCollectorConfigs, \"persistedGcFeatureMatrix\"> & {\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\t[K in keyof GCFeatureMatrix]: GCFeatureMatrix[K];\n\t};\n\ttimeout?: number;\n}\n\n/**\n * Properties passed to nodeUsed function when a node is used.\n */\ninterface INodeUsageProps extends ICommonProps {\n\t/**\n\t * The full path (in GC Path format) to the node in question\n\t */\n\tid: string;\n\t/**\n\t * Latest timestamp received from the server, as a baseline for computing GC state/age\n\t */\n\tcurrentReferenceTimestampMs: number;\n\t/**\n\t * The package path of the node. This may not be available if the node hasn't been loaded yet\n\t */\n\tpackagePath: readonly string[] | undefined;\n\t/**\n\t * In case of Revived - what node added the reference?\n\t */\n\tfromId?: string;\n\t/**\n\t * In case of Revived - was it revived due to autorecovery?\n\t */\n\tautorecovery?: true;\n\t/**\n\t * URL (including query string) if this usage came from a request\n\t */\n\trequestUrl?: string;\n\t/**\n\t * Original request headers if this usage came from a request or handle.get\n\t */\n\trequestHeaders?: string;\n}\n\n/**\n * Encapsulates the logic that tracks the various telemetry logged by the Garbage Collector.\n *\n * These events are not logged as errors, just generic events, since there can be false positives:\n *\n * 1. inactiveObject telemetry - When an inactive node is used - A node that has been unreferenced for inactiveTimeoutMs.\n * 2. tombstoneReadyObject telemetry - When a tombstone-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs.\n * 3. sweepReadyObject telemetry - When a sweep-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs + sweepGracePeriodMs.\n *\n * These events are logged as errors since they are based on the core GC logic:\n *\n * 1. Tombstone telemetry - When a tombstoned node is used - A node that has been marked as tombstone.\n * 2. Unknown outbound reference telemetry - When a node is referenced but GC was not notified of it when the new reference appeared.\n *\n * Note: The telemetry for a Deleted node being used is logged elsewhere in this package.\n */\nexport class GCTelemetryTracker {\n\t// Keeps track of unreferenced events that are logged for a node. This is used to limit the log generation to one\n\t// per event per node.\n\tprivate readonly loggedUnreferencedEvents: Set<string> = new Set();\n\t// Queue for unreferenced events that should be logged the next time GC runs.\n\tprivate pendingEventsQueue: IUnreferencedEventProps[] = [];\n\n\tconstructor(\n\t\tprivate readonly mc: MonitoringContext,\n\t\tprivate readonly configs: IGarbageCollectorConfigs,\n\t\tprivate readonly isSummarizerClient: boolean,\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tprivate readonly createContainerMetadata: ICreateContainerMetadata,\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tprivate readonly getNodeType: (nodeId: string) => GCNodeType,\n\t\tprivate readonly getNodeStateTracker: (\n\t\t\tnodeId: string,\n\t\t) => UnreferencedStateTracker | undefined,\n\t\tprivate readonly getNodePackagePath: (\n\t\t\tnodePath: string,\n\t\t) => Promise<readonly string[] | undefined>,\n\t) {}\n\n\t/**\n\t * Returns whether an event should be logged for a node that isn't active anymore.\n\t *\n\t * @remarks\n\t * This does not apply to tombstoned nodes for which an event is always logged. Some scenarios where we won't log:\n\t *\n\t * 1. When a DDS is changed. The corresponding data store's event will be logged instead.\n\t *\n\t * 2. An event is logged only once per container instance per event per node.\n\t */\n\tprivate shouldLogNonActiveEvent(\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tnodeType: GCNodeType,\n\t\tusageType: NodeUsageType,\n\t\tnodeStateTracker: UnreferencedStateTracker,\n\t\tuniqueEventId: string,\n\t): boolean {\n\t\tif (nodeStateTracker.state === UnreferencedState.Active) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tif (nodeType === GCNodeType.Other) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// For sub data store (DDS) nodes, if they are changed, its data store will also be changed,\n\t\t// so skip logging to make the telemetry less noisy.\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tif (nodeType === GCNodeType.SubDataStore && usageType === \"Changed\") {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Non-tombstone events are logged once per event per node. A unique id is generated by joining\n\t\t// node state (inactive / sweep ready), node's id and usage (loaded / changed / revived).\n\t\tif (this.loggedUnreferencedEvents.has(uniqueEventId)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Called when a node is used. If the node is inactive or tombstoned, log telemetry indicating object is used\n\t * when it should not have been.\n\t * @param trackedId - The id that GC uses to track the node. For SubDataStore nodes, this should be the DataStore ID.\n\t * @param INodeUsageProps - All kind of details about this event to be logged\n\t */\n\tpublic nodeUsed(\n\t\ttrackedId: string,\n\t\t{\n\t\t\tusageType,\n\t\t\tcurrentReferenceTimestampMs,\n\t\t\tpackagePath,\n\t\t\tid: untaggedId,\n\t\t\tfromId: untaggedFromId,\n\t\t\tisTombstoned,\n\t\t\t...otherNodeUsageProps\n\t\t}: INodeUsageProps,\n\t): void {\n\t\t// Note: For SubDataStore Load usage, trackedId will be the DataStore's id, not the full path in question.\n\t\t// This is necessary because the SubDataStore path may be unrecognized by GC (if suited for a custom request handler)\n\t\tconst nodeStateTracker = this.getNodeStateTracker(trackedId);\n\t\tconst nodeType = this.getNodeType(untaggedId);\n\n\t\tconst timeout = (() => {\n\t\t\tswitch (nodeStateTracker?.state) {\n\t\t\t\tcase UnreferencedState.Inactive: {\n\t\t\t\t\treturn this.configs.inactiveTimeoutMs;\n\t\t\t\t}\n\t\t\t\tcase UnreferencedState.TombstoneReady: {\n\t\t\t\t\treturn this.configs.tombstoneTimeoutMs;\n\t\t\t\t}\n\t\t\t\tcase UnreferencedState.SweepReady: {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tthis.configs.tombstoneTimeoutMs &&\n\t\t\t\t\t\tthis.configs.tombstoneTimeoutMs + this.configs.sweepGracePeriodMs\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t})();\n\t\tconst { persistedGcFeatureMatrix, ...configs } = this.configs;\n\t\tconst unrefEventProps = {\n\t\t\ttrackedId,\n\t\t\ttype: nodeType,\n\t\t\tunrefTime: nodeStateTracker?.unreferencedTimestampMs ?? -1,\n\t\t\tage:\n\t\t\t\tnodeStateTracker === undefined\n\t\t\t\t\t? -1\n\t\t\t\t\t: currentReferenceTimestampMs - nodeStateTracker.unreferencedTimestampMs,\n\t\t\ttimeout,\n\t\t\tisTombstoned,\n\t\t\t...tagCodeArtifacts({ id: untaggedId, fromId: untaggedFromId }),\n\t\t\t...otherNodeUsageProps,\n\t\t\t...this.createContainerMetadata,\n\t\t\tgcConfigs: { ...configs, ...persistedGcFeatureMatrix },\n\t\t} satisfies Omit<IUnreferencedEventProps, \"state\" | \"usageType\"> &\n\t\t\ttypeof otherNodeUsageProps;\n\n\t\t// If the node that is used is tombstoned, log a tombstone telemetry.\n\t\tif (isTombstoned) {\n\t\t\tthis.logTombstoneUsageTelemetry(unrefEventProps, nodeType, usageType, packagePath);\n\t\t}\n\n\t\t// After logging tombstone telemetry, if the node's unreferenced state is not tracked, there is nothing\n\t\t// else to log.\n\t\tif (nodeStateTracker === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst state = nodeStateTracker.state;\n\t\tconst uniqueEventId = `${state}-${untaggedId}-${usageType}`;\n\n\t\tif (!this.shouldLogNonActiveEvent(nodeType, usageType, nodeStateTracker, uniqueEventId)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add the unique event id so that we don't generate a log for this event again in this session.\n\t\tthis.loggedUnreferencedEvents.add(uniqueEventId);\n\n\t\t// For summarizer client, queue the event so it is logged the next time GC runs if the event is still valid.\n\t\t// For non-summarizer client, log the event now since GC won't run on it. This may result in false positives\n\t\t// but it's a good signal nonetheless and we can consume it with a grain of salt.\n\t\t// Inactive errors are usages of Objects that are unreferenced for at least a period of 7 days.\n\t\t// SweepReady errors are usages of Objects that will be deleted by GC Sweep!\n\t\tif (this.isSummarizerClient) {\n\t\t\tthis.pendingEventsQueue.push({\n\t\t\t\t...unrefEventProps, // Note: Contains some properties from INodeUsageProps as well\n\t\t\t\tusageType,\n\t\t\t\tstate,\n\t\t\t});\n\t\t} else {\n\t\t\t// For non-summarizer clients, only log \"Loaded\" type events since these objects may not be loaded in the\n\t\t\t// summarizer clients if they are based off of user actions (such as scrolling to content for these objects)\n\t\t\t// Events generated:\n\t\t\t// InactiveObject_Loaded, SweepReadyObject_Loaded\n\t\t\tif (usageType === \"Loaded\") {\n\t\t\t\tconst { id, fromId, headers, gcConfigs, additionalProps, ...detailedProps } =\n\t\t\t\t\tunrefEventProps;\n\t\t\t\tconst event = {\n\t\t\t\t\teventName: `${state}Object_${usageType}`,\n\t\t\t\t\t...tagCodeArtifacts({ pkg: packagePath?.join(\"/\") }),\n\t\t\t\t\tstack: generateStack(),\n\t\t\t\t\tid,\n\t\t\t\t\tfromId,\n\t\t\t\t\theaders: { ...headers },\n\t\t\t\t\tdetails: { ...detailedProps, ...additionalProps },\n\t\t\t\t\tgcConfigs,\n\t\t\t\t};\n\n\t\t\t\t// These are logged as generic events and not errors because there can be false positives. The Tombstone\n\t\t\t\t// and Delete errors are separately logged and are reliable.\n\t\t\t\tthis.mc.logger.sendTelemetryEvent(event);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Logs telemetry when a tombstoned object is changed, revived or loaded.\n\t */\n\tprivate logTombstoneUsageTelemetry(\n\t\tunrefEventProps: Omit<IUnreferencedEventProps, \"state\" | \"usageType\">,\n\t\t// eslint-disable-next-line import/no-deprecated\n\t\tnodeType: GCNodeType,\n\t\tusageType: NodeUsageType,\n\t\tpackagePath?: readonly string[],\n\t): void {\n\t\t// This will log the following events:\n\t\t// GC_Tombstone_DataStore_Requested, GC_Tombstone_DataStore_Changed, GC_Tombstone_DataStore_Revived\n\t\t// GC_Tombstone_SubDataStore_Requested, GC_Tombstone_SubDataStore_Changed, GC_Tombstone_SubDataStore_Revived\n\t\t// GC_Tombstone_Blob_Requested, GC_Tombstone_Blob_Changed, GC_Tombstone_Blob_Revived\n\t\tconst { id, fromId, headers, gcConfigs, additionalProps, ...detailedProps } =\n\t\t\tunrefEventProps;\n\t\tconst eventUsageName = usageType === \"Loaded\" ? \"Requested\" : usageType;\n\t\tconst event = {\n\t\t\teventName: `GC_Tombstone_${nodeType}_${eventUsageName}`,\n\t\t\t...tagCodeArtifacts({ pkg: packagePath?.join(\"/\") }),\n\t\t\tstack: generateStack(),\n\t\t\tid,\n\t\t\tfromId,\n\t\t\theaders: { ...headers },\n\t\t\tdetails: { ...detailedProps, ...additionalProps }, // Also includes some properties from INodeUsageProps type\n\t\t\tgcConfigs,\n\t\t};\n\n\t\tif (\n\t\t\tusageType === \"Loaded\" &&\n\t\t\tthis.configs.throwOnTombstoneLoad &&\n\t\t\t!headers?.allowTombstone\n\t\t) {\n\t\t\tthis.mc.logger.sendErrorEvent(event);\n\t\t} else {\n\t\t\tthis.mc.logger.sendTelemetryEvent(event);\n\t\t}\n\t}\n\n\t/**\n\t * Log all new references or outbound routes in the current graph that haven't been explicitly notified to GC.\n\t * The principle is that every new reference or outbound route must be notified to GC via the\n\t * addedOutboundReference method. It it hasn't, its a bug and we want to identify these scenarios.\n\t *\n\t * In more simple terms:\n\t * Missing Explicit References = Current References - Previous References - Explicitly Added References;\n\t *\n\t * @param currentGCData - The GC data (reference graph) from the current GC run.\n\t * @param previousGCData - The GC data (reference graph) from the previous GC run.\n\t * @param explicitReferences - New references added explicity between the previous and the current run.\n\t */\n\tpublic logIfMissingExplicitReferences(\n\t\tcurrentGCData: IGarbageCollectionData,\n\t\tpreviousGCData: IGarbageCollectionData,\n\t\texplicitReferences: Map<string, string[]>,\n\t\tlogger: ITelemetryLoggerExt,\n\t): void {\n\t\tfor (const [nodeId, currentOutboundRoutes] of Object.entries(currentGCData.gcNodes)) {\n\t\t\tconst previousRoutes = previousGCData.gcNodes[nodeId] ?? [];\n\t\t\tconst explicitRoutes = explicitReferences.get(nodeId) ?? [];\n\n\t\t\t/**\n\t\t\t * 1. For routes in the current GC data, routes that were not present in previous GC data and did not have\n\t\t\t * explicit references should be added to missing explicit routes list.\n\t\t\t * 2. Only include data store and blob routes since GC only works for these two.\n\t\t\t * Note: Due to a bug with de-duped blobs, only adding data store routes for now.\n\t\t\t * 3. Ignore DDS routes to their parent datastores since those were added implicitly. So, there won't be\n\t\t\t * explicit routes to them.\n\t\t\t */\n\t\t\tconst missingExplicitRoutes: string[] = [];\n\t\t\tfor (const route of currentOutboundRoutes) {\n\t\t\t\tconst nodeType = this.getNodeType(route);\n\t\t\t\tif (\n\t\t\t\t\t// eslint-disable-next-line import/no-deprecated\n\t\t\t\t\t(nodeType === GCNodeType.DataStore || nodeType === GCNodeType.Blob) &&\n\t\t\t\t\t!nodeId.startsWith(route) &&\n\t\t\t\t\t!previousRoutes.includes(route) &&\n\t\t\t\t\t!explicitRoutes.includes(route)\n\t\t\t\t) {\n\t\t\t\t\tmissingExplicitRoutes.push(route);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (missingExplicitRoutes.length > 0) {\n\t\t\t\t// Send as Generic not Error since there are known corner cases where this will fire.\n\t\t\t\t// E.g. If an old client re-references a node via an attach op (that doesn't include GC Data)\n\t\t\t\tlogger.sendTelemetryEvent({\n\t\t\t\t\teventName: \"gcUnknownOutboundReferences\",\n\t\t\t\t\t...tagCodeArtifacts({\n\t\t\t\t\t\tid: nodeId,\n\t\t\t\t\t\troutes: JSON.stringify(missingExplicitRoutes),\n\t\t\t\t\t}),\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Log events that are pending in pendingEventsQueue. This is called after GC runs in the summarizer client\n\t * so that the state of an unreferenced node is updated.\n\t */\n\tpublic async logPendingEvents(logger: ITelemetryLoggerExt): Promise<void> {\n\t\t// Events sent come only from the summarizer client. In between summaries, events are pushed to a queue and at\n\t\t// summary time they are then logged.\n\t\t// Events generated:\n\t\t// InactiveObject_Loaded, InactiveObject_Changed, InactiveObject_Revived\n\t\t// SweepReadyObject_Loaded, SweepReadyObject_Changed, SweepReadyObject_Revived\n\t\tfor (const eventProps of this.pendingEventsQueue) {\n\t\t\tconst {\n\t\t\t\tusageType,\n\t\t\t\tstate,\n\t\t\t\tid,\n\t\t\t\tfromId,\n\t\t\t\theaders,\n\t\t\t\tgcConfigs,\n\t\t\t\tadditionalProps,\n\t\t\t\t...detailedProps\n\t\t\t} = eventProps;\n\t\t\t/**\n\t\t\t * Revived event is logged only if the node is active. If the node is not active, the reference to it was\n\t\t\t * from another unreferenced node and this scenario is not interesting to log.\n\t\t\t * Loaded and Changed events are logged only if the node is not active. If the node is active, it was\n\t\t\t * revived and a Revived event will be logged for it.\n\t\t\t */\n\t\t\tconst nodeStateTracker = this.getNodeStateTracker(detailedProps.trackedId); // Note: This is never SubDataStore path\n\t\t\tconst active =\n\t\t\t\tnodeStateTracker === undefined || nodeStateTracker.state === UnreferencedState.Active;\n\t\t\tif ((usageType === \"Revived\") === active) {\n\t\t\t\tconst pkg = await this.getNodePackagePath(id.value);\n\t\t\t\tconst fromPkg = fromId ? await this.getNodePackagePath(fromId.value) : undefined;\n\t\t\t\tconst event = {\n\t\t\t\t\teventName: `${state}Object_${usageType}`,\n\t\t\t\t\tid,\n\t\t\t\t\tfromId,\n\t\t\t\t\theaders: { ...headers },\n\t\t\t\t\tdetails: { ...detailedProps, ...additionalProps },\n\t\t\t\t\tgcConfigs,\n\t\t\t\t\t...tagCodeArtifacts({\n\t\t\t\t\t\tpkg: pkg?.join(\"/\"),\n\t\t\t\t\t\tfromPkg: fromPkg?.join(\"/\"),\n\t\t\t\t\t}),\n\t\t\t\t};\n\n\t\t\t\t// These are logged as generic events and not errors because there can be false positives. The Tombstone\n\t\t\t\t// and Delete errors are separately logged and are reliable.\n\t\t\t\tlogger.sendTelemetryEvent(event);\n\t\t\t}\n\t\t}\n\t\tthis.pendingEventsQueue = [];\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"gcTelemetry.js","sourceRoot":"","sources":["../../src/gc/gcTelemetry.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAIH,uEAMkD;AAKlD,yDAK4B;AA6E5B;;;;;;;;;;;;;;;GAeG;AACH,MAAa,kBAAkB;IAO9B,YACkB,EAAqB,EACrB,OAAiC,EACjC,kBAA2B,EAE3B,uBAAiD,EAEjD,WAA2C,EAC3C,mBAEwB,EACxB,kBAE0B;QAZ1B,OAAE,GAAF,EAAE,CAAmB;QACrB,YAAO,GAAP,OAAO,CAA0B;QACjC,uBAAkB,GAAlB,kBAAkB,CAAS;QAE3B,4BAAuB,GAAvB,uBAAuB,CAA0B;QAEjD,gBAAW,GAAX,WAAW,CAAgC;QAC3C,wBAAmB,GAAnB,mBAAmB,CAEK;QACxB,uBAAkB,GAAlB,kBAAkB,CAEQ;QAnB5C,iHAAiH;QACjH,sBAAsB;QACL,6BAAwB,GAAgB,IAAI,GAAG,EAAE,CAAC;QACnE,6EAA6E;QACrE,uBAAkB,GAA8B,EAAE,CAAC;IAgBxD,CAAC;IAEJ;;;;;;;;;OASG;IACK,uBAAuB,CAC9B,QAAoB,EACpB,SAAwB,EACxB,gBAA0C,EAC1C,aAAqB;QAErB,IAAI,gBAAgB,CAAC,KAAK,KAAK,oCAAiB,CAAC,MAAM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G,IAAI,CAAC,mBAAmB,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,wCAAwC;YACpH,MAAM,MAAM,GACX,gBAAgB,KAAK,SAAS,IAAI,gBAAgB,CAAC,KAAK,KAAK,oCAAiB,CAAC,MAAM,CAAC;YACvF,IAAI,CAAC,SAAS,KAAK,SAAS,CAAC,KAAK,MAAM,EAAE,CAAC;gBAC1C,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;gBACpD,MAAM,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;gBACjF,MAAM,KAAK,GAAG;oBACb,SAAS,EAAE,GAAG,KAAK,UAAU,SAAS,EAAE;oBACxC,EAAE;oBACF,MAAM;oBACN,OAAO,EAAE,EAAE,GAAG,OAAO,EAAE;oBACvB,OAAO,EAAE,EAAE,GAAG,aAAa,EAAE,GAAG,eAAe,EAAE;oBACjD,SAAS;oBACT,GAAG,IAAA,2BAAgB,EAAC;wBACnB,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC;wBACnB,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,CAAC;qBAC3B,CAAC;iBACF,CAAC;gBAEF,wGAAwG;gBACxG,4DAA4D;gBAC5D,MAAM,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC;YAClC,CAAC;QACF,CAAC;QACD,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;IAC9B,CAAC;CACD;AAzUD,gDAyUC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { Tagged } from \"@fluidframework/core-interfaces\";\nimport { IGarbageCollectionData } from \"@fluidframework/runtime-definitions/internal\";\nimport {\n\tITelemetryLoggerExt,\n\tMonitoringContext,\n\tgenerateStack,\n\ttagCodeArtifacts,\n\ttype ITelemetryPropertiesExt,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nimport { RuntimeHeaderData } from \"../containerRuntime.js\";\nimport { ICreateContainerMetadata } from \"../summary/index.js\";\n\nimport {\n\tGCFeatureMatrix,\n\tGCNodeType,\n\tIGarbageCollectorConfigs,\n\tUnreferencedState,\n} from \"./gcDefinitions.js\";\nimport { UnreferencedStateTracker } from \"./gcUnreferencedStateTracker.js\";\n\ntype NodeUsageType = \"Changed\" | \"Loaded\" | \"Revived\" | \"Realized\";\n\n/**\n * Properties that are common to IUnreferencedEventProps and INodeUsageProps\n */\ninterface ICommonProps {\n\tusageType: NodeUsageType;\n\tcompletedGCRuns: number;\n\tisTombstoned: boolean;\n\tlastSummaryTime?: number;\n\theaders?: RuntimeHeaderData;\n\tadditionalProps?: ITelemetryPropertiesExt;\n}\n\n/**\n * The event that is logged when unreferenced node is used after a certain time.\n */\n\ninterface IUnreferencedEventProps extends ICreateContainerMetadata, ICommonProps {\n\t/**\n\t * The id that GC uses to track the node. May or may not match id\n\t */\n\ttrackedId: string;\n\tstate: UnreferencedState;\n\t/**\n\t * The full path (in GC Path format) to the node in question\n\t */\n\tid: Tagged<string>;\n\tfromId?: Tagged<string>;\n\n\ttype: GCNodeType;\n\tunrefTime: number;\n\tage: number;\n\t// Expanding GC feature matrix. Without doing this, the configs cannot be logged in telemetry directly.\n\tgcConfigs: Omit<IGarbageCollectorConfigs, \"persistedGcFeatureMatrix\"> & {\n\t\t[K in keyof GCFeatureMatrix]: GCFeatureMatrix[K];\n\t};\n\ttimeout?: number;\n}\n\n/**\n * Properties passed to nodeUsed function when a node is used.\n */\ninterface INodeUsageProps extends ICommonProps {\n\t/**\n\t * The full path (in GC Path format) to the node in question\n\t */\n\tid: string;\n\t/**\n\t * Latest timestamp received from the server, as a baseline for computing GC state/age\n\t */\n\tcurrentReferenceTimestampMs: number;\n\t/**\n\t * The package path of the node. This may not be available if the node hasn't been loaded yet\n\t */\n\tpackagePath: readonly string[] | undefined;\n\t/**\n\t * In case of Revived - what node added the reference?\n\t */\n\tfromId?: string;\n\t/**\n\t * In case of Revived - was it revived due to autorecovery?\n\t */\n\tautorecovery?: true;\n\t/**\n\t * URL (including query string) if this usage came from a request\n\t */\n\trequestUrl?: string;\n\t/**\n\t * Original request headers if this usage came from a request or handle.get\n\t */\n\trequestHeaders?: string;\n}\n\n/**\n * Encapsulates the logic that tracks the various telemetry logged by the Garbage Collector.\n *\n * These events are not logged as errors, just generic events, since there can be false positives:\n *\n * 1. inactiveObject telemetry - When an inactive node is used - A node that has been unreferenced for inactiveTimeoutMs.\n * 2. tombstoneReadyObject telemetry - When a tombstone-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs.\n * 3. sweepReadyObject telemetry - When a sweep-ready node is used - A node that has been unreferenced for tombstoneTimeoutMs + sweepGracePeriodMs.\n *\n * These events are logged as errors since they are based on the core GC logic:\n *\n * 1. Tombstone telemetry - When a tombstoned node is used - A node that has been marked as tombstone.\n * 2. Unknown outbound reference telemetry - When a node is referenced but GC was not notified of it when the new reference appeared.\n *\n * Note: The telemetry for a Deleted node being used is logged elsewhere in this package.\n */\nexport class GCTelemetryTracker {\n\t// Keeps track of unreferenced events that are logged for a node. This is used to limit the log generation to one\n\t// per event per node.\n\tprivate readonly loggedUnreferencedEvents: Set<string> = new Set();\n\t// Queue for unreferenced events that should be logged the next time GC runs.\n\tprivate pendingEventsQueue: IUnreferencedEventProps[] = [];\n\n\tconstructor(\n\t\tprivate readonly mc: MonitoringContext,\n\t\tprivate readonly configs: IGarbageCollectorConfigs,\n\t\tprivate readonly isSummarizerClient: boolean,\n\n\t\tprivate readonly createContainerMetadata: ICreateContainerMetadata,\n\n\t\tprivate readonly getNodeType: (nodeId: string) => GCNodeType,\n\t\tprivate readonly getNodeStateTracker: (\n\t\t\tnodeId: string,\n\t\t) => UnreferencedStateTracker | undefined,\n\t\tprivate readonly getNodePackagePath: (\n\t\t\tnodePath: string,\n\t\t) => Promise<readonly string[] | undefined>,\n\t) {}\n\n\t/**\n\t * Returns whether an event should be logged for a node that isn't active anymore.\n\t *\n\t * @remarks\n\t * This does not apply to tombstoned nodes for which an event is always logged. Some scenarios where we won't log:\n\t *\n\t * 1. When a DDS is changed. The corresponding data store's event will be logged instead.\n\t *\n\t * 2. An event is logged only once per container instance per event per node.\n\t */\n\tprivate shouldLogNonActiveEvent(\n\t\tnodeType: GCNodeType,\n\t\tusageType: NodeUsageType,\n\t\tnodeStateTracker: UnreferencedStateTracker,\n\t\tuniqueEventId: string,\n\t): boolean {\n\t\tif (nodeStateTracker.state === UnreferencedState.Active) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (nodeType === GCNodeType.Other) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// For sub data store (DDS) nodes, if they are changed, its data store will also be changed,\n\t\t// so skip logging to make the telemetry less noisy.\n\n\t\tif (nodeType === GCNodeType.SubDataStore && usageType === \"Changed\") {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Non-tombstone events are logged once per event per node. A unique id is generated by joining\n\t\t// node state (inactive / sweep ready), node's id and usage (loaded / changed / revived).\n\t\tif (this.loggedUnreferencedEvents.has(uniqueEventId)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t/**\n\t * Called when a node is used. If the node is inactive or tombstoned, log telemetry indicating object is used\n\t * when it should not have been.\n\t * @param trackedId - The id that GC uses to track the node. For SubDataStore nodes, this should be the DataStore ID.\n\t * @param INodeUsageProps - All kind of details about this event to be logged\n\t */\n\tpublic nodeUsed(\n\t\ttrackedId: string,\n\t\t{\n\t\t\tusageType,\n\t\t\tcurrentReferenceTimestampMs,\n\t\t\tpackagePath,\n\t\t\tid: untaggedId,\n\t\t\tfromId: untaggedFromId,\n\t\t\tisTombstoned,\n\t\t\t...otherNodeUsageProps\n\t\t}: INodeUsageProps,\n\t): void {\n\t\t// Note: For SubDataStore Load usage, trackedId will be the DataStore's id, not the full path in question.\n\t\t// This is necessary because the SubDataStore path may be unrecognized by GC (if suited for a custom request handler)\n\t\tconst nodeStateTracker = this.getNodeStateTracker(trackedId);\n\t\tconst nodeType = this.getNodeType(untaggedId);\n\n\t\tconst timeout = (() => {\n\t\t\tswitch (nodeStateTracker?.state) {\n\t\t\t\tcase UnreferencedState.Inactive: {\n\t\t\t\t\treturn this.configs.inactiveTimeoutMs;\n\t\t\t\t}\n\t\t\t\tcase UnreferencedState.TombstoneReady: {\n\t\t\t\t\treturn this.configs.tombstoneTimeoutMs;\n\t\t\t\t}\n\t\t\t\tcase UnreferencedState.SweepReady: {\n\t\t\t\t\treturn (\n\t\t\t\t\t\tthis.configs.tombstoneTimeoutMs &&\n\t\t\t\t\t\tthis.configs.tombstoneTimeoutMs + this.configs.sweepGracePeriodMs\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\tdefault: {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t})();\n\t\tconst { persistedGcFeatureMatrix, ...configs } = this.configs;\n\t\tconst unrefEventProps = {\n\t\t\ttrackedId,\n\t\t\ttype: nodeType,\n\t\t\tunrefTime: nodeStateTracker?.unreferencedTimestampMs ?? -1,\n\t\t\tage:\n\t\t\t\tnodeStateTracker === undefined\n\t\t\t\t\t? -1\n\t\t\t\t\t: currentReferenceTimestampMs - nodeStateTracker.unreferencedTimestampMs,\n\t\t\ttimeout,\n\t\t\tisTombstoned,\n\t\t\t...tagCodeArtifacts({ id: untaggedId, fromId: untaggedFromId }),\n\t\t\t...otherNodeUsageProps,\n\t\t\t...this.createContainerMetadata,\n\t\t\tgcConfigs: { ...configs, ...persistedGcFeatureMatrix },\n\t\t} satisfies Omit<IUnreferencedEventProps, \"state\" | \"usageType\"> &\n\t\t\ttypeof otherNodeUsageProps;\n\n\t\t// If the node that is used is tombstoned, log a tombstone telemetry.\n\t\tif (isTombstoned) {\n\t\t\tthis.logTombstoneUsageTelemetry(unrefEventProps, nodeType, usageType, packagePath);\n\t\t}\n\n\t\t// After logging tombstone telemetry, if the node's unreferenced state is not tracked, there is nothing\n\t\t// else to log.\n\t\tif (nodeStateTracker === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst state = nodeStateTracker.state;\n\t\tconst uniqueEventId = `${state}-${untaggedId}-${usageType}`;\n\n\t\tif (!this.shouldLogNonActiveEvent(nodeType, usageType, nodeStateTracker, uniqueEventId)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Add the unique event id so that we don't generate a log for this event again in this session.\n\t\tthis.loggedUnreferencedEvents.add(uniqueEventId);\n\n\t\t// For summarizer client, queue the event so it is logged the next time GC runs if the event is still valid.\n\t\t// For non-summarizer client, log the event now since GC won't run on it. This may result in false positives\n\t\t// but it's a good signal nonetheless and we can consume it with a grain of salt.\n\t\t// Inactive errors are usages of Objects that are unreferenced for at least a period of 7 days.\n\t\t// SweepReady errors are usages of Objects that will be deleted by GC Sweep!\n\t\tif (this.isSummarizerClient) {\n\t\t\tthis.pendingEventsQueue.push({\n\t\t\t\t...unrefEventProps, // Note: Contains some properties from INodeUsageProps as well\n\t\t\t\tusageType,\n\t\t\t\tstate,\n\t\t\t});\n\t\t} else {\n\t\t\t// For non-summarizer clients, only log \"Loaded\" type events since these objects may not be loaded in the\n\t\t\t// summarizer clients if they are based off of user actions (such as scrolling to content for these objects)\n\t\t\t// Events generated:\n\t\t\t// InactiveObject_Loaded, SweepReadyObject_Loaded\n\t\t\tif (usageType === \"Loaded\") {\n\t\t\t\tconst { id, fromId, headers, gcConfigs, additionalProps, ...detailedProps } =\n\t\t\t\t\tunrefEventProps;\n\t\t\t\tconst event = {\n\t\t\t\t\teventName: `${state}Object_${usageType}`,\n\t\t\t\t\t...tagCodeArtifacts({ pkg: packagePath?.join(\"/\") }),\n\t\t\t\t\tstack: generateStack(),\n\t\t\t\t\tid,\n\t\t\t\t\tfromId,\n\t\t\t\t\theaders: { ...headers },\n\t\t\t\t\tdetails: { ...detailedProps, ...additionalProps },\n\t\t\t\t\tgcConfigs,\n\t\t\t\t};\n\n\t\t\t\t// These are logged as generic events and not errors because there can be false positives. The Tombstone\n\t\t\t\t// and Delete errors are separately logged and are reliable.\n\t\t\t\tthis.mc.logger.sendTelemetryEvent(event);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Logs telemetry when a tombstoned object is changed, revived or loaded.\n\t */\n\tprivate logTombstoneUsageTelemetry(\n\t\tunrefEventProps: Omit<IUnreferencedEventProps, \"state\" | \"usageType\">,\n\n\t\tnodeType: GCNodeType,\n\t\tusageType: NodeUsageType,\n\t\tpackagePath?: readonly string[],\n\t): void {\n\t\t// This will log the following events:\n\t\t// GC_Tombstone_DataStore_Requested, GC_Tombstone_DataStore_Changed, GC_Tombstone_DataStore_Revived\n\t\t// GC_Tombstone_SubDataStore_Requested, GC_Tombstone_SubDataStore_Changed, GC_Tombstone_SubDataStore_Revived\n\t\t// GC_Tombstone_Blob_Requested, GC_Tombstone_Blob_Changed, GC_Tombstone_Blob_Revived\n\t\tconst { id, fromId, headers, gcConfigs, additionalProps, ...detailedProps } =\n\t\t\tunrefEventProps;\n\t\tconst eventUsageName = usageType === \"Loaded\" ? \"Requested\" : usageType;\n\t\tconst event = {\n\t\t\teventName: `GC_Tombstone_${nodeType}_${eventUsageName}`,\n\t\t\t...tagCodeArtifacts({ pkg: packagePath?.join(\"/\") }),\n\t\t\tstack: generateStack(),\n\t\t\tid,\n\t\t\tfromId,\n\t\t\theaders: { ...headers },\n\t\t\tdetails: { ...detailedProps, ...additionalProps }, // Also includes some properties from INodeUsageProps type\n\t\t\tgcConfigs,\n\t\t};\n\n\t\tif (\n\t\t\tusageType === \"Loaded\" &&\n\t\t\tthis.configs.throwOnTombstoneLoad &&\n\t\t\t!headers?.allowTombstone\n\t\t) {\n\t\t\tthis.mc.logger.sendErrorEvent(event);\n\t\t} else {\n\t\t\tthis.mc.logger.sendTelemetryEvent(event);\n\t\t}\n\t}\n\n\t/**\n\t * Log all new references or outbound routes in the current graph that haven't been explicitly notified to GC.\n\t * The principle is that every new reference or outbound route must be notified to GC via the\n\t * addedOutboundReference method. It it hasn't, its a bug and we want to identify these scenarios.\n\t *\n\t * In more simple terms:\n\t * Missing Explicit References = Current References - Previous References - Explicitly Added References;\n\t *\n\t * @param currentGCData - The GC data (reference graph) from the current GC run.\n\t * @param previousGCData - The GC data (reference graph) from the previous GC run.\n\t * @param explicitReferences - New references added explicity between the previous and the current run.\n\t */\n\tpublic logIfMissingExplicitReferences(\n\t\tcurrentGCData: IGarbageCollectionData,\n\t\tpreviousGCData: IGarbageCollectionData,\n\t\texplicitReferences: Map<string, string[]>,\n\t\tlogger: ITelemetryLoggerExt,\n\t): void {\n\t\tfor (const [nodeId, currentOutboundRoutes] of Object.entries(currentGCData.gcNodes)) {\n\t\t\tconst previousRoutes = previousGCData.gcNodes[nodeId] ?? [];\n\t\t\tconst explicitRoutes = explicitReferences.get(nodeId) ?? [];\n\n\t\t\t/**\n\t\t\t * 1. For routes in the current GC data, routes that were not present in previous GC data and did not have\n\t\t\t * explicit references should be added to missing explicit routes list.\n\t\t\t * 2. Only include data store and blob routes since GC only works for these two.\n\t\t\t * Note: Due to a bug with de-duped blobs, only adding data store routes for now.\n\t\t\t * 3. Ignore DDS routes to their parent datastores since those were added implicitly. So, there won't be\n\t\t\t * explicit routes to them.\n\t\t\t */\n\t\t\tconst missingExplicitRoutes: string[] = [];\n\t\t\tfor (const route of currentOutboundRoutes) {\n\t\t\t\tconst nodeType = this.getNodeType(route);\n\t\t\t\tif (\n\t\t\t\t\t(nodeType === GCNodeType.DataStore || nodeType === GCNodeType.Blob) &&\n\t\t\t\t\t!nodeId.startsWith(route) &&\n\t\t\t\t\t!previousRoutes.includes(route) &&\n\t\t\t\t\t!explicitRoutes.includes(route)\n\t\t\t\t) {\n\t\t\t\t\tmissingExplicitRoutes.push(route);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (missingExplicitRoutes.length > 0) {\n\t\t\t\t// Send as Generic not Error since there are known corner cases where this will fire.\n\t\t\t\t// E.g. If an old client re-references a node via an attach op (that doesn't include GC Data)\n\t\t\t\tlogger.sendTelemetryEvent({\n\t\t\t\t\teventName: \"gcUnknownOutboundReferences\",\n\t\t\t\t\t...tagCodeArtifacts({\n\t\t\t\t\t\tid: nodeId,\n\t\t\t\t\t\troutes: JSON.stringify(missingExplicitRoutes),\n\t\t\t\t\t}),\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Log events that are pending in pendingEventsQueue. This is called after GC runs in the summarizer client\n\t * so that the state of an unreferenced node is updated.\n\t */\n\tpublic async logPendingEvents(logger: ITelemetryLoggerExt): Promise<void> {\n\t\t// Events sent come only from the summarizer client. In between summaries, events are pushed to a queue and at\n\t\t// summary time they are then logged.\n\t\t// Events generated:\n\t\t// InactiveObject_Loaded, InactiveObject_Changed, InactiveObject_Revived\n\t\t// SweepReadyObject_Loaded, SweepReadyObject_Changed, SweepReadyObject_Revived\n\t\tfor (const eventProps of this.pendingEventsQueue) {\n\t\t\tconst {\n\t\t\t\tusageType,\n\t\t\t\tstate,\n\t\t\t\tid,\n\t\t\t\tfromId,\n\t\t\t\theaders,\n\t\t\t\tgcConfigs,\n\t\t\t\tadditionalProps,\n\t\t\t\t...detailedProps\n\t\t\t} = eventProps;\n\t\t\t/**\n\t\t\t * Revived event is logged only if the node is active. If the node is not active, the reference to it was\n\t\t\t * from another unreferenced node and this scenario is not interesting to log.\n\t\t\t * Loaded and Changed events are logged only if the node is not active. If the node is active, it was\n\t\t\t * revived and a Revived event will be logged for it.\n\t\t\t */\n\t\t\tconst nodeStateTracker = this.getNodeStateTracker(detailedProps.trackedId); // Note: This is never SubDataStore path\n\t\t\tconst active =\n\t\t\t\tnodeStateTracker === undefined || nodeStateTracker.state === UnreferencedState.Active;\n\t\t\tif ((usageType === \"Revived\") === active) {\n\t\t\t\tconst pkg = await this.getNodePackagePath(id.value);\n\t\t\t\tconst fromPkg = fromId ? await this.getNodePackagePath(fromId.value) : undefined;\n\t\t\t\tconst event = {\n\t\t\t\t\teventName: `${state}Object_${usageType}`,\n\t\t\t\t\tid,\n\t\t\t\t\tfromId,\n\t\t\t\t\theaders: { ...headers },\n\t\t\t\t\tdetails: { ...detailedProps, ...additionalProps },\n\t\t\t\t\tgcConfigs,\n\t\t\t\t\t...tagCodeArtifacts({\n\t\t\t\t\t\tpkg: pkg?.join(\"/\"),\n\t\t\t\t\t\tfromPkg: fromPkg?.join(\"/\"),\n\t\t\t\t\t}),\n\t\t\t\t};\n\n\t\t\t\t// These are logged as generic events and not errors because there can be false positives. The Tombstone\n\t\t\t\t// and Delete errors are separately logged and are reliable.\n\t\t\t\tlogger.sendTelemetryEvent(event);\n\t\t\t}\n\t\t}\n\t\tthis.pendingEventsQueue = [];\n\t}\n}\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
export { ISummaryRuntimeOptions,
|
|
5
|
+
export { ISummaryRuntimeOptions, IContainerRuntimeOptions, IContainerRuntimeOptionsInternal, loadContainerRuntime, LoadContainerRuntimeParams, agentSchedulerId, ContainerRuntime, DeletedResponseHeaderKey, TombstoneResponseHeaderKey, InactiveResponseHeaderKey, ICompressionRuntimeOptions, CompressionAlgorithms, RuntimeHeaderData, disabledCompressionConfig, } from "./containerRuntime.js";
|
|
6
6
|
export { ContainerMessageType, UnknownContainerRuntimeMessage, } from "./messageTypes.js";
|
|
7
7
|
export { IBlobManagerLoadInfo } from "./blobManager/index.js";
|
|
8
8
|
export { FluidDataStoreRegistry } from "./dataStoreRegistry.js";
|
|
9
9
|
export { detectOutboundReferences, RuntimeHeaders, ChannelCollectionFactory, AllowTombstoneRequestHeaderKey, } from "./channelCollection.js";
|
|
10
10
|
export { GCNodeType, IGCMetadata, GCFeatureMatrix, GCVersion, IGCRuntimeOptions, IMarkPhaseStats, ISweepPhaseStats, IGCNodeUpdatedProps, IGCStats, } from "./gc/index.js";
|
|
11
|
-
export { IAckedSummary, ISummarizer, ISummarizeResults, ISummaryCancellationToken, neverCancelledSummaryToken, Summarizer, SummaryCollection, EnqueueSummarizeResult, IAckSummaryResult, IBaseSummarizeResult, IBroadcastSummaryResult, ICancellationToken, IConnectableRuntime, IContainerRuntimeMetadata, ICreateContainerMetadata, IEnqueueSummarizeOptions, IGenerateSummaryTreeResult, IGeneratedSummaryStats, INackSummaryResult, IOnDemandSummarizeOptions, IRefreshSummaryAckOptions, ISubmitSummaryOpResult, ISubmitSummaryOptions, ISerializedElection, ISummarizeOptions, ISummarizerInternalsProvider, ISummarizerRuntime, ISummarizingWarning, IUploadSummaryResult, SubmitSummaryResult, SummarizeResultPart, IClientSummaryWatcher, ISummary, ISummaryCollectionOpEvents, ISummaryAckMessage, ISummaryMetadataMessage, ISummaryNackMessage, ISummaryOpMessage, OpActionEventListener, OpActionEventName, ICancellableSummarizerController, SubmitSummaryFailureData, SummaryStage, IRetriableFailureError, IdCompressorMode, IDocumentSchema, DocumentSchemaValueType, IDocumentSchemaCurrent, currentDocumentVersionSchema, DocumentsSchemaController, IDocumentSchemaChangeMessage, IDocumentSchemaFeatures, ReadFluidDataStoreAttributes, IFluidDataStoreAttributes0, IFluidDataStoreAttributes1, IFluidDataStoreAttributes2, OmitAttributesVersions, } from "./summary/index.js";
|
|
11
|
+
export { IAckedSummary, ISummarizer, ISummarizeResults, ISummaryCancellationToken, neverCancelledSummaryToken, Summarizer, SummaryCollection, EnqueueSummarizeResult, IAckSummaryResult, IBaseSummarizeResult, IBroadcastSummaryResult, ICancellationToken, IConnectableRuntime, IContainerRuntimeMetadata, ICreateContainerMetadata, IEnqueueSummarizeOptions, IGenerateSummaryTreeResult, IGeneratedSummaryStats, INackSummaryResult, IOnDemandSummarizeOptions, IRefreshSummaryAckOptions, ISubmitSummaryOpResult, ISubmitSummaryOptions, ISerializedElection, ISummarizeOptions, ISummarizerInternalsProvider, ISummarizerRuntime, ISummarizingWarning, IUploadSummaryResult, SubmitSummaryResult, SummarizeResultPart, IClientSummaryWatcher, ISummary, ISummaryCollectionOpEvents, ISummaryAckMessage, ISummaryMetadataMessage, ISummaryNackMessage, ISummaryOpMessage, OpActionEventListener, OpActionEventName, ICancellableSummarizerController, SubmitSummaryFailureData, SummaryStage, IRetriableFailureError, IdCompressorMode, IDocumentSchema, DocumentSchemaValueType, IDocumentSchemaCurrent, currentDocumentVersionSchema, DocumentsSchemaController, IDocumentSchemaChangeMessage, IDocumentSchemaFeatures, ReadFluidDataStoreAttributes, IFluidDataStoreAttributes0, IFluidDataStoreAttributes1, IFluidDataStoreAttributes2, OmitAttributesVersions, ISummaryBaseConfiguration, ISummaryConfigurationHeuristics, ISummaryConfigurationDisableSummarizer, ISummaryConfigurationDisableHeuristics, ISummaryConfiguration, DefaultSummaryConfiguration, } from "./summary/index.js";
|
|
12
12
|
export { IChunkedOp, unpackRuntimeMessage } from "./opLifecycle/index.js";
|
|
13
13
|
export { ChannelCollection } from "./channelCollection.js";
|
|
14
14
|
export { IFluidDataStoreContextInternal, ISnapshotDetails, LocalFluidDataStoreContext, LocalFluidDataStoreContextBase, FluidDataStoreContext, IFluidDataStoreContextProps, ILocalFluidDataStoreContextProps, ILocalDetachedFluidDataStoreContextProps, IFluidDataStoreContextEvents, } from "./dataStoreContext.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,sBAAsB,EACtB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,sBAAsB,EACtB,wBAAwB,EACxB,gCAAgC,EAChC,oBAAoB,EACpB,0BAA0B,EAC1B,gBAAgB,EAChB,gBAAgB,EAChB,wBAAwB,E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EAC5B,yBAAyB,EACzB,4BAA4B,EAC5B,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,sCAAsC,EACtC,sCAAsC,EACtC,qBAAqB,EACrB,2BAA2B,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EACN,8BAA8B,EAC9B,gBAAgB,EAChB,0BAA0B,EAC1B,8BAA8B,EAC9B,qBAAqB,EACrB,2BAA2B,EAC3B,gCAAgC,EAChC,wCAAwC,EACxC,4BAA4B,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.DataStoreContexts = exports.FluidDataStoreContext = exports.LocalFluidDataStoreContextBase = exports.LocalFluidDataStoreContext = exports.ChannelCollection = exports.unpackRuntimeMessage = exports.DocumentsSchemaController = exports.currentDocumentVersionSchema = exports.SummaryCollection = exports.Summarizer = exports.neverCancelledSummaryToken = exports.GCNodeType = exports.AllowTombstoneRequestHeaderKey = exports.ChannelCollectionFactory = exports.RuntimeHeaders = exports.detectOutboundReferences = exports.FluidDataStoreRegistry = exports.ContainerMessageType = exports.disabledCompressionConfig = exports.CompressionAlgorithms = exports.
|
|
7
|
+
exports.DataStoreContexts = exports.FluidDataStoreContext = exports.LocalFluidDataStoreContextBase = exports.LocalFluidDataStoreContext = exports.ChannelCollection = exports.unpackRuntimeMessage = exports.DefaultSummaryConfiguration = exports.DocumentsSchemaController = exports.currentDocumentVersionSchema = exports.SummaryCollection = exports.Summarizer = exports.neverCancelledSummaryToken = exports.GCNodeType = exports.AllowTombstoneRequestHeaderKey = exports.ChannelCollectionFactory = exports.RuntimeHeaders = exports.detectOutboundReferences = exports.FluidDataStoreRegistry = exports.ContainerMessageType = exports.disabledCompressionConfig = exports.CompressionAlgorithms = exports.InactiveResponseHeaderKey = exports.TombstoneResponseHeaderKey = exports.DeletedResponseHeaderKey = exports.ContainerRuntime = exports.agentSchedulerId = exports.loadContainerRuntime = void 0;
|
|
8
8
|
var containerRuntime_js_1 = require("./containerRuntime.js");
|
|
9
9
|
Object.defineProperty(exports, "loadContainerRuntime", { enumerable: true, get: function () { return containerRuntime_js_1.loadContainerRuntime; } });
|
|
10
10
|
Object.defineProperty(exports, "agentSchedulerId", { enumerable: true, get: function () { return containerRuntime_js_1.agentSchedulerId; } });
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "ContainerRuntime", { enumerable: true, get: func
|
|
|
12
12
|
Object.defineProperty(exports, "DeletedResponseHeaderKey", { enumerable: true, get: function () { return containerRuntime_js_1.DeletedResponseHeaderKey; } });
|
|
13
13
|
Object.defineProperty(exports, "TombstoneResponseHeaderKey", { enumerable: true, get: function () { return containerRuntime_js_1.TombstoneResponseHeaderKey; } });
|
|
14
14
|
Object.defineProperty(exports, "InactiveResponseHeaderKey", { enumerable: true, get: function () { return containerRuntime_js_1.InactiveResponseHeaderKey; } });
|
|
15
|
-
Object.defineProperty(exports, "DefaultSummaryConfiguration", { enumerable: true, get: function () { return containerRuntime_js_1.DefaultSummaryConfiguration; } });
|
|
16
15
|
Object.defineProperty(exports, "CompressionAlgorithms", { enumerable: true, get: function () { return containerRuntime_js_1.CompressionAlgorithms; } });
|
|
17
16
|
Object.defineProperty(exports, "disabledCompressionConfig", { enumerable: true, get: function () { return containerRuntime_js_1.disabledCompressionConfig; } });
|
|
18
17
|
var messageTypes_js_1 = require("./messageTypes.js");
|
|
@@ -32,6 +31,7 @@ Object.defineProperty(exports, "Summarizer", { enumerable: true, get: function (
|
|
|
32
31
|
Object.defineProperty(exports, "SummaryCollection", { enumerable: true, get: function () { return index_js_2.SummaryCollection; } });
|
|
33
32
|
Object.defineProperty(exports, "currentDocumentVersionSchema", { enumerable: true, get: function () { return index_js_2.currentDocumentVersionSchema; } });
|
|
34
33
|
Object.defineProperty(exports, "DocumentsSchemaController", { enumerable: true, get: function () { return index_js_2.DocumentsSchemaController; } });
|
|
34
|
+
Object.defineProperty(exports, "DefaultSummaryConfiguration", { enumerable: true, get: function () { return index_js_2.DefaultSummaryConfiguration; } });
|
|
35
35
|
var index_js_3 = require("./opLifecycle/index.js");
|
|
36
36
|
Object.defineProperty(exports, "unpackRuntimeMessage", { enumerable: true, get: function () { return index_js_3.unpackRuntimeMessage; } });
|
|
37
37
|
var channelCollection_js_2 = require("./channelCollection.js");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,6DAe+B;AAX9B,2HAAA,oBAAoB,OAAA;AAEpB,uHAAA,gBAAgB,OAAA;AAChB,uHAAA,gBAAgB,OAAA;AAChB,+HAAA,wBAAwB,OAAA;AACxB,iIAAA,0BAA0B,OAAA;AAC1B,gIAAA,yBAAyB,OAAA;AAEzB,4HAAA,qBAAqB,OAAA;AAErB,gIAAA,yBAAyB,OAAA;AAE1B,qDAG2B;AAF1B,uHAAA,oBAAoB,OAAA;AAIrB,+DAAgE;AAAvD,8HAAA,sBAAsB,OAAA;AAC/B,+DAKgC;AAJ/B,gIAAA,wBAAwB,OAAA;AACxB,sHAAA,cAAc,OAAA;AACd,gIAAA,wBAAwB,OAAA;AACxB,sIAAA,8BAA8B,OAAA;AAE/B,0CAUuB;AATtB,sGAAA,UAAU,OAAA;AAUX,+CAgE4B;AA3D3B,sHAAA,0BAA0B,OAAA;AAC1B,sGAAA,UAAU,OAAA;AACV,6GAAA,iBAAiB,OAAA;AA0CjB,wHAAA,4BAA4B,OAAA;AAC5B,qHAAA,yBAAyB,OAAA;AAazB,uHAAA,2BAA2B,OAAA;AAE5B,mDAA0E;AAArD,gHAAA,oBAAoB,OAAA;AACzC,+DAA2D;AAAlD,yHAAA,iBAAiB,OAAA;AAC1B,6DAU+B;AAP9B,iIAAA,0BAA0B,OAAA;AAC1B,qIAAA,8BAA8B,OAAA;AAC9B,4HAAA,qBAAqB,OAAA;AAMtB,+DAA2D;AAAlD,yHAAA,iBAAiB,OAAA","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport {\n\tISummaryRuntimeOptions,\n\tIContainerRuntimeOptions,\n\tIContainerRuntimeOptionsInternal,\n\tloadContainerRuntime,\n\tLoadContainerRuntimeParams,\n\tagentSchedulerId,\n\tContainerRuntime,\n\tDeletedResponseHeaderKey,\n\tTombstoneResponseHeaderKey,\n\tInactiveResponseHeaderKey,\n\tICompressionRuntimeOptions,\n\tCompressionAlgorithms,\n\tRuntimeHeaderData,\n\tdisabledCompressionConfig,\n} from \"./containerRuntime.js\";\nexport {\n\tContainerMessageType,\n\tUnknownContainerRuntimeMessage,\n} from \"./messageTypes.js\";\nexport { IBlobManagerLoadInfo } from \"./blobManager/index.js\";\nexport { FluidDataStoreRegistry } from \"./dataStoreRegistry.js\";\nexport {\n\tdetectOutboundReferences,\n\tRuntimeHeaders,\n\tChannelCollectionFactory,\n\tAllowTombstoneRequestHeaderKey,\n} from \"./channelCollection.js\";\nexport {\n\tGCNodeType,\n\tIGCMetadata,\n\tGCFeatureMatrix,\n\tGCVersion,\n\tIGCRuntimeOptions,\n\tIMarkPhaseStats,\n\tISweepPhaseStats,\n\tIGCNodeUpdatedProps,\n\tIGCStats,\n} from \"./gc/index.js\";\nexport {\n\tIAckedSummary,\n\tISummarizer,\n\tISummarizeResults,\n\tISummaryCancellationToken,\n\tneverCancelledSummaryToken,\n\tSummarizer,\n\tSummaryCollection,\n\tEnqueueSummarizeResult,\n\tIAckSummaryResult,\n\tIBaseSummarizeResult,\n\tIBroadcastSummaryResult,\n\tICancellationToken,\n\tIConnectableRuntime,\n\tIContainerRuntimeMetadata,\n\tICreateContainerMetadata,\n\tIEnqueueSummarizeOptions,\n\tIGenerateSummaryTreeResult,\n\tIGeneratedSummaryStats,\n\tINackSummaryResult,\n\tIOnDemandSummarizeOptions,\n\tIRefreshSummaryAckOptions,\n\tISubmitSummaryOpResult,\n\tISubmitSummaryOptions,\n\tISerializedElection,\n\tISummarizeOptions,\n\tISummarizerInternalsProvider,\n\tISummarizerRuntime,\n\tISummarizingWarning,\n\tIUploadSummaryResult,\n\tSubmitSummaryResult,\n\tSummarizeResultPart,\n\tIClientSummaryWatcher,\n\tISummary,\n\tISummaryCollectionOpEvents,\n\tISummaryAckMessage,\n\tISummaryMetadataMessage,\n\tISummaryNackMessage,\n\tISummaryOpMessage,\n\tOpActionEventListener,\n\tOpActionEventName,\n\tICancellableSummarizerController,\n\tSubmitSummaryFailureData,\n\tSummaryStage,\n\tIRetriableFailureError,\n\tIdCompressorMode,\n\tIDocumentSchema,\n\tDocumentSchemaValueType,\n\tIDocumentSchemaCurrent,\n\tcurrentDocumentVersionSchema,\n\tDocumentsSchemaController,\n\tIDocumentSchemaChangeMessage,\n\tIDocumentSchemaFeatures,\n\tReadFluidDataStoreAttributes,\n\tIFluidDataStoreAttributes0,\n\tIFluidDataStoreAttributes1,\n\tIFluidDataStoreAttributes2,\n\tOmitAttributesVersions,\n\tISummaryBaseConfiguration,\n\tISummaryConfigurationHeuristics,\n\tISummaryConfigurationDisableSummarizer,\n\tISummaryConfigurationDisableHeuristics,\n\tISummaryConfiguration,\n\tDefaultSummaryConfiguration,\n} from \"./summary/index.js\";\nexport { IChunkedOp, unpackRuntimeMessage } from \"./opLifecycle/index.js\";\nexport { ChannelCollection } from \"./channelCollection.js\";\nexport {\n\tIFluidDataStoreContextInternal,\n\tISnapshotDetails,\n\tLocalFluidDataStoreContext,\n\tLocalFluidDataStoreContextBase,\n\tFluidDataStoreContext,\n\tIFluidDataStoreContextProps,\n\tILocalFluidDataStoreContextProps,\n\tILocalDetachedFluidDataStoreContextProps,\n\tIFluidDataStoreContextEvents,\n} from \"./dataStoreContext.js\";\nexport { DataStoreContexts } from \"./dataStoreContexts.js\";\n"]}
|
package/dist/legacy.d.ts
CHANGED
|
@@ -14,66 +14,39 @@ export {
|
|
|
14
14
|
CompressionAlgorithms,
|
|
15
15
|
ContainerMessageType,
|
|
16
16
|
DefaultSummaryConfiguration,
|
|
17
|
-
DeletedResponseHeaderKey,
|
|
18
|
-
DocumentSchemaValueType,
|
|
19
|
-
DocumentsSchemaController,
|
|
20
17
|
EnqueueSummarizeResult,
|
|
21
|
-
GCFeatureMatrix,
|
|
22
|
-
GCNodeType,
|
|
23
|
-
GCVersion,
|
|
24
18
|
IAckSummaryResult,
|
|
25
19
|
IAckedSummary,
|
|
26
20
|
IBaseSummarizeResult,
|
|
27
|
-
IBlobManagerLoadInfo,
|
|
28
21
|
IBroadcastSummaryResult,
|
|
29
|
-
ICancellableSummarizerController,
|
|
30
|
-
ICancellationToken,
|
|
31
22
|
IClientSummaryWatcher,
|
|
32
23
|
ICompressionRuntimeOptions,
|
|
33
|
-
IConnectableRuntime,
|
|
34
|
-
IContainerRuntimeMetadata,
|
|
35
24
|
IContainerRuntimeOptions,
|
|
36
|
-
ICreateContainerMetadata,
|
|
37
|
-
IDocumentSchema,
|
|
38
|
-
IDocumentSchemaChangeMessage,
|
|
39
|
-
IDocumentSchemaCurrent,
|
|
40
|
-
IDocumentSchemaFeatures,
|
|
41
25
|
IEnqueueSummarizeOptions,
|
|
42
26
|
IFluidDataStoreAttributes0,
|
|
43
27
|
IFluidDataStoreAttributes1,
|
|
44
28
|
IFluidDataStoreAttributes2,
|
|
45
|
-
IGCMetadata,
|
|
46
29
|
IGCRuntimeOptions,
|
|
47
|
-
IGCStats,
|
|
48
30
|
IGenerateSummaryTreeResult,
|
|
49
31
|
IGeneratedSummaryStats,
|
|
50
|
-
IMarkPhaseStats,
|
|
51
32
|
INackSummaryResult,
|
|
52
33
|
IOnDemandSummarizeOptions,
|
|
53
|
-
IRefreshSummaryAckOptions,
|
|
54
34
|
IRetriableFailureError,
|
|
55
|
-
ISerializedElection,
|
|
56
35
|
ISubmitSummaryOpResult,
|
|
57
|
-
ISubmitSummaryOptions,
|
|
58
36
|
ISummarizeOptions,
|
|
59
37
|
ISummarizeResults,
|
|
60
38
|
ISummarizer,
|
|
61
|
-
ISummarizerInternalsProvider,
|
|
62
|
-
ISummarizerRuntime,
|
|
63
39
|
ISummary,
|
|
64
40
|
ISummaryAckMessage,
|
|
65
41
|
ISummaryBaseConfiguration,
|
|
66
|
-
ISummaryCancellationToken,
|
|
67
42
|
ISummaryCollectionOpEvents,
|
|
68
43
|
ISummaryConfiguration,
|
|
69
44
|
ISummaryConfigurationDisableHeuristics,
|
|
70
45
|
ISummaryConfigurationDisableSummarizer,
|
|
71
46
|
ISummaryConfigurationHeuristics,
|
|
72
|
-
ISummaryMetadataMessage,
|
|
73
47
|
ISummaryNackMessage,
|
|
74
48
|
ISummaryOpMessage,
|
|
75
49
|
ISummaryRuntimeOptions,
|
|
76
|
-
ISweepPhaseStats,
|
|
77
50
|
IUploadSummaryResult,
|
|
78
51
|
IdCompressorMode,
|
|
79
52
|
InactiveResponseHeaderKey,
|
|
@@ -85,11 +58,9 @@ export {
|
|
|
85
58
|
SubmitSummaryFailureData,
|
|
86
59
|
SubmitSummaryResult,
|
|
87
60
|
SummarizeResultPart,
|
|
88
|
-
Summarizer,
|
|
89
61
|
SummaryCollection,
|
|
90
62
|
SummaryStage,
|
|
91
63
|
TombstoneResponseHeaderKey,
|
|
92
|
-
currentDocumentVersionSchema,
|
|
93
64
|
disabledCompressionConfig,
|
|
94
65
|
loadContainerRuntime
|
|
95
66
|
} from "./index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageTypes.d.ts","sourceRoot":"","sources":["../src/messageTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EACN,cAAc,EACd,SAAS,EACT,oBAAoB,EACpB,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"messageTypes.d.ts","sourceRoot":"","sources":["../src/messageTypes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AACxF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EACN,cAAc,EACd,SAAS,EACT,oBAAoB,EACpB,MAAM,8CAA8C,CAAC;AAEtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAElE;;;GAGG;AACH,oBAAY,oBAAoB;IAE/B,gBAAgB,cAAc;IAG9B,MAAM,WAAW;IAGjB,SAAS,cAAc;IAGvB,UAAU,eAAe;IAGzB,MAAM,WAAW;IAGjB,KAAK,UAAU;IAEf;;;;OAIG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,oBAAoB,WAAW;IAE/B;;;OAGG;IACH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AAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,8BAA8B,GACvC,kCAAkC,GAClC,oCAAoC,GACpC,gCAAgC,GAChC,iCAAiC,GACjC,6BAA6B,GAC7B,4BAA4B,GAC5B,mCAAmC,GACnC,yBAAyB,GAEzB,8BAA8B,GAC9B,qCAAqC,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GACrC,kCAAkC,GAClC,qCAAqC,GACrC,iCAAiC,GACjC,6BAA6B,GAC7B,4BAA4B,GAC5B,mCAAmC,GACnC,yBAAyB,GAEzB,8BAA8B,GAC9B,qCAAqC,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,+BAA+B,GACxC,kCAAkC,GAClC,qCAAqC,GACrC,gCAAgC,GAChC,iCAAiC,GACjC,6BAA6B,GAC7B,4BAA4B,GAC5B,mCAAmC,GACnC,yBAAyB,GACzB,qCAAqC,CAAC;AAEzC;;;GAGG;AACH,MAAM,MAAM,uCAAuC,GAAG,IAAI,CACzD,yBAAyB,EACzB,MAAM,GAAG,UAAU,CACnB,GACA,8BAA8B,CAAC"}
|
package/dist/messageTypes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageTypes.js","sourceRoot":"","sources":["../src/messageTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"messageTypes.js","sourceRoot":"","sources":["../src/messageTypes.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAeH;;;GAGG;AACH,IAAY,oBAoCX;AApCD,WAAY,oBAAoB;IAC/B,iCAAiC;IACjC,sDAA8B,CAAA;IAE9B,sBAAsB;IACtB,yCAAiB,CAAA;IAEjB,qBAAqB;IACrB,+CAAuB,CAAA;IAEvB,yFAAyF;IACzF,iDAAyB,CAAA;IAEzB,oDAAoD;IACpD,yCAAiB,CAAA;IAEjB,sCAAsC;IACtC,uCAAe,CAAA;IAEf;;;;OAIG;IACH,qDAA6B,CAAA;IAE7B;;OAEG;IACH,uDAA+B,CAAA;IAE/B;;;OAGG;IACH,iCAAS,CAAA;AACV,CAAC,EApCW,oBAAoB,oCAApB,oBAAoB,QAoC/B","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport type { IdCreationRange } from \"@fluidframework/id-compressor/internal\";\nimport {\n\tIAttachMessage,\n\tIEnvelope,\n\tInboundAttachMessage,\n} from \"@fluidframework/runtime-definitions/internal\";\n\nimport { IDataStoreAliasMessage } from \"./dataStore.js\";\nimport { GarbageCollectionMessage } from \"./gc/index.js\";\nimport { IChunkedOp } from \"./opLifecycle/index.js\";\nimport { IDocumentSchemaChangeMessage } from \"./summary/index.js\";\n\n/**\n * @legacy\n * @alpha\n */\nexport enum ContainerMessageType {\n\t// An op to be delivered to store\n\tFluidDataStoreOp = \"component\",\n\n\t// Creates a new store\n\tAttach = \"attach\",\n\n\t// Chunked operation.\n\tChunkedOp = \"chunkedOp\",\n\n\t// Signifies that a blob has been attached and should not be garbage collected by storage\n\tBlobAttach = \"blobAttach\",\n\n\t// Ties our new clientId to our old one on reconnect\n\tRejoin = \"rejoin\",\n\n\t// Sets the alias of a root data store\n\tAlias = \"alias\",\n\n\t/**\n\t * An op containing an IdRange of Ids allocated using the runtime's IdCompressor since\n\t * the last allocation op was sent.\n\t * See the [IdCompressor README](./id-compressor/README.md) for more details.\n\t */\n\tIdAllocation = \"idAllocation\",\n\n\t/**\n\t * An op that changes document schema\n\t */\n\tDocumentSchemaChange = \"schema\",\n\n\t/**\n\t * Garbage collection specific op. This is sent by the summarizer client when GC runs. It's used to synchronize GC\n\t * state across all clients.\n\t */\n\tGC = \"GC\",\n}\n\n/**\n * The unpacked runtime message / details to be handled or dispatched by the ContainerRuntime.\n * Message type are differentiated via a `type` string and contain different contents depending on their type.\n *\n * IMPORTANT: when creating one to be serialized, set the properties in the order they appear here.\n * This way stringified values can be compared.\n */\ninterface TypedContainerRuntimeMessage<TType extends ContainerMessageType, TContents> {\n\t/**\n\t * Type of the op, within the ContainerRuntime's domain\n\t */\n\ttype: TType;\n\t/**\n\t * Domain-specific contents, interpreted according to the type\n\t */\n\tcontents: TContents;\n}\n\nexport type ContainerRuntimeDataStoreOpMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.FluidDataStoreOp,\n\tIEnvelope\n>;\nexport type InboundContainerRuntimeAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Attach,\n\tInboundAttachMessage\n>;\nexport type OutboundContainerRuntimeAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Attach,\n\tIAttachMessage\n>;\nexport type ContainerRuntimeChunkedOpMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.ChunkedOp,\n\tIChunkedOp\n>;\nexport type ContainerRuntimeBlobAttachMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.BlobAttach,\n\tundefined\n>;\nexport type ContainerRuntimeRejoinMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Rejoin,\n\tundefined\n>;\nexport type ContainerRuntimeAliasMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.Alias,\n\tIDataStoreAliasMessage\n>;\nexport type ContainerRuntimeIdAllocationMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.IdAllocation,\n\tIdCreationRange\n>;\nexport type ContainerRuntimeGCMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.GC,\n\tGarbageCollectionMessage\n>;\nexport type ContainerRuntimeDocumentSchemaMessage = TypedContainerRuntimeMessage<\n\tContainerMessageType.DocumentSchemaChange,\n\tIDocumentSchemaChangeMessage\n>;\n\n/**\n * Represents an unrecognized TypedContainerRuntimeMessage, e.g. a message from a future version of the container runtime.\n * @internal\n */\nexport interface UnknownContainerRuntimeMessage {\n\t/**\n\t * Invalid type of the op, within the ContainerRuntime's domain. This value should never exist at runtime.\n\t * This is useful for type narrowing but should never be used as an actual message type at runtime.\n\t * Actual value will not be \"__unknown...\", but the type `Exclude<string, ContainerMessageType>` is not supported.\n\t */\n\ttype: \"__unknown_container_message_type__never_use_as_value__\";\n\n\t/**\n\t * Domain-specific contents, but not decipherable by an unknown op.\n\t */\n\tcontents: unknown;\n}\n\n/**\n * A {@link TypedContainerRuntimeMessage} that is received from the server and will be processed by the container runtime.\n */\nexport type InboundContainerRuntimeMessage =\n\t| ContainerRuntimeDataStoreOpMessage\n\t| InboundContainerRuntimeAttachMessage\n\t| ContainerRuntimeChunkedOpMessage\n\t| ContainerRuntimeBlobAttachMessage\n\t| ContainerRuntimeRejoinMessage\n\t| ContainerRuntimeAliasMessage\n\t| ContainerRuntimeIdAllocationMessage\n\t| ContainerRuntimeGCMessage\n\t// Inbound messages may include unknown types from other clients, so we include that as a special case here\n\t| UnknownContainerRuntimeMessage\n\t| ContainerRuntimeDocumentSchemaMessage;\n\n/**\n * A {@link TypedContainerRuntimeMessage} that has been generated by the container runtime but is not yet being sent to the server.\n * These are messages generated by the local runtime, before the outbox's op virtualization step.\n */\nexport type LocalContainerRuntimeMessage =\n\t| ContainerRuntimeDataStoreOpMessage\n\t| OutboundContainerRuntimeAttachMessage\n\t| ContainerRuntimeBlobAttachMessage\n\t| ContainerRuntimeRejoinMessage\n\t| ContainerRuntimeAliasMessage\n\t| ContainerRuntimeIdAllocationMessage\n\t| ContainerRuntimeGCMessage\n\t// In rare cases (e.g. related to stashed ops) we could have a local message of an unknown type\n\t| UnknownContainerRuntimeMessage\n\t| ContainerRuntimeDocumentSchemaMessage;\n\n/**\n * A {@link TypedContainerRuntimeMessage} that is being sent to the server from the container runtime.\n */\nexport type OutboundContainerRuntimeMessage =\n\t| ContainerRuntimeDataStoreOpMessage\n\t| OutboundContainerRuntimeAttachMessage\n\t| ContainerRuntimeChunkedOpMessage\n\t| ContainerRuntimeBlobAttachMessage\n\t| ContainerRuntimeRejoinMessage\n\t| ContainerRuntimeAliasMessage\n\t| ContainerRuntimeIdAllocationMessage\n\t| ContainerRuntimeGCMessage\n\t| ContainerRuntimeDocumentSchemaMessage;\n\n/**\n * An unpacked ISequencedDocumentMessage with the inner TypedContainerRuntimeMessage type/contents/etc\n * promoted up to the outer object\n */\nexport type InboundSequencedContainerRuntimeMessage = Omit<\n\tISequencedDocumentMessage,\n\t\"type\" | \"contents\"\n> &\n\tInboundContainerRuntimeMessage;\n"]}
|
package/dist/packageVersion.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
*/
|
|
7
7
|
export declare const pkgName = "@fluidframework/container-runtime";
|
|
8
|
-
export declare const pkgVersion = "2.
|
|
8
|
+
export declare const pkgVersion = "2.30.0";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,sCAAsC,CAAC;AAC3D,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"packageVersion.d.ts","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO,sCAAsC,CAAC;AAC3D,eAAO,MAAM,UAAU,WAAW,CAAC"}
|
package/dist/packageVersion.js
CHANGED
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.pkgVersion = exports.pkgName = void 0;
|
|
10
10
|
exports.pkgName = "@fluidframework/container-runtime";
|
|
11
|
-
exports.pkgVersion = "2.
|
|
11
|
+
exports.pkgVersion = "2.30.0";
|
|
12
12
|
//# sourceMappingURL=packageVersion.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,mCAAmC,CAAC;AAC9C,QAAA,UAAU,GAAG,
|
|
1
|
+
{"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,mCAAmC,CAAC;AAC9C,QAAA,UAAU,GAAG,QAAQ,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.30.0\";\n"]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
import type { ISignalEnvelope } from "@fluidframework/core-interfaces/internal";
|
|
6
|
+
import type { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
|
|
7
|
+
export declare class SignalTelemetryManager {
|
|
8
|
+
private readonly signalTracking;
|
|
9
|
+
/**
|
|
10
|
+
* Identifier to track broadcast signals being submitted in order to
|
|
11
|
+
* allow collection of data around the roundtrip of signal messages.
|
|
12
|
+
*/
|
|
13
|
+
private broadcastSignalSequenceNumber;
|
|
14
|
+
/**
|
|
15
|
+
* Resets the signal tracking state in the {@link SignalTelemetryManager}.
|
|
16
|
+
*/
|
|
17
|
+
resetTracking(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Perform telemetry-related processing of incoming signals.
|
|
20
|
+
* @param envelope - The signal envelope to process.
|
|
21
|
+
* @param logger - The telemetry logger to use for emitting telemetry events.
|
|
22
|
+
* @param consecutiveReconnects - The number of consecutive reconnects that have occurred. Only used for logging.
|
|
23
|
+
*/
|
|
24
|
+
trackReceivedSignal(envelope: ISignalEnvelope, logger: ITelemetryLoggerExt, consecutiveReconnects: number): void;
|
|
25
|
+
/**
|
|
26
|
+
* Updates tracking state for broadcast signals based on the provided signal envelope, and updates the
|
|
27
|
+
* envelope with additional information that the signal needs to have stamped on it.
|
|
28
|
+
* @remarks Do not call this for non-broadcast signals.
|
|
29
|
+
* @param envelope - The signal envelope to process.
|
|
30
|
+
*/
|
|
31
|
+
applyTrackingToBroadcastSignalEnvelope(envelope: ISignalEnvelope): void;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=signalTelemetryProcessing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signalTelemetryProcessing.d.ts","sourceRoot":"","sources":["../src/signalTelemetryProcessing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,KAAK,EACX,mBAAmB,EAEnB,MAAM,0CAA0C,CAAC;AAsDlD,qBAAa,sBAAsB;IAClC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAS7B;IAEF;;;OAGG;IACH,OAAO,CAAC,6BAA6B,CAAa;IAElD;;OAEG;IACI,aAAa,IAAI,IAAI;IAW5B;;;;;OAKG;IACI,mBAAmB,CACzB,QAAQ,EAAE,eAAe,EACzB,MAAM,EAAE,mBAAmB,EAC3B,qBAAqB,EAAE,MAAM,GAC3B,IAAI;IA2FP;;;;;OAKG;IACI,sCAAsC,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;CA8B9E"}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.SignalTelemetryManager = void 0;
|
|
8
|
+
const defaultTelemetrySignalSampleCount = 100;
|
|
9
|
+
class SignalTelemetryManager {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.signalTracking = {
|
|
12
|
+
totalSignalsSentInLatencyWindow: 0,
|
|
13
|
+
signalsLost: 0,
|
|
14
|
+
signalsOutOfOrder: 0,
|
|
15
|
+
signalsSentSinceLastLatencyMeasurement: 0,
|
|
16
|
+
signalTimestamp: 0,
|
|
17
|
+
roundTripSignalSequenceNumber: undefined,
|
|
18
|
+
trackingSignalSequenceNumber: undefined,
|
|
19
|
+
minimumTrackingSignalSequenceNumber: undefined,
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Identifier to track broadcast signals being submitted in order to
|
|
23
|
+
* allow collection of data around the roundtrip of signal messages.
|
|
24
|
+
*/
|
|
25
|
+
this.broadcastSignalSequenceNumber = 0;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Resets the signal tracking state in the {@link SignalTelemetryManager}.
|
|
29
|
+
*/
|
|
30
|
+
resetTracking() {
|
|
31
|
+
this.signalTracking.signalsLost = 0;
|
|
32
|
+
this.signalTracking.signalsOutOfOrder = 0;
|
|
33
|
+
this.signalTracking.signalTimestamp = 0;
|
|
34
|
+
this.signalTracking.signalsSentSinceLastLatencyMeasurement = 0;
|
|
35
|
+
this.signalTracking.totalSignalsSentInLatencyWindow = 0;
|
|
36
|
+
this.signalTracking.roundTripSignalSequenceNumber = undefined;
|
|
37
|
+
this.signalTracking.trackingSignalSequenceNumber = undefined;
|
|
38
|
+
this.signalTracking.minimumTrackingSignalSequenceNumber = undefined;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Perform telemetry-related processing of incoming signals.
|
|
42
|
+
* @param envelope - The signal envelope to process.
|
|
43
|
+
* @param logger - The telemetry logger to use for emitting telemetry events.
|
|
44
|
+
* @param consecutiveReconnects - The number of consecutive reconnects that have occurred. Only used for logging.
|
|
45
|
+
*/
|
|
46
|
+
trackReceivedSignal(envelope, logger, consecutiveReconnects) {
|
|
47
|
+
const { clientBroadcastSignalSequenceNumber, contents: envelopeContents, address: envelopeAddress, } = envelope;
|
|
48
|
+
if (clientBroadcastSignalSequenceNumber === undefined) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
// If no tracking window has been set, nothing to do
|
|
52
|
+
if (this.signalTracking.trackingSignalSequenceNumber === undefined ||
|
|
53
|
+
this.signalTracking.minimumTrackingSignalSequenceNumber === undefined) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
if (clientBroadcastSignalSequenceNumber >= this.signalTracking.trackingSignalSequenceNumber) {
|
|
57
|
+
// Calculate the number of signals lost and log the event.
|
|
58
|
+
const signalsLost = clientBroadcastSignalSequenceNumber - this.signalTracking.trackingSignalSequenceNumber;
|
|
59
|
+
if (signalsLost > 0) {
|
|
60
|
+
this.signalTracking.signalsLost += signalsLost;
|
|
61
|
+
logger.sendErrorEvent({
|
|
62
|
+
eventName: "SignalLost",
|
|
63
|
+
details: {
|
|
64
|
+
signalsLost, // Number of lost signals detected.
|
|
65
|
+
expectedSequenceNumber: this.signalTracking.trackingSignalSequenceNumber, // The next expected signal sequence number.
|
|
66
|
+
clientBroadcastSignalSequenceNumber, // Actual signal sequence number received.
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
// Update the tracking signal sequence number to the next expected signal in the sequence.
|
|
71
|
+
this.signalTracking.trackingSignalSequenceNumber =
|
|
72
|
+
clientBroadcastSignalSequenceNumber + 1;
|
|
73
|
+
}
|
|
74
|
+
else if (
|
|
75
|
+
// Check if this is a signal in range of interest.
|
|
76
|
+
clientBroadcastSignalSequenceNumber >=
|
|
77
|
+
this.signalTracking.minimumTrackingSignalSequenceNumber) {
|
|
78
|
+
this.signalTracking.signalsOutOfOrder++;
|
|
79
|
+
const details = {
|
|
80
|
+
expectedSequenceNumber: this.signalTracking.trackingSignalSequenceNumber, // The next expected signal sequence number.
|
|
81
|
+
clientBroadcastSignalSequenceNumber, // Sequence number of the out of order signal.
|
|
82
|
+
};
|
|
83
|
+
// Only log `contents.type` when address is for container to avoid chance that contents type is customer data.
|
|
84
|
+
if (envelopeAddress === undefined) {
|
|
85
|
+
details.contentsType = envelopeContents.type; // Type of signal that was received out of order.
|
|
86
|
+
}
|
|
87
|
+
logger.sendTelemetryEvent({
|
|
88
|
+
eventName: "SignalOutOfOrder",
|
|
89
|
+
details,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
if (this.signalTracking.roundTripSignalSequenceNumber !== undefined &&
|
|
93
|
+
clientBroadcastSignalSequenceNumber >= this.signalTracking.roundTripSignalSequenceNumber) {
|
|
94
|
+
if (clientBroadcastSignalSequenceNumber ===
|
|
95
|
+
this.signalTracking.roundTripSignalSequenceNumber) {
|
|
96
|
+
// Latency tracked signal has been received.
|
|
97
|
+
// We now emit telemetry with the roundtrip duration of the tracked signal.
|
|
98
|
+
// The telemetry event also includes metrics for broadcast signals (sent, lost, and out of order),
|
|
99
|
+
// and these metrics are reset after emitting the event.
|
|
100
|
+
const duration = Date.now() - this.signalTracking.signalTimestamp;
|
|
101
|
+
logger.sendPerformanceEvent({
|
|
102
|
+
eventName: "SignalLatency",
|
|
103
|
+
details: {
|
|
104
|
+
duration, // Roundtrip duration of the tracked signal in milliseconds.
|
|
105
|
+
sent: this.signalTracking.totalSignalsSentInLatencyWindow, // Signals sent since the last logged SignalLatency event.
|
|
106
|
+
lost: this.signalTracking.signalsLost, // Signals lost since the last logged SignalLatency event.
|
|
107
|
+
outOfOrder: this.signalTracking.signalsOutOfOrder, // Out of order signals since the last logged SignalLatency event.
|
|
108
|
+
reconnectCount: consecutiveReconnects, // Container reconnect count.
|
|
109
|
+
},
|
|
110
|
+
});
|
|
111
|
+
this.signalTracking.signalsLost = 0;
|
|
112
|
+
this.signalTracking.signalsOutOfOrder = 0;
|
|
113
|
+
this.signalTracking.signalTimestamp = 0;
|
|
114
|
+
this.signalTracking.totalSignalsSentInLatencyWindow = 0;
|
|
115
|
+
}
|
|
116
|
+
this.signalTracking.roundTripSignalSequenceNumber = undefined;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Updates tracking state for broadcast signals based on the provided signal envelope, and updates the
|
|
121
|
+
* envelope with additional information that the signal needs to have stamped on it.
|
|
122
|
+
* @remarks Do not call this for non-broadcast signals.
|
|
123
|
+
* @param envelope - The signal envelope to process.
|
|
124
|
+
*/
|
|
125
|
+
applyTrackingToBroadcastSignalEnvelope(envelope) {
|
|
126
|
+
const broadcastSignalSequenceNumber = ++this.broadcastSignalSequenceNumber;
|
|
127
|
+
// Stamp with the broadcast signal sequence number.
|
|
128
|
+
envelope.clientBroadcastSignalSequenceNumber = broadcastSignalSequenceNumber;
|
|
129
|
+
this.signalTracking.signalsSentSinceLastLatencyMeasurement++;
|
|
130
|
+
// If we don't have a signal monitoring window yet,
|
|
131
|
+
// initialize tracking to expect the next signal sent by the connected client.
|
|
132
|
+
if (this.signalTracking.minimumTrackingSignalSequenceNumber === undefined ||
|
|
133
|
+
this.signalTracking.trackingSignalSequenceNumber === undefined) {
|
|
134
|
+
this.signalTracking.minimumTrackingSignalSequenceNumber = broadcastSignalSequenceNumber;
|
|
135
|
+
this.signalTracking.trackingSignalSequenceNumber = broadcastSignalSequenceNumber;
|
|
136
|
+
}
|
|
137
|
+
// Start tracking roundtrip for a new signal only if we are not tracking one already (and sampling logic is met)
|
|
138
|
+
if (this.signalTracking.roundTripSignalSequenceNumber === undefined &&
|
|
139
|
+
broadcastSignalSequenceNumber % defaultTelemetrySignalSampleCount === 1) {
|
|
140
|
+
this.signalTracking.signalTimestamp = Date.now();
|
|
141
|
+
this.signalTracking.roundTripSignalSequenceNumber = broadcastSignalSequenceNumber;
|
|
142
|
+
this.signalTracking.totalSignalsSentInLatencyWindow +=
|
|
143
|
+
this.signalTracking.signalsSentSinceLastLatencyMeasurement;
|
|
144
|
+
this.signalTracking.signalsSentSinceLastLatencyMeasurement = 0;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
exports.SignalTelemetryManager = SignalTelemetryManager;
|
|
149
|
+
//# sourceMappingURL=signalTelemetryProcessing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signalTelemetryProcessing.js","sourceRoot":"","sources":["../src/signalTelemetryProcessing.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAQH,MAAM,iCAAiC,GAAG,GAAG,CAAC;AAoD9C,MAAa,sBAAsB;IAAnC;QACkB,mBAAc,GAA6B;YAC3D,+BAA+B,EAAE,CAAC;YAClC,WAAW,EAAE,CAAC;YACd,iBAAiB,EAAE,CAAC;YACpB,sCAAsC,EAAE,CAAC;YACzC,eAAe,EAAE,CAAC;YAClB,6BAA6B,EAAE,SAAS;YACxC,4BAA4B,EAAE,SAAS;YACvC,mCAAmC,EAAE,SAAS;SAC9C,CAAC;QAEF;;;WAGG;QACK,kCAA6B,GAAW,CAAC,CAAC;IAyJnD,CAAC;IAvJA;;OAEG;IACI,aAAa;QACnB,IAAI,CAAC,cAAc,CAAC,WAAW,GAAG,CAAC,CAAC;QACpC,IAAI,CAAC,cAAc,CAAC,iBAAiB,GAAG,CAAC,CAAC;QAC1C,IAAI,CAAC,cAAc,CAAC,eAAe,GAAG,CAAC,CAAC;QACxC,IAAI,CAAC,cAAc,CAAC,sCAAsC,GAAG,CAAC,CAAC;QAC/D,IAAI,CAAC,cAAc,CAAC,+BAA+B,GAAG,CAAC,CAAC;QACxD,IAAI,CAAC,cAAc,CAAC,6BAA6B,GAAG,SAAS,CAAC;QAC9D,IAAI,CAAC,cAAc,CAAC,4BAA4B,GAAG,SAAS,CAAC;QAC7D,IAAI,CAAC,cAAc,CAAC,mCAAmC,GAAG,SAAS,CAAC;IACrE,CAAC;IAED;;;;;OAKG;IACI,mBAAmB,CACzB,QAAyB,EACzB,MAA2B,EAC3B,qBAA6B;QAE7B,MAAM,EACL,mCAAmC,EACnC,QAAQ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IAED;;;;;OAKG;IACI,sCAAsC,CAAC,QAAyB;QACtE,MAAM,6BAA6B,GAAG,EAAE,IAAI,CAAC,6BAA6B,CAAC;QAE3E,mDAAmD;QACnD,QAAQ,CAAC,mCAAmC,GAAG,6BAA6B,CAAC;QAE7E,IAAI,CAAC,cAAc,CAAC,sCAAsC,EAAE,CAAC;QAE7D,mDAAmD;QACnD,8EAA8E;QAC9E,IACC,IAAI,CAAC,cAAc,CAAC,mCAAmC,KAAK,SAAS;YACrE,IAAI,CAAC,cAAc,CAAC,4BAA4B,KAAK,SAAS,EAC7D,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,mCAAmC,GAAG,6BAA6B,CAAC;YACxF,IAAI,CAAC,cAAc,CAAC,4BAA4B,GAAG,6BAA6B,CAAC;QAClF,CAAC;QAED,gHAAgH;QAChH,IACC,IAAI,CAAC,cAAc,CAAC,6BAA6B,KAAK,SAAS;YAC/D,6BAA6B,GAAG,iCAAiC,KAAK,CAAC,EACtE,CAAC;YACF,IAAI,CAAC,cAAc,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACjD,IAAI,CAAC,cAAc,CAAC,6BAA6B,GAAG,6BAA6B,CAAC;YAClF,IAAI,CAAC,cAAc,CAAC,+BAA+B;gBAClD,IAAI,CAAC,cAAc,CAAC,sCAAsC,CAAC;YAC5D,IAAI,CAAC,cAAc,CAAC,sCAAsC,GAAG,CAAC,CAAC;QAChE,CAAC;IACF,CAAC;CACD;AAzKD,wDAyKC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { ISignalEnvelope } from \"@fluidframework/core-interfaces/internal\";\nimport type {\n\tITelemetryLoggerExt,\n\tTelemetryEventPropertyTypeExt,\n} from \"@fluidframework/telemetry-utils/internal\";\n\nconst defaultTelemetrySignalSampleCount = 100;\n\n/**\n * Set of stats/values used to keep track of telemetry related to signals.\n */\ninterface ISignalTelemetryTracking {\n\t/**\n\t * Accumulates the total number of broadcast signals sent during the current signal latency measurement window.\n\t * This value represents the total number of signals sent since the latency measurement began and is used\n\t * logged in telemetry when the latency measurement completes.\n\t */\n\ttotalSignalsSentInLatencyWindow: number;\n\n\t/**\n\t * Counts the number of broadcast signals sent since the last latency measurement was initiated.\n\t * This counter increments with each broadcast signal sent. When a new latency measurement starts,\n\t * this counter is added to `totalSignalsSentInLatencyWindow` and then reset to zero.\n\t */\n\tsignalsSentSinceLastLatencyMeasurement: number;\n\n\t/**\n\t * Number of signals that were expected but not received.\n\t */\n\tsignalsLost: number;\n\n\t/**\n\t * Number of signals received out of order/non-sequentially.\n\t */\n\tsignalsOutOfOrder: number;\n\n\t/**\n\t * Timestamp before submitting the signal we will trace.\n\t */\n\tsignalTimestamp: number;\n\n\t/**\n\t * Signal we will trace for roundtrip latency.\n\t */\n\troundTripSignalSequenceNumber: number | undefined;\n\n\t/**\n\t * Next expected signal sequence number to be received.\n\t */\n\ttrackingSignalSequenceNumber: number | undefined;\n\n\t/**\n\t * Inclusive lower bound of signal monitoring window.\n\t * Used by the logic that checks if signals are received out of order.\n\t */\n\tminimumTrackingSignalSequenceNumber: number | undefined;\n}\n\nexport class SignalTelemetryManager {\n\tprivate readonly signalTracking: ISignalTelemetryTracking = {\n\t\ttotalSignalsSentInLatencyWindow: 0,\n\t\tsignalsLost: 0,\n\t\tsignalsOutOfOrder: 0,\n\t\tsignalsSentSinceLastLatencyMeasurement: 0,\n\t\tsignalTimestamp: 0,\n\t\troundTripSignalSequenceNumber: undefined,\n\t\ttrackingSignalSequenceNumber: undefined,\n\t\tminimumTrackingSignalSequenceNumber: undefined,\n\t};\n\n\t/**\n\t * Identifier to track broadcast signals being submitted in order to\n\t * allow collection of data around the roundtrip of signal messages.\n\t */\n\tprivate broadcastSignalSequenceNumber: number = 0;\n\n\t/**\n\t * Resets the signal tracking state in the {@link SignalTelemetryManager}.\n\t */\n\tpublic resetTracking(): void {\n\t\tthis.signalTracking.signalsLost = 0;\n\t\tthis.signalTracking.signalsOutOfOrder = 0;\n\t\tthis.signalTracking.signalTimestamp = 0;\n\t\tthis.signalTracking.signalsSentSinceLastLatencyMeasurement = 0;\n\t\tthis.signalTracking.totalSignalsSentInLatencyWindow = 0;\n\t\tthis.signalTracking.roundTripSignalSequenceNumber = undefined;\n\t\tthis.signalTracking.trackingSignalSequenceNumber = undefined;\n\t\tthis.signalTracking.minimumTrackingSignalSequenceNumber = undefined;\n\t}\n\n\t/**\n\t * Perform telemetry-related processing of incoming signals.\n\t * @param envelope - The signal envelope to process.\n\t * @param logger - The telemetry logger to use for emitting telemetry events.\n\t * @param consecutiveReconnects - The number of consecutive reconnects that have occurred. Only used for logging.\n\t */\n\tpublic trackReceivedSignal(\n\t\tenvelope: ISignalEnvelope,\n\t\tlogger: ITelemetryLoggerExt,\n\t\tconsecutiveReconnects: number,\n\t): void {\n\t\tconst {\n\t\t\tclientBroadcastSignalSequenceNumber,\n\t\t\tcontents: envelopeContents,\n\t\t\taddress: envelopeAddress,\n\t\t} = envelope;\n\n\t\tif (clientBroadcastSignalSequenceNumber === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// If no tracking window has been set, nothing to do\n\t\tif (\n\t\t\tthis.signalTracking.trackingSignalSequenceNumber === undefined ||\n\t\t\tthis.signalTracking.minimumTrackingSignalSequenceNumber === undefined\n\t\t) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif (\n\t\t\tclientBroadcastSignalSequenceNumber >= this.signalTracking.trackingSignalSequenceNumber\n\t\t) {\n\t\t\t// Calculate the number of signals lost and log the event.\n\t\t\tconst signalsLost =\n\t\t\t\tclientBroadcastSignalSequenceNumber - this.signalTracking.trackingSignalSequenceNumber;\n\t\t\tif (signalsLost > 0) {\n\t\t\t\tthis.signalTracking.signalsLost += signalsLost;\n\t\t\t\tlogger.sendErrorEvent({\n\t\t\t\t\teventName: \"SignalLost\",\n\t\t\t\t\tdetails: {\n\t\t\t\t\t\tsignalsLost, // Number of lost signals detected.\n\t\t\t\t\t\texpectedSequenceNumber: this.signalTracking.trackingSignalSequenceNumber, // The next expected signal sequence number.\n\t\t\t\t\t\tclientBroadcastSignalSequenceNumber, // Actual signal sequence number received.\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t}\n\t\t\t// Update the tracking signal sequence number to the next expected signal in the sequence.\n\t\t\tthis.signalTracking.trackingSignalSequenceNumber =\n\t\t\t\tclientBroadcastSignalSequenceNumber + 1;\n\t\t} else if (\n\t\t\t// Check if this is a signal in range of interest.\n\t\t\tclientBroadcastSignalSequenceNumber >=\n\t\t\tthis.signalTracking.minimumTrackingSignalSequenceNumber\n\t\t) {\n\t\t\tthis.signalTracking.signalsOutOfOrder++;\n\t\t\tconst details: TelemetryEventPropertyTypeExt = {\n\t\t\t\texpectedSequenceNumber: this.signalTracking.trackingSignalSequenceNumber, // The next expected signal sequence number.\n\t\t\t\tclientBroadcastSignalSequenceNumber, // Sequence number of the out of order signal.\n\t\t\t};\n\t\t\t// Only log `contents.type` when address is for container to avoid chance that contents type is customer data.\n\t\t\tif (envelopeAddress === undefined) {\n\t\t\t\tdetails.contentsType = envelopeContents.type; // Type of signal that was received out of order.\n\t\t\t}\n\t\t\tlogger.sendTelemetryEvent({\n\t\t\t\teventName: \"SignalOutOfOrder\",\n\t\t\t\tdetails,\n\t\t\t});\n\t\t}\n\n\t\tif (\n\t\t\tthis.signalTracking.roundTripSignalSequenceNumber !== undefined &&\n\t\t\tclientBroadcastSignalSequenceNumber >= this.signalTracking.roundTripSignalSequenceNumber\n\t\t) {\n\t\t\tif (\n\t\t\t\tclientBroadcastSignalSequenceNumber ===\n\t\t\t\tthis.signalTracking.roundTripSignalSequenceNumber\n\t\t\t) {\n\t\t\t\t// Latency tracked signal has been received.\n\t\t\t\t// We now emit telemetry with the roundtrip duration of the tracked signal.\n\t\t\t\t// The telemetry event also includes metrics for broadcast signals (sent, lost, and out of order),\n\t\t\t\t// and these metrics are reset after emitting the event.\n\t\t\t\tconst duration = Date.now() - this.signalTracking.signalTimestamp;\n\t\t\t\tlogger.sendPerformanceEvent({\n\t\t\t\t\teventName: \"SignalLatency\",\n\t\t\t\t\tdetails: {\n\t\t\t\t\t\tduration, // Roundtrip duration of the tracked signal in milliseconds.\n\t\t\t\t\t\tsent: this.signalTracking.totalSignalsSentInLatencyWindow, // Signals sent since the last logged SignalLatency event.\n\t\t\t\t\t\tlost: this.signalTracking.signalsLost, // Signals lost since the last logged SignalLatency event.\n\t\t\t\t\t\toutOfOrder: this.signalTracking.signalsOutOfOrder, // Out of order signals since the last logged SignalLatency event.\n\t\t\t\t\t\treconnectCount: consecutiveReconnects, // Container reconnect count.\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\tthis.signalTracking.signalsLost = 0;\n\t\t\t\tthis.signalTracking.signalsOutOfOrder = 0;\n\t\t\t\tthis.signalTracking.signalTimestamp = 0;\n\t\t\t\tthis.signalTracking.totalSignalsSentInLatencyWindow = 0;\n\t\t\t}\n\t\t\tthis.signalTracking.roundTripSignalSequenceNumber = undefined;\n\t\t}\n\t}\n\n\t/**\n\t * Updates tracking state for broadcast signals based on the provided signal envelope, and updates the\n\t * envelope with additional information that the signal needs to have stamped on it.\n\t * @remarks Do not call this for non-broadcast signals.\n\t * @param envelope - The signal envelope to process.\n\t */\n\tpublic applyTrackingToBroadcastSignalEnvelope(envelope: ISignalEnvelope): void {\n\t\tconst broadcastSignalSequenceNumber = ++this.broadcastSignalSequenceNumber;\n\n\t\t// Stamp with the broadcast signal sequence number.\n\t\tenvelope.clientBroadcastSignalSequenceNumber = broadcastSignalSequenceNumber;\n\n\t\tthis.signalTracking.signalsSentSinceLastLatencyMeasurement++;\n\n\t\t// If we don't have a signal monitoring window yet,\n\t\t// initialize tracking to expect the next signal sent by the connected client.\n\t\tif (\n\t\t\tthis.signalTracking.minimumTrackingSignalSequenceNumber === undefined ||\n\t\t\tthis.signalTracking.trackingSignalSequenceNumber === undefined\n\t\t) {\n\t\t\tthis.signalTracking.minimumTrackingSignalSequenceNumber = broadcastSignalSequenceNumber;\n\t\t\tthis.signalTracking.trackingSignalSequenceNumber = broadcastSignalSequenceNumber;\n\t\t}\n\n\t\t// Start tracking roundtrip for a new signal only if we are not tracking one already (and sampling logic is met)\n\t\tif (\n\t\t\tthis.signalTracking.roundTripSignalSequenceNumber === undefined &&\n\t\t\tbroadcastSignalSequenceNumber % defaultTelemetrySignalSampleCount === 1\n\t\t) {\n\t\t\tthis.signalTracking.signalTimestamp = Date.now();\n\t\t\tthis.signalTracking.roundTripSignalSequenceNumber = broadcastSignalSequenceNumber;\n\t\t\tthis.signalTracking.totalSignalsSentInLatencyWindow +=\n\t\t\t\tthis.signalTracking.signalsSentSinceLastLatencyMeasurement;\n\t\t\tthis.signalTracking.signalsSentSinceLastLatencyMeasurement = 0;\n\t\t}\n\t}\n}\n"]}
|