@fluidframework/container-runtime 2.102.0 → 2.103.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.
Files changed (209) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/container-runtime.test-files.tar +0 -0
  3. package/dist/batchTracker.d.ts +1 -1
  4. package/dist/batchTracker.d.ts.map +1 -1
  5. package/dist/batchTracker.js +1 -1
  6. package/dist/batchTracker.js.map +1 -1
  7. package/dist/blobManager/blobManagerSnapSum.d.ts +2 -2
  8. package/dist/blobManager/blobManagerSnapSum.d.ts.map +1 -1
  9. package/dist/blobManager/blobManagerSnapSum.js.map +1 -1
  10. package/dist/connectionTelemetry.js.map +1 -1
  11. package/dist/containerRuntime.d.ts +16 -5
  12. package/dist/containerRuntime.d.ts.map +1 -1
  13. package/dist/containerRuntime.js +112 -9
  14. package/dist/containerRuntime.js.map +1 -1
  15. package/dist/dataStore.d.ts +2 -2
  16. package/dist/dataStore.d.ts.map +1 -1
  17. package/dist/dataStore.js.map +1 -1
  18. package/dist/dataStoreContexts.d.ts.map +1 -1
  19. package/dist/dataStoreContexts.js.map +1 -1
  20. package/dist/deltaScheduler.d.ts +2 -2
  21. package/dist/deltaScheduler.d.ts.map +1 -1
  22. package/dist/deltaScheduler.js.map +1 -1
  23. package/dist/gc/garbageCollection.d.ts +2 -2
  24. package/dist/gc/garbageCollection.d.ts.map +1 -1
  25. package/dist/gc/garbageCollection.js.map +1 -1
  26. package/dist/gc/gcDefinitions.d.ts +3 -3
  27. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  28. package/dist/gc/gcDefinitions.js.map +1 -1
  29. package/dist/gc/gcTelemetry.d.ts +3 -3
  30. package/dist/gc/gcTelemetry.d.ts.map +1 -1
  31. package/dist/gc/gcTelemetry.js.map +1 -1
  32. package/dist/inboundBatchAggregator.d.ts +2 -2
  33. package/dist/inboundBatchAggregator.d.ts.map +1 -1
  34. package/dist/inboundBatchAggregator.js.map +1 -1
  35. package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
  36. package/dist/opLifecycle/opCompressor.js.map +1 -1
  37. package/dist/opLifecycle/opDecompressor.d.ts.map +1 -1
  38. package/dist/opLifecycle/opDecompressor.js.map +1 -1
  39. package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
  40. package/dist/opLifecycle/opGroupingManager.js.map +1 -1
  41. package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
  42. package/dist/opLifecycle/opSplitter.js.map +1 -1
  43. package/dist/opLifecycle/outbox.d.ts.map +1 -1
  44. package/dist/opLifecycle/outbox.js.map +1 -1
  45. package/dist/packageVersion.d.ts +1 -1
  46. package/dist/packageVersion.js +1 -1
  47. package/dist/packageVersion.js.map +1 -1
  48. package/dist/pendingStateManager.d.ts +48 -1
  49. package/dist/pendingStateManager.d.ts.map +1 -1
  50. package/dist/pendingStateManager.js +54 -1
  51. package/dist/pendingStateManager.js.map +1 -1
  52. package/dist/runtimeLayerCompatState.d.ts +1 -1
  53. package/dist/signalTelemetryProcessing.d.ts +2 -2
  54. package/dist/signalTelemetryProcessing.d.ts.map +1 -1
  55. package/dist/signalTelemetryProcessing.js.map +1 -1
  56. package/dist/summary/documentSchema.d.ts +2 -2
  57. package/dist/summary/documentSchema.d.ts.map +1 -1
  58. package/dist/summary/documentSchema.js.map +1 -1
  59. package/dist/summary/orderedClientElection.d.ts +2 -2
  60. package/dist/summary/orderedClientElection.d.ts.map +1 -1
  61. package/dist/summary/orderedClientElection.js.map +1 -1
  62. package/dist/summary/summarizerClientElection.d.ts +2 -2
  63. package/dist/summary/summarizerClientElection.d.ts.map +1 -1
  64. package/dist/summary/summarizerClientElection.js.map +1 -1
  65. package/dist/summary/summarizerNode/summarizerNode.d.ts +3 -3
  66. package/dist/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  67. package/dist/summary/summarizerNode/summarizerNode.js.map +1 -1
  68. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -2
  69. package/dist/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  70. package/dist/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  71. package/dist/summary/summarizerTypes.d.ts +3 -3
  72. package/dist/summary/summarizerTypes.d.ts.map +1 -1
  73. package/dist/summary/summarizerTypes.js.map +1 -1
  74. package/dist/summary/summaryCollection.d.ts.map +1 -1
  75. package/dist/summary/summaryCollection.js.map +1 -1
  76. package/dist/summary/summaryDelayLoadedModule/runningSummarizer.d.ts +2 -2
  77. package/dist/summary/summaryDelayLoadedModule/runningSummarizer.d.ts.map +1 -1
  78. package/dist/summary/summaryDelayLoadedModule/runningSummarizer.js.map +1 -1
  79. package/dist/summary/summaryDelayLoadedModule/summarizer.d.ts +2 -2
  80. package/dist/summary/summaryDelayLoadedModule/summarizer.d.ts.map +1 -1
  81. package/dist/summary/summaryDelayLoadedModule/summarizer.js.map +1 -1
  82. package/dist/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts +2 -2
  83. package/dist/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts.map +1 -1
  84. package/dist/summary/summaryDelayLoadedModule/summarizerHeuristics.js.map +1 -1
  85. package/dist/summary/summaryDelayLoadedModule/summaryGenerator.d.ts +2 -2
  86. package/dist/summary/summaryDelayLoadedModule/summaryGenerator.d.ts.map +1 -1
  87. package/dist/summary/summaryDelayLoadedModule/summaryGenerator.js.map +1 -1
  88. package/dist/summary/summaryManager.d.ts.map +1 -1
  89. package/dist/summary/summaryManager.js.map +1 -1
  90. package/lib/batchTracker.d.ts +1 -1
  91. package/lib/batchTracker.d.ts.map +1 -1
  92. package/lib/batchTracker.js +1 -1
  93. package/lib/batchTracker.js.map +1 -1
  94. package/lib/blobManager/blobManagerSnapSum.d.ts +2 -2
  95. package/lib/blobManager/blobManagerSnapSum.d.ts.map +1 -1
  96. package/lib/blobManager/blobManagerSnapSum.js.map +1 -1
  97. package/lib/connectionTelemetry.js.map +1 -1
  98. package/lib/containerRuntime.d.ts +16 -5
  99. package/lib/containerRuntime.d.ts.map +1 -1
  100. package/lib/containerRuntime.js +112 -9
  101. package/lib/containerRuntime.js.map +1 -1
  102. package/lib/dataStore.d.ts +2 -2
  103. package/lib/dataStore.d.ts.map +1 -1
  104. package/lib/dataStore.js.map +1 -1
  105. package/lib/dataStoreContexts.d.ts.map +1 -1
  106. package/lib/dataStoreContexts.js.map +1 -1
  107. package/lib/deltaScheduler.d.ts +2 -2
  108. package/lib/deltaScheduler.d.ts.map +1 -1
  109. package/lib/deltaScheduler.js +1 -1
  110. package/lib/deltaScheduler.js.map +1 -1
  111. package/lib/gc/garbageCollection.d.ts +2 -2
  112. package/lib/gc/garbageCollection.d.ts.map +1 -1
  113. package/lib/gc/garbageCollection.js.map +1 -1
  114. package/lib/gc/gcDefinitions.d.ts +3 -3
  115. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  116. package/lib/gc/gcDefinitions.js.map +1 -1
  117. package/lib/gc/gcTelemetry.d.ts +3 -3
  118. package/lib/gc/gcTelemetry.d.ts.map +1 -1
  119. package/lib/gc/gcTelemetry.js.map +1 -1
  120. package/lib/inboundBatchAggregator.d.ts +2 -2
  121. package/lib/inboundBatchAggregator.d.ts.map +1 -1
  122. package/lib/inboundBatchAggregator.js.map +1 -1
  123. package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
  124. package/lib/opLifecycle/opCompressor.js.map +1 -1
  125. package/lib/opLifecycle/opDecompressor.d.ts.map +1 -1
  126. package/lib/opLifecycle/opDecompressor.js.map +1 -1
  127. package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
  128. package/lib/opLifecycle/opGroupingManager.js.map +1 -1
  129. package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
  130. package/lib/opLifecycle/opSplitter.js.map +1 -1
  131. package/lib/opLifecycle/outbox.d.ts.map +1 -1
  132. package/lib/opLifecycle/outbox.js.map +1 -1
  133. package/lib/packageVersion.d.ts +1 -1
  134. package/lib/packageVersion.js +1 -1
  135. package/lib/packageVersion.js.map +1 -1
  136. package/lib/pendingStateManager.d.ts +48 -1
  137. package/lib/pendingStateManager.d.ts.map +1 -1
  138. package/lib/pendingStateManager.js +54 -1
  139. package/lib/pendingStateManager.js.map +1 -1
  140. package/lib/runtimeLayerCompatState.d.ts +1 -1
  141. package/lib/signalTelemetryProcessing.d.ts +2 -2
  142. package/lib/signalTelemetryProcessing.d.ts.map +1 -1
  143. package/lib/signalTelemetryProcessing.js.map +1 -1
  144. package/lib/summary/documentSchema.d.ts +2 -2
  145. package/lib/summary/documentSchema.d.ts.map +1 -1
  146. package/lib/summary/documentSchema.js.map +1 -1
  147. package/lib/summary/orderedClientElection.d.ts +2 -2
  148. package/lib/summary/orderedClientElection.d.ts.map +1 -1
  149. package/lib/summary/orderedClientElection.js.map +1 -1
  150. package/lib/summary/summarizerClientElection.d.ts +2 -2
  151. package/lib/summary/summarizerClientElection.d.ts.map +1 -1
  152. package/lib/summary/summarizerClientElection.js.map +1 -1
  153. package/lib/summary/summarizerNode/summarizerNode.d.ts +3 -3
  154. package/lib/summary/summarizerNode/summarizerNode.d.ts.map +1 -1
  155. package/lib/summary/summarizerNode/summarizerNode.js.map +1 -1
  156. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts +2 -2
  157. package/lib/summary/summarizerNode/summarizerNodeUtils.d.ts.map +1 -1
  158. package/lib/summary/summarizerNode/summarizerNodeUtils.js.map +1 -1
  159. package/lib/summary/summarizerTypes.d.ts +3 -3
  160. package/lib/summary/summarizerTypes.d.ts.map +1 -1
  161. package/lib/summary/summarizerTypes.js.map +1 -1
  162. package/lib/summary/summaryCollection.d.ts.map +1 -1
  163. package/lib/summary/summaryCollection.js.map +1 -1
  164. package/lib/summary/summaryDelayLoadedModule/runningSummarizer.d.ts +2 -2
  165. package/lib/summary/summaryDelayLoadedModule/runningSummarizer.d.ts.map +1 -1
  166. package/lib/summary/summaryDelayLoadedModule/runningSummarizer.js.map +1 -1
  167. package/lib/summary/summaryDelayLoadedModule/summarizer.d.ts +2 -2
  168. package/lib/summary/summaryDelayLoadedModule/summarizer.d.ts.map +1 -1
  169. package/lib/summary/summaryDelayLoadedModule/summarizer.js.map +1 -1
  170. package/lib/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts +2 -2
  171. package/lib/summary/summaryDelayLoadedModule/summarizerHeuristics.d.ts.map +1 -1
  172. package/lib/summary/summaryDelayLoadedModule/summarizerHeuristics.js.map +1 -1
  173. package/lib/summary/summaryDelayLoadedModule/summaryGenerator.d.ts +2 -2
  174. package/lib/summary/summaryDelayLoadedModule/summaryGenerator.d.ts.map +1 -1
  175. package/lib/summary/summaryDelayLoadedModule/summaryGenerator.js.map +1 -1
  176. package/lib/summary/summaryManager.d.ts.map +1 -1
  177. package/lib/summary/summaryManager.js.map +1 -1
  178. package/package.json +17 -17
  179. package/src/batchTracker.ts +3 -3
  180. package/src/blobManager/blobManagerSnapSum.ts +2 -2
  181. package/src/connectionTelemetry.ts +3 -3
  182. package/src/containerRuntime.ts +134 -15
  183. package/src/dataStore.ts +3 -3
  184. package/src/dataStoreContexts.ts +2 -2
  185. package/src/deltaScheduler.ts +2 -5
  186. package/src/gc/garbageCollection.ts +4 -4
  187. package/src/gc/gcDefinitions.ts +3 -3
  188. package/src/gc/gcTelemetry.ts +3 -3
  189. package/src/inboundBatchAggregator.ts +2 -2
  190. package/src/opLifecycle/opCompressor.ts +2 -2
  191. package/src/opLifecycle/opDecompressor.ts +2 -2
  192. package/src/opLifecycle/opGroupingManager.ts +2 -2
  193. package/src/opLifecycle/opSplitter.ts +2 -2
  194. package/src/opLifecycle/outbox.ts +2 -2
  195. package/src/packageVersion.ts +1 -1
  196. package/src/pendingStateManager.ts +80 -2
  197. package/src/signalTelemetryProcessing.ts +2 -2
  198. package/src/summary/documentSchema.ts +2 -2
  199. package/src/summary/orderedClientElection.ts +3 -3
  200. package/src/summary/summarizerClientElection.ts +2 -2
  201. package/src/summary/summarizerNode/summarizerNode.ts +3 -3
  202. package/src/summary/summarizerNode/summarizerNodeUtils.ts +2 -2
  203. package/src/summary/summarizerTypes.ts +3 -3
  204. package/src/summary/summaryCollection.ts +2 -2
  205. package/src/summary/summaryDelayLoadedModule/runningSummarizer.ts +2 -4
  206. package/src/summary/summaryDelayLoadedModule/summarizer.ts +3 -3
  207. package/src/summary/summaryDelayLoadedModule/summarizerHeuristics.ts +2 -2
  208. package/src/summary/summaryDelayLoadedModule/summaryGenerator.ts +2 -2
  209. package/src/summary/summaryManager.ts +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # @fluidframework/container-runtime
2
2
 
3
+ ## 2.103.0
4
+
5
+ Dependency updates only.
6
+
3
7
  ## 2.102.0
4
8
 
5
9
  Dependency updates only.
Binary file
@@ -16,7 +16,7 @@ export declare class BatchTracker {
16
16
  * Track batch sizes in terms of op counts and processing times
17
17
  *
18
18
  * @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations
19
- * @param logger - See {@link @fluidframework/core-interfaces#ITelemetryLoggerExt}
19
+ * @param logger - See {@link @fluidframework/core-interfaces#TelemetryLoggerExt}
20
20
  * @param batchLengthThreshold - threshold for the length of a batch when to send an error event
21
21
  * @param batchCountSamplingRate - rate for batches for which to send an event with its characteristics
22
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"batchTracker.d.ts","sourceRoot":"","sources":["../src/batchTracker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAU5E,qBAAa,YAAY;IAOvB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IANnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAsB;IAC7C,OAAO,CAAC,wBAAwB,CAAqB;IACrD,OAAO,CAAC,iBAAiB,CAAa;IACtC,OAAO,CAAC,6BAA6B,CAAqB;gBAGxC,iBAAiB,EAAE,YAAY,EAChD,MAAM,EAAE,oBAAoB,EAC5B,oBAAoB,EAAE,MAAM,EAC5B,sBAAsB,EAAE,MAAM,EAC9B,gBAAgB,GAAE,MAAM,MAA+B;CA2CxD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,sBACT,YAAY,UACvB,oBAAoB,yBACN,MAAM,2BACJ,MAAM,KAC5B,YACuF,CAAC"}
1
+ {"version":3,"file":"batchTracker.d.ts","sourceRoot":"","sources":["../src/batchTracker.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAU5E,qBAAa,YAAY;IAOvB,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IANnC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAC5C,OAAO,CAAC,wBAAwB,CAAqB;IACrD,OAAO,CAAC,iBAAiB,CAAa;IACtC,OAAO,CAAC,6BAA6B,CAAqB;gBAGxC,iBAAiB,EAAE,YAAY,EAChD,MAAM,EAAE,oBAAoB,EAC5B,oBAAoB,EAAE,MAAM,EAC5B,sBAAsB,EAAE,MAAM,EAC9B,gBAAgB,GAAE,MAAM,MAA+B;CA2CxD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,sBACT,YAAY,UACvB,oBAAoB,yBACN,MAAM,2BACJ,MAAM,KAC5B,YACuF,CAAC"}
@@ -51,7 +51,7 @@ exports.BatchTracker = BatchTracker;
51
51
  * Track batch sizes in terms of op counts and processing times
52
52
  *
53
53
  * @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations
54
- * @param logger - See {@link @fluidframework/core-interfaces#ITelemetryLoggerExt}
54
+ * @param logger - See {@link @fluidframework/core-interfaces#TelemetryLoggerExt}
55
55
  * @param batchLengthThreshold - threshold for the length of a batch when to send an error event
56
56
  * @param batchCountSamplingRate - rate for batches for which to send an event with its characteristics
57
57
  */
@@ -1 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,QAAQ,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC,6BAA6B;oBACjE,UAAU,EAAE,KAAK,KAAK,SAAS;iBAC/B,CAAC,CAAC;YACJ,CAAC;YAED,IAAI,IAAI,CAAC,iBAAiB,GAAG,sBAAsB,KAAK,CAAC,EAAE,CAAC;gBAC3D,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC;oBAChC,SAAS,EAAE,QAAQ;oBACnB,MAAM;oBACN,YAAY,EAAE,sBAAsB;oBACpC,sBAAsB,EAAE,OAAO,CAAC,cAAc;oBAC9C,QAAQ,EAAE,gBAAgB,EAAE,GAAG,IAAI,CAAC,6BAA6B;iBACjE,CAAC,CAAC;YACJ,CAAC;YAED,IAAI,CAAC,wBAAwB,GAAG,SAAS,CAAC;YAC1C,IAAI,CAAC,6BAA6B,GAAG,SAAS,CAAC;QAChD,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAtDD,oCAsDC;AAED;;;;;;;GAOG;AACI,MAAM,gBAAgB,GAAG,CAC/B,iBAA+B,EAC/B,MAA4B,EAC5B,uBAA+B,IAAI,EACnC,yBAAiC,IAAI,EACtB,EAAE,CACjB,IAAI,YAAY,CAAC,iBAAiB,EAAE,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AAN9E,QAAA,gBAAgB,oBAM8D","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { EventEmitter } from \"@fluid-internal/client-utils\";\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport type { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport {\n\ttype ITelemetryLoggerExt,\n\tcreateChildLogger,\n} from \"@fluidframework/telemetry-utils/internal\";\n\ntype BatchTrackerMessage = Pick<ISequencedDocumentMessage, \"sequenceNumber\">;\n\nexport class BatchTracker {\n\tprivate readonly logger: ITelemetryLoggerExt;\n\tprivate startBatchSequenceNumber: number | undefined;\n\tprivate trackedBatchCount: number = 0;\n\tprivate batchProcessingStartTimeStamp: number | undefined;\n\n\tconstructor(\n\t\tprivate readonly batchEventEmitter: EventEmitter,\n\t\tlogger: ITelemetryBaseLogger,\n\t\tbatchLengthThreshold: number,\n\t\tbatchCountSamplingRate: number,\n\t\tdateTimeProvider: () => number = () => performanceNow(),\n\t) {\n\t\tthis.logger = createChildLogger({ logger, namespace: \"Batching\" });\n\n\t\tthis.batchEventEmitter.on(\"batchBegin\", (message: BatchTrackerMessage) => {\n\t\t\tthis.startBatchSequenceNumber = message.sequenceNumber;\n\t\t\tthis.batchProcessingStartTimeStamp = dateTimeProvider();\n\t\t\tthis.trackedBatchCount++;\n\t\t});\n\n\t\tthis.batchEventEmitter.on(\"batchEnd\", (error: unknown, message: BatchTrackerMessage) => {\n\t\t\tassert(\n\t\t\t\tthis.startBatchSequenceNumber !== undefined &&\n\t\t\t\t\tthis.batchProcessingStartTimeStamp !== undefined,\n\t\t\t\t0x2ba /* \"batchBegin must fire before batchEnd\" */,\n\t\t\t);\n\n\t\t\tconst length = message.sequenceNumber - this.startBatchSequenceNumber + 1;\n\t\t\tif (length >= batchLengthThreshold) {\n\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\teventName: \"LengthTooBig\",\n\t\t\t\t\tlength,\n\t\t\t\t\tthreshold: batchLengthThreshold,\n\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t\tbatchError: error !== undefined,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (this.trackedBatchCount % batchCountSamplingRate === 0) {\n\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\teventName: \"Length\",\n\t\t\t\t\tlength,\n\t\t\t\t\tsamplingRate: batchCountSamplingRate,\n\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.startBatchSequenceNumber = undefined;\n\t\t\tthis.batchProcessingStartTimeStamp = undefined;\n\t\t});\n\t}\n}\n\n/**\n * Track batch sizes in terms of op counts and processing times\n *\n * @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations\n * @param logger - See {@link @fluidframework/core-interfaces#ITelemetryLoggerExt}\n * @param batchLengthThreshold - threshold for the length of a batch when to send an error event\n * @param batchCountSamplingRate - rate for batches for which to send an event with its characteristics\n */\nexport const BindBatchTracker = (\n\tbatchEventEmitter: EventEmitter,\n\tlogger: ITelemetryBaseLogger,\n\tbatchLengthThreshold: number = 1000,\n\tbatchCountSamplingRate: number = 1000,\n): BatchTracker =>\n\tnew BatchTracker(batchEventEmitter, logger, batchLengthThreshold, batchCountSamplingRate);\n"]}
1
+ {"version":3,"file":"batchTracker.js","sourceRoot":"","sources":["../src/batchTracker.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,+DAA8D;AAE9D,kEAA6D;AAE7D,uEAGkD;AAIlD,MAAa,YAAY;IAMxB,YACkB,iBAA+B,EAChD,MAA4B,EAC5B,oBAA4B,EAC5B,sBAA8B,EAC9B,mBAAiC,GAAG,EAAE,CAAC,IAAA,6BAAc,GAAE;QAJtC,sBAAiB,GAAjB,iBAAiB,CAAc;QAJzC,sBAAiB,GAAW,CAAC,CAAC;QAUrC,IAAI,CAAC,MAAM,GAAG,IAAA,4BAAiB,EAAC,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;QAEnE,IAAI,CAAC,iBAAiB,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,OAA4B,EAAE,EAAE;YACxE,IAAI,CAAC,wBAAwB,GAAG,OAAO,CAAC,cAAc,CAAC;YACvD,IAAI,CAAC,6BAA6B,GAAG,gBAAgB,EAAE,CAAC;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AC/B,MAA4B,EAC5B,uBAA+B,IAAI,EACnC,yBAAiC,IAAI,EACtB,EAAE,CACjB,IAAI,YAAY,CAAC,iBAAiB,EAAE,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AAN9E,QAAA,gBAAgB,oBAM8D","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { EventEmitter } from \"@fluid-internal/client-utils\";\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport type { ITelemetryBaseLogger } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport type { ISequencedDocumentMessage } from \"@fluidframework/driver-definitions/internal\";\nimport {\n\ttype TelemetryLoggerExt,\n\tcreateChildLogger,\n} from \"@fluidframework/telemetry-utils/internal\";\n\ntype BatchTrackerMessage = Pick<ISequencedDocumentMessage, \"sequenceNumber\">;\n\nexport class BatchTracker {\n\tprivate readonly logger: TelemetryLoggerExt;\n\tprivate startBatchSequenceNumber: number | undefined;\n\tprivate trackedBatchCount: number = 0;\n\tprivate batchProcessingStartTimeStamp: number | undefined;\n\n\tconstructor(\n\t\tprivate readonly batchEventEmitter: EventEmitter,\n\t\tlogger: ITelemetryBaseLogger,\n\t\tbatchLengthThreshold: number,\n\t\tbatchCountSamplingRate: number,\n\t\tdateTimeProvider: () => number = () => performanceNow(),\n\t) {\n\t\tthis.logger = createChildLogger({ logger, namespace: \"Batching\" });\n\n\t\tthis.batchEventEmitter.on(\"batchBegin\", (message: BatchTrackerMessage) => {\n\t\t\tthis.startBatchSequenceNumber = message.sequenceNumber;\n\t\t\tthis.batchProcessingStartTimeStamp = dateTimeProvider();\n\t\t\tthis.trackedBatchCount++;\n\t\t});\n\n\t\tthis.batchEventEmitter.on(\"batchEnd\", (error: unknown, message: BatchTrackerMessage) => {\n\t\t\tassert(\n\t\t\t\tthis.startBatchSequenceNumber !== undefined &&\n\t\t\t\t\tthis.batchProcessingStartTimeStamp !== undefined,\n\t\t\t\t0x2ba /* \"batchBegin must fire before batchEnd\" */,\n\t\t\t);\n\n\t\t\tconst length = message.sequenceNumber - this.startBatchSequenceNumber + 1;\n\t\t\tif (length >= batchLengthThreshold) {\n\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\teventName: \"LengthTooBig\",\n\t\t\t\t\tlength,\n\t\t\t\t\tthreshold: batchLengthThreshold,\n\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t\tbatchError: error !== undefined,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (this.trackedBatchCount % batchCountSamplingRate === 0) {\n\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\teventName: \"Length\",\n\t\t\t\t\tlength,\n\t\t\t\t\tsamplingRate: batchCountSamplingRate,\n\t\t\t\t\tbatchEndSequenceNumber: message.sequenceNumber,\n\t\t\t\t\tduration: dateTimeProvider() - this.batchProcessingStartTimeStamp,\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tthis.startBatchSequenceNumber = undefined;\n\t\t\tthis.batchProcessingStartTimeStamp = undefined;\n\t\t});\n\t}\n}\n\n/**\n * Track batch sizes in terms of op counts and processing times\n *\n * @param batchEventEmitter - event emitter which tracks the lifecycle of batch operations\n * @param logger - See {@link @fluidframework/core-interfaces#TelemetryLoggerExt}\n * @param batchLengthThreshold - threshold for the length of a batch when to send an error event\n * @param batchCountSamplingRate - rate for batches for which to send an event with its characteristics\n */\nexport const BindBatchTracker = (\n\tbatchEventEmitter: EventEmitter,\n\tlogger: ITelemetryBaseLogger,\n\tbatchLengthThreshold: number = 1000,\n\tbatchCountSamplingRate: number = 1000,\n): BatchTracker =>\n\tnew BatchTracker(batchEventEmitter, logger, batchLengthThreshold, batchCountSamplingRate);\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { IContainerContext } from "@fluidframework/container-definitions/internal";
6
6
  import type { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
7
- import type { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
7
+ import type { TelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
8
8
  /**
9
9
  * Information from a snapshot needed to load BlobManager
10
10
  * @internal
@@ -26,7 +26,7 @@ export declare const blobsTreeName = ".blobs";
26
26
  *
27
27
  */
28
28
  export declare const loadBlobManagerLoadInfo: (context: Pick<IContainerContext, "baseSnapshot" | "storage" | "attachState">) => Promise<IBlobManagerLoadInfo>;
29
- export declare const toRedirectTable: (blobManagerLoadInfo: IBlobManagerLoadInfo, logger: ITelemetryLoggerExt) => Map<string, string>;
29
+ export declare const toRedirectTable: (blobManagerLoadInfo: IBlobManagerLoadInfo, logger: TelemetryLoggerExt) => Map<string, string>;
30
30
  export declare const summarizeBlobManagerState: (redirectTable: Map<string, string>) => ISummaryTreeWithStats;
31
31
  export declare const getStorageIds: (redirectTable: Map<string, string>) => Set<string>;
32
32
  //# sourceMappingURL=blobManagerSnapSum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blobManagerSnapSum.d.ts","sourceRoot":"","sources":["../../src/blobManager/blobManagerSnapSum.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAExF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8CAA8C,CAAC;AAE1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAEpF;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACpC,GAAG,CAAC,EAAE,MAAM,EAAE,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;CACnC;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,mBAAmB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,aAAa,WAAW,CAAC;AAE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K,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACpC,6FAA6F;QAC7F,oCAAoC;QACpC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAClC,CAAC;IAED,sEAAsE;IACtE,gFAAgF;IAChF,wEAAwE;IACxE,sEAAsE;IACtE,qBAAqB;IACrB,MAAM,+BAA+B,GAAG,CAAC,GAAG,aAAa,CAAC,OAAO,EAAE,CAAC,CAAC,MAAM,CAC1E,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,OAAO,KAAK,SAAS,CAC/C,CAAC;IACF,IAAI,+BAA+B,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChD,OAAO,CAAC,OAAO,CAAC,6BAAqB,EAAE,IAAI,CAAC,SAAS,CAAC,+BAA+B,CAAC,CAAC,CAAC;IACzF,CAAC;IAED,OAAO,OAAO,CAAC,cAAc,EAAE,CAAC;AACjC,CAAC,CAAC;AAEK,MAAM,aAAa,GAAG,CAAC,aAAkC,EAAe,EAAE;IAChF,OAAO,IAAI,GAAG,CAAS,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;AAChD,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IContainerContext } from \"@fluidframework/container-definitions/internal\";\nimport { readAndParse } from \"@fluidframework/driver-utils/internal\";\nimport type { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions/internal\";\nimport { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\nimport type { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\n/**\n * Information from a snapshot needed to load BlobManager\n * @internal\n */\nexport interface IBlobManagerLoadInfo {\n\tids?: string[];\n\tredirectTable?: [string, string][];\n}\n\n/**\n * @internal\n */\nexport const redirectTableBlobName = \".redirectTable\";\n\n/**\n * @internal\n */\nexport const blobsTreeName = \".blobs\";\n\n/**\n * Reads blobs needed to load BlobManager from storage.\n *\n */\nexport const loadBlobManagerLoadInfo = async (\n\tcontext: Pick<IContainerContext, \"baseSnapshot\" | \"storage\" | \"attachState\">,\n): Promise<IBlobManagerLoadInfo> => loadV1(context);\n\nconst loadV1 = async (\n\tcontext: Pick<IContainerContext, \"baseSnapshot\" | \"storage\" | \"attachState\">,\n): Promise<IBlobManagerLoadInfo> => {\n\tconst blobsTree = context.baseSnapshot?.trees[blobsTreeName];\n\n\tif (!blobsTree) {\n\t\treturn {};\n\t}\n\tlet redirectTableEntries: [string, string][] = [];\n\tconst tableId: string | undefined = blobsTree.blobs[redirectTableBlobName];\n\tif (tableId) {\n\t\tredirectTableEntries = await readAndParse(context.storage, tableId);\n\t}\n\tconst ids = Object.entries(blobsTree.blobs)\n\t\t.filter(([k, _]) => k !== redirectTableBlobName)\n\t\t.map(([_, v]) => v);\n\n\treturn { ids, redirectTable: redirectTableEntries };\n};\n\nexport const toRedirectTable = (\n\tblobManagerLoadInfo: IBlobManagerLoadInfo,\n\tlogger: ITelemetryLoggerExt,\n): Map<string, string> => {\n\tconst count = blobManagerLoadInfo.ids?.length ?? 0;\n\tconst redirectTableLength = blobManagerLoadInfo.redirectTable?.length ?? 0;\n\tif (count > 0 || redirectTableLength > 0) {\n\t\tlogger.sendTelemetryEvent({\n\t\t\teventName: \"AttachmentBlobsLoaded\",\n\t\t\tcount,\n\t\t\tredirectTable: redirectTableLength,\n\t\t});\n\t}\n\tconst redirectTable = new Map<string, string>(blobManagerLoadInfo.redirectTable);\n\tif (blobManagerLoadInfo.ids !== undefined) {\n\t\tfor (const storageId of blobManagerLoadInfo.ids) {\n\t\t\t// Older versions of the runtime used the storage ID directly in the handle,\n\t\t\t// rather than routing through the redirectTable. To support old handles that\n\t\t\t// were created in this way but unify handling through the redirectTable, we\n\t\t\t// add identity mappings to the redirect table at load. These identity entries\n\t\t\t// will be excluded during summarization.\n\t\t\tredirectTable.set(storageId, storageId);\n\t\t}\n\t}\n\treturn redirectTable;\n};\n\nexport const summarizeBlobManagerState = (\n\tredirectTable: Map<string, string>,\n): ISummaryTreeWithStats => summarizeV1(redirectTable);\n\nconst summarizeV1 = (redirectTable: Map<string, string>): ISummaryTreeWithStats => {\n\tconst builder = new SummaryTreeBuilder();\n\tconst storageIds = getStorageIds(redirectTable);\n\tfor (const storageId of storageIds) {\n\t\t// The Attachment is inspectable by storage, which lets it detect that the blob is referenced\n\t\t// and therefore should not be GC'd.\n\t\tbuilder.addAttachment(storageId);\n\t}\n\n\t// Exclude identity mappings from the redirectTable summary. Note that\n\t// the storageIds of the identity mappings are still included in the Attachments\n\t// above, so we expect these identity mappings will be recreated at load\n\t// time in toRedirectTable even if there is no non-identity mapping in\n\t// the redirectTable.\n\tconst nonIdentityRedirectTableEntries = [...redirectTable.entries()].filter(\n\t\t([localId, storageId]) => localId !== storageId,\n\t);\n\tif (nonIdentityRedirectTableEntries.length > 0) {\n\t\tbuilder.addBlob(redirectTableBlobName, JSON.stringify(nonIdentityRedirectTableEntries));\n\t}\n\n\treturn builder.getSummaryTree();\n};\n\nexport const getStorageIds = (redirectTable: Map<string, string>): Set<string> => {\n\treturn new Set<string>(redirectTable.values());\n};\n"]}
1
+ {"version":3,"file":"blobManagerSnapSum.js","sourceRoot":"","sources":["../../src/blobManager/blobManagerSnapSum.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAGH,oEAAqE;AAErE,qEAA4E;AAY5E;;GAEG;AACU,QAAA,qBAAqB,GAAG,gBAAgB,CAAC;AAEtD;;GAEG;AACU,QAAA,aAAa,GAAG,QAAQ,CAAC;AAEtC;;;GAGG;AACI,MAAM,uBAAuB,GAAG,KAAK,EAC3C,OAA4E,EAC5C,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAFvC,QAAA,uBAAuB,2BAEgB;AAEpD,MAAM,MAAM,GAAG,KAAK,EACnB,OAA4E,EAC5C,EAAE;IAClC,MAAM,SAAS,GAAG,OAAO,CAAC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AAE;IAChF,OAAO,IAAI,GAAG,CAAS,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC;AAChD,CAAC,CAAC;AAFW,QAAA,aAAa,iBAExB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport type { IContainerContext } from \"@fluidframework/container-definitions/internal\";\nimport { readAndParse } from \"@fluidframework/driver-utils/internal\";\nimport type { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions/internal\";\nimport { SummaryTreeBuilder } from \"@fluidframework/runtime-utils/internal\";\nimport type { TelemetryLoggerExt } from \"@fluidframework/telemetry-utils/internal\";\n\n/**\n * Information from a snapshot needed to load BlobManager\n * @internal\n */\nexport interface IBlobManagerLoadInfo {\n\tids?: string[];\n\tredirectTable?: [string, string][];\n}\n\n/**\n * @internal\n */\nexport const redirectTableBlobName = \".redirectTable\";\n\n/**\n * @internal\n */\nexport const blobsTreeName = \".blobs\";\n\n/**\n * Reads blobs needed to load BlobManager from storage.\n *\n */\nexport const loadBlobManagerLoadInfo = async (\n\tcontext: Pick<IContainerContext, \"baseSnapshot\" | \"storage\" | \"attachState\">,\n): Promise<IBlobManagerLoadInfo> => loadV1(context);\n\nconst loadV1 = async (\n\tcontext: Pick<IContainerContext, \"baseSnapshot\" | \"storage\" | \"attachState\">,\n): Promise<IBlobManagerLoadInfo> => {\n\tconst blobsTree = context.baseSnapshot?.trees[blobsTreeName];\n\n\tif (!blobsTree) {\n\t\treturn {};\n\t}\n\tlet redirectTableEntries: [string, string][] = [];\n\tconst tableId: string | undefined = blobsTree.blobs[redirectTableBlobName];\n\tif (tableId) {\n\t\tredirectTableEntries = await readAndParse(context.storage, tableId);\n\t}\n\tconst ids = Object.entries(blobsTree.blobs)\n\t\t.filter(([k, _]) => k !== redirectTableBlobName)\n\t\t.map(([_, v]) => v);\n\n\treturn { ids, redirectTable: redirectTableEntries };\n};\n\nexport const toRedirectTable = (\n\tblobManagerLoadInfo: IBlobManagerLoadInfo,\n\tlogger: TelemetryLoggerExt,\n): Map<string, string> => {\n\tconst count = blobManagerLoadInfo.ids?.length ?? 0;\n\tconst redirectTableLength = blobManagerLoadInfo.redirectTable?.length ?? 0;\n\tif (count > 0 || redirectTableLength > 0) {\n\t\tlogger.sendTelemetryEvent({\n\t\t\teventName: \"AttachmentBlobsLoaded\",\n\t\t\tcount,\n\t\t\tredirectTable: redirectTableLength,\n\t\t});\n\t}\n\tconst redirectTable = new Map<string, string>(blobManagerLoadInfo.redirectTable);\n\tif (blobManagerLoadInfo.ids !== undefined) {\n\t\tfor (const storageId of blobManagerLoadInfo.ids) {\n\t\t\t// Older versions of the runtime used the storage ID directly in the handle,\n\t\t\t// rather than routing through the redirectTable. To support old handles that\n\t\t\t// were created in this way but unify handling through the redirectTable, we\n\t\t\t// add identity mappings to the redirect table at load. These identity entries\n\t\t\t// will be excluded during summarization.\n\t\t\tredirectTable.set(storageId, storageId);\n\t\t}\n\t}\n\treturn redirectTable;\n};\n\nexport const summarizeBlobManagerState = (\n\tredirectTable: Map<string, string>,\n): ISummaryTreeWithStats => summarizeV1(redirectTable);\n\nconst summarizeV1 = (redirectTable: Map<string, string>): ISummaryTreeWithStats => {\n\tconst builder = new SummaryTreeBuilder();\n\tconst storageIds = getStorageIds(redirectTable);\n\tfor (const storageId of storageIds) {\n\t\t// The Attachment is inspectable by storage, which lets it detect that the blob is referenced\n\t\t// and therefore should not be GC'd.\n\t\tbuilder.addAttachment(storageId);\n\t}\n\n\t// Exclude identity mappings from the redirectTable summary. Note that\n\t// the storageIds of the identity mappings are still included in the Attachments\n\t// above, so we expect these identity mappings will be recreated at load\n\t// time in toRedirectTable even if there is no non-identity mapping in\n\t// the redirectTable.\n\tconst nonIdentityRedirectTableEntries = [...redirectTable.entries()].filter(\n\t\t([localId, storageId]) => localId !== storageId,\n\t);\n\tif (nonIdentityRedirectTableEntries.length > 0) {\n\t\tbuilder.addBlob(redirectTableBlobName, JSON.stringify(nonIdentityRedirectTableEntries));\n\t}\n\n\treturn builder.getSummaryTree();\n};\n\nexport const getStorageIds = (redirectTable: Map<string, string>): Set<string> => {\n\treturn new Set<string>(redirectTable.values());\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"connectionTelemetry.js","sourceRoot":"","sources":["../src/connectionTelemetry.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAA8D;AAI9D,qEAA2D;AAC3D,kEAA6D;AAC7D,0EAIqD;AACrD,oEAAyE;AACzE,uEAOkD;AAElD;;GAEG;AACU,QAAA,gBAAgB,GAAG,IAAI,CAAC;AA8CrC,MAAM,eAAe;IAkDpB;;;;;;;OAOG;IACH;IACC;;;;;;OAMG;IACK,QAA4B;IACpC;;OAEG;IACc,YAA+B;IAChD;;OAEG;IACH,sBAA+D;IAC/D;;OAEG;IACH,MAA2B;QAZnB,aAAQ,GAAR,QAAQ,CAAoB;QAInB,iBAAY,GAAZ,YAAY,CAAmB;QAjEzC,yBAAoB,GAAW,CAAC,CAAC;QAGzC,sEAAsE;QACrD,sBAAiB,GAAG,IAAI,GAAG,EAMzC,CAAC;QAEI,oBAAe,GAAG,IAAI,CAAC;QAEd,aAAQ,GAAG,IAAA,6BAAc,GAAE,CAAC;QACrC,wBAAmB,GAAG,CAAC,CAAC;QACxB,QAAG,GAAG,CAAC,CAAC;QAEhB;;WAEG;QACK,0BAAqB,GAAG,CAAC,CAAC;QAClC;;WAEG;QACK,gCAA2B,GAAG,CAAC,CAAC;QAkDvC,IAAI,CAAC,MAAM,GAAG,IAAA,4BAAiB,EAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;QAEjE,MAAM,wBAAwB,GAAkB,CAAC,GAAG,EAAE;YACrD,IAAI,UAAU,GAAG,CAAC,CAAC,CAAC;YACpB,OAAO;gBACN,MAAM,EAAE,GAAG,EAAE;oBACZ,UAAU,EAAE,CAAC;oBACb,MAAM,YAAY,GAAG,UAAU,GAAG,eAAe,CAAC,yBAAy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A+D,EAC/D,MAA4B;IAE5B,IAAI,eAAe,CAClB,QAAQ,EACR,YAAY,EACZ,sBAAsB,EACtB,IAAA,4BAAiB,EAAC,EAAE,MAAM,EAAE,CAAC,CAC7B,CAAC;AACH,CAAC;AAZD,sDAYC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport type { IDeltaManagerFull } from \"@fluidframework/container-definitions/internal\";\nimport type { IContainerRuntimeEvents } from \"@fluidframework/container-runtime-definitions/internal\";\nimport type { ITelemetryBaseLogger, IEventProvider } from \"@fluidframework/core-interfaces\";\nimport { LogLevel } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\ttype IDocumentMessage,\n\tMessageType,\n\ttype ISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { isRuntimeMessage } from \"@fluidframework/driver-utils/internal\";\nimport {\n\ttype IEventSampler,\n\ttype ITelemetryLoggerExt,\n\ttype ISampledTelemetryLogger,\n\tcreateChildLogger,\n\tcreateSampledLogger,\n\tformatTick,\n} from \"@fluidframework/telemetry-utils/internal\";\n\n/**\n * We report various latency-related errors when waiting for op roundtrip takes longer than that amout of time.\n */\nexport const latencyThreshold = 5000;\n\n// Phases in OpPerfTelemetry:\n// 1.\tOp is added to DeltaManager (DM) buffer.\n// 2.\tOp is sent to service (op leaves outbound queue).\n// \t - Note: We do not know for sure when op is sent, we only track when it is added to outbound queue.\n// If outbound queue is paused, time queue is paused is counted as network time.\n// 3.\tOp received from service back (pushed to inbound queue).\n// 4.\tOp is processed.\ninterface IOpPerfTelemetryProperties {\n\t/**\n\t * Measure time between (1) and (2) - Measure time outbound op is sitting in queue due to active batch\n\t */\n\tdurationOutboundBatching: number; // was durationOutboundQueue in previous versions\n\t/**\n\t * Measure time between (2) and (3) - Track how long it took for op to be acked by service\n\t */\n\tdurationNetwork: number; // was durationInboundQueue\n\t/**\n\t * Measure time between (3) and (4) - Time between DM's inbound \"push\" event until DM's \"op\" event\n\t */\n\tdurationInboundToProcessing: number;\n\t/**\n\t * Length of the DeltaManager's inbound queue at the time of the DM's inbound \"push\" event (3)\n\t */\n\tlengthInboundQueue: number;\n}\n\n/**\n * Timings collected at various moments during the op processing.\n */\ninterface IOpPerfTimings {\n\t/**\n\t * Starting time for (1)\n\t */\n\tsubmitOpEventTime: number;\n\t/**\n\t * Starting time for (2)\n\t */\n\toutboundPushEventTime: number;\n\t/**\n\t * Starting time for (3)\n\t */\n\tinboundPushEventTime: number;\n}\n\nclass OpPerfTelemetry {\n\tprivate pingLatency: number | undefined;\n\n\t// Collab window tracking. This is timestamp of %1000 message.\n\tprivate sequenceNumberForMsnTracking: number | undefined;\n\tprivate msnTrackingTimestamp: number = 0;\n\t// To track round trip time for every %500 client message.\n\tprivate clientSequenceNumberForLatencyStatistics: number | undefined;\n\t// Performance Data to be reported for ops round trips and processing.\n\tprivate readonly latencyStatistics = new Map<\n\t\tnumber,\n\t\t{\n\t\t\topProcessingTimes: Partial<IOpPerfTimings>;\n\t\t\topPerfData: Partial<IOpPerfTelemetryProperties>;\n\t\t}\n\t>();\n\n\tprivate firstConnection = true;\n\tprivate connectionOpSeqNumber: number | undefined;\n\tprivate readonly bootTime = performanceNow();\n\tprivate connectionStartTime = 0;\n\tprivate gap = 0;\n\n\t/**\n\t * Count of no-ops sent by this client. This variable is reset everytime the OpStats sampled event is logged\n\t */\n\tprivate noOpCountForTelemetry = 0;\n\t/**\n\t * Cumulative size of the ops processed by this client. This variable is reset everytime the OpStats sampled event is logged\n\t */\n\tprivate processedOpSizeForTelemetry = 0;\n\n\tprivate readonly logger: ITelemetryLoggerExt;\n\n\tprivate static readonly OP_LATENCY_SAMPLE_RATE = 500;\n\tprivate readonly opLatencyLogger: ISampledTelemetryLogger;\n\n\tprivate static readonly DELTA_LATENCY_SAMPLE_RATE = 100;\n\tprivate readonly deltaLatencyLogger: ISampledTelemetryLogger;\n\n\tprivate static readonly PROCESSED_OPS_SAMPLE_RATE = 500;\n\n\t/**\n\t * A sampled logger to log Ops that have been processed by the current client, the NoOp sent and the\n\t * size of the ops processed within one sampling window of this log event.\n\t * The data from this logger will be used to monitor the efficiency of NoOp-heuristics or to get approximate collab window size.\n\t * Note: no log events are sent when sampling is disabled, because logging at every op will be too noisy.\n\t */\n\tprivate readonly opsLogger: ISampledTelemetryLogger;\n\n\t/**\n\t * Create an instance of OpPerfTelemetry which starts monitoring and generating telemetry related to op performance.\n\t *\n\t * @param clientId - The clientId of the current container.\n\t * @param deltaManager - DeltaManager instance to monitor.\n\t * @param containerRuntimeEvents - Emitter of events for the container runtime.\n\t * @param logger - Telemetry logger to write events to.\n\t */\n\tpublic constructor(\n\t\t/**\n\t\t * The clientId of the current container.\n\t\t *\n\t\t * @remarks Until the container connects to the server and receives an ack for its own join op, this can be undefined.\n\t\t * It gets updated in response to event changes once the value provided by the server is available.\n\t\t * If the container loses its connection, this could be the last known clientId.\n\t\t */\n\t\tprivate clientId: string | undefined,\n\t\t/**\n\t\t * DeltaManager instance to monitor.\n\t\t */\n\t\tprivate readonly deltaManager: IDeltaManagerFull,\n\t\t/**\n\t\t * Emitter of events for the container runtime.\n\t\t */\n\t\tcontainerRuntimeEvents: IEventProvider<IContainerRuntimeEvents>,\n\t\t/**\n\t\t * Telemetry logger to write events to.\n\t\t */\n\t\tlogger: ITelemetryLoggerExt,\n\t) {\n\t\tthis.logger = createChildLogger({ logger, namespace: \"OpPerf\" });\n\n\t\tconst deltaLatencyEventSampler: IEventSampler = (() => {\n\t\t\tlet eventCount = -1;\n\t\t\treturn {\n\t\t\t\tsample: () => {\n\t\t\t\t\teventCount++;\n\t\t\t\t\tconst shouldSample = eventCount % OpPerfTelemetry.DELTA_LATENCY_SAMPLE_RATE === 0;\n\t\t\t\t\tif (shouldSample) {\n\t\t\t\t\t\teventCount = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn shouldSample;\n\t\t\t\t},\n\t\t\t};\n\t\t})();\n\n\t\tthis.deltaLatencyLogger = createSampledLogger(logger, deltaLatencyEventSampler);\n\n\t\t// The SampledLogger here is used get access to the isSamplingDisabled property derived from\n\t\t// telemetry config properties. The actual sampling logic for op messages happens outside this SampledLogger\n\t\t// due to complexity of the different asynchronus scenarios of the op message lifecycle.\n\t\tthis.opLatencyLogger = createSampledLogger(logger);\n\n\t\tconst opsEventSampler: IEventSampler = (() => {\n\t\t\tlet eventCount = 0;\n\t\t\treturn {\n\t\t\t\tsample: () => {\n\t\t\t\t\teventCount++;\n\t\t\t\t\tconst shouldSample = eventCount % OpPerfTelemetry.PROCESSED_OPS_SAMPLE_RATE === 0;\n\t\t\t\t\tif (shouldSample) {\n\t\t\t\t\t\teventCount = 0;\n\t\t\t\t\t\tthis.noOpCountForTelemetry = 0;\n\t\t\t\t\t\tthis.processedOpSizeForTelemetry = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn shouldSample;\n\t\t\t\t},\n\t\t\t};\n\t\t})();\n\t\tthis.opsLogger = createSampledLogger(\n\t\t\tlogger,\n\t\t\topsEventSampler,\n\t\t\ttrue /* skipLoggingWhenSamplingIsDisabled */,\n\t\t);\n\n\t\tthis.deltaManager.on(\"pong\", (latency) => this.recordPingTime(latency));\n\t\tthis.deltaManager.on(\"submitOp\", (message) => this.beforeOpSubmit(message));\n\t\tthis.deltaManager.on(\"op\", (message) => this.afterProcessingOp(message));\n\t\tthis.deltaManager.on(\"connect\", (details, opsBehind) => {\n\t\t\tif (opsBehind !== undefined) {\n\t\t\t\tthis.connectionOpSeqNumber = this.deltaManager.lastKnownSeqNumber;\n\t\t\t\tthis.gap = opsBehind;\n\t\t\t\tthis.connectionStartTime = performanceNow();\n\n\t\t\t\t// We might be already up-today. If so, report it right away.\n\t\t\t\tif (this.gap <= 0) {\n\t\t\t\t\tthis.reportGettingUpToDate();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.deltaManager.on(\"disconnect\", () => {\n\t\t\tthis.sequenceNumberForMsnTracking = undefined;\n\t\t\tthis.clientSequenceNumberForLatencyStatistics = undefined;\n\t\t\tthis.connectionOpSeqNumber = undefined;\n\t\t\tthis.firstConnection = false;\n\t\t\tthis.latencyStatistics.clear();\n\t\t});\n\n\t\tthis.deltaManager.outbound.on(\"push\", (messages) => {\n\t\t\tfor (const msg of messages) {\n\t\t\t\tif (\n\t\t\t\t\tmsg.type === MessageType.Operation &&\n\t\t\t\t\t(this.opLatencyLogger.isSamplingDisabled ||\n\t\t\t\t\t\tthis.clientSequenceNumberForLatencyStatistics === msg.clientSequenceNumber)\n\t\t\t\t) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst latencyStats = this.latencyStatistics.get(msg.clientSequenceNumber)!;\n\t\t\t\t\tassert(latencyStats !== undefined, 0x7c2 /* Latency stats for op should exist */);\n\t\t\t\t\tassert(\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.outboundPushEventTime === undefined,\n\t\t\t\t\t\t0x2c8 /* \"outboundPushEventTime should be undefined\" */,\n\t\t\t\t\t);\n\t\t\t\t\tassert(\n\t\t\t\t\t\tlatencyStats.opPerfData.durationNetwork === undefined,\n\t\t\t\t\t\t0x2c9 /* \"durationNetwork should be undefined\" */,\n\t\t\t\t\t);\n\t\t\t\t\tlatencyStats.opProcessingTimes.outboundPushEventTime = Date.now();\n\n\t\t\t\t\tassert(\n\t\t\t\t\t\tlatencyStats.opPerfData.durationOutboundBatching === undefined,\n\t\t\t\t\t\t0x2ca /* \"durationOutboundBatching should be undefined\" */,\n\t\t\t\t\t);\n\n\t\t\t\t\tassert(\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.submitOpEventTime !== undefined,\n\t\t\t\t\t\t0x2cb /* \"submitOpEventTime should be undefined\" */,\n\t\t\t\t\t);\n\n\t\t\t\t\tlatencyStats.opPerfData.durationOutboundBatching =\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.outboundPushEventTime -\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.submitOpEventTime;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis.deltaManager.inbound.on(\"push\", (message: ISequencedDocumentMessage) => {\n\t\t\tif (\n\t\t\t\tthis.clientId === message.clientId &&\n\t\t\t\tmessage.type === MessageType.Operation &&\n\t\t\t\t(this.opLatencyLogger.isSamplingDisabled ||\n\t\t\t\t\tthis.clientSequenceNumberForLatencyStatistics === message.clientSequenceNumber)\n\t\t\t) {\n\t\t\t\t// We do an explicit check for undefined right after this\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\tconst latencyStats = this.latencyStatistics.get(message.clientSequenceNumber)!;\n\t\t\t\tassert(latencyStats !== undefined, 0x7c3 /* Latency stats for op should exist */);\n\t\t\t\tif (latencyStats.opProcessingTimes.outboundPushEventTime !== undefined) {\n\t\t\t\t\tlatencyStats.opProcessingTimes.inboundPushEventTime = Date.now();\n\t\t\t\t\tlatencyStats.opPerfData.durationNetwork =\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.inboundPushEventTime -\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.outboundPushEventTime;\n\t\t\t\t\tlatencyStats.opPerfData.lengthInboundQueue = this.deltaManager.inbound.length;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isRuntimeMessage(message) && typeof message.contents === \"string\") {\n\t\t\t\tthis.processedOpSizeForTelemetry += message.contents.length;\n\t\t\t}\n\t\t});\n\n\t\tthis.deltaManager.inbound.on(\"idle\", (count: number, duration: number) => {\n\t\t\t// Do not want to log zero for sure.\n\t\t\t// We are more interested in aggregates, so logging only if we are processing some number of ops\n\t\t\t// Cut-off is arbitrary - can be increased or decreased based on amount of data collected and questions we\n\t\t\t// want to get answered\n\t\t\t// back-compat: Once 0.36 loader version saturates (count & duration args were added there),\n\t\t\t// we can remove typeof check.\n\t\t\tif (typeof count === \"number\" && count >= 100) {\n\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\teventName: \"GetDeltas_OpProcessing\",\n\t\t\t\t\tcount,\n\t\t\t\t\tduration,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tcontainerRuntimeEvents.on(\"connected\", (newClientId) => {\n\t\t\tthis.clientId = newClientId;\n\t\t});\n\t}\n\n\tprivate reportGettingUpToDate(): void {\n\t\tthis.connectionOpSeqNumber = undefined;\n\t\tthis.logger.sendPerformanceEvent(\n\t\t\t{\n\t\t\t\teventName: \"ConnectionSpeed\",\n\t\t\t\tduration: performanceNow() - this.connectionStartTime,\n\t\t\t\tops: this.gap,\n\t\t\t\t// track time to connect only for first connection.\n\t\t\t\ttimeToConnect: this.firstConnection\n\t\t\t\t\t? formatTick(this.connectionStartTime - this.bootTime)\n\t\t\t\t\t: undefined,\n\t\t\t\tfirstConnection: this.firstConnection,\n\t\t\t},\n\t\t\tundefined, // error\n\t\t\tLogLevel.info,\n\t\t);\n\t}\n\n\tprivate recordPingTime(latency: number): void {\n\t\tthis.pingLatency = latency;\n\n\t\t// Log if latency is longer than 1 min\n\t\tif (latency > 1000 * 60) {\n\t\t\tthis.logger.sendErrorEvent({\n\t\t\t\teventName: \"LatencyTooLong\",\n\t\t\t\tduration: latency,\n\t\t\t});\n\t\t}\n\n\t\t// logging one in every DELTA_LATENCY_SAMPLE_RATE pongs, including the first time, if it is a \"write\" client.\n\t\tif (this.deltaManager.active) {\n\t\t\tthis.deltaLatencyLogger.sendPerformanceEvent({\n\t\t\t\teventName: \"DeltaLatency\",\n\t\t\t\tduration: latency,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate beforeOpSubmit(message: IDocumentMessage): void {\n\t\t// start with first client op and measure latency every 500 client ops\n\t\tif (\n\t\t\tthis.opLatencyLogger.isSamplingDisabled ||\n\t\t\t(this.clientSequenceNumberForLatencyStatistics === undefined &&\n\t\t\t\tmessage.clientSequenceNumber % OpPerfTelemetry.OP_LATENCY_SAMPLE_RATE === 1)\n\t\t) {\n\t\t\tassert(\n\t\t\t\tthis.latencyStatistics.get(message.clientSequenceNumber) === undefined,\n\t\t\t\t0x7c4 /* Existing op perf data for client sequence number */,\n\t\t\t);\n\t\t\tthis.clientSequenceNumberForLatencyStatistics = message.clientSequenceNumber;\n\t\t\tthis.latencyStatistics.set(message.clientSequenceNumber, {\n\t\t\t\topProcessingTimes: {\n\t\t\t\t\tsubmitOpEventTime: Date.now(),\n\t\t\t\t},\n\t\t\t\topPerfData: {},\n\t\t\t});\n\t\t}\n\n\t\tif (message.type === MessageType.NoOp) {\n\t\t\t// Count the number of no-ops submitted by this client.\n\t\t\t// The value is reset when we log the OpStats sampled event.\n\t\t\tthis.noOpCountForTelemetry++;\n\t\t}\n\t}\n\n\tprivate afterProcessingOp(message: ISequencedDocumentMessage): void {\n\t\tconst sequenceNumber = message.sequenceNumber;\n\n\t\tif (sequenceNumber === this.connectionOpSeqNumber) {\n\t\t\tthis.reportGettingUpToDate();\n\t\t}\n\n\t\t// Record collab window max size after every 1000th op.\n\t\tif (this.sequenceNumberForMsnTracking === undefined && sequenceNumber % 1000 === 0) {\n\t\t\tthis.sequenceNumberForMsnTracking = sequenceNumber;\n\t\t\tthis.msnTrackingTimestamp = message.timestamp;\n\t\t}\n\t\tif (\n\t\t\tthis.sequenceNumberForMsnTracking !== undefined &&\n\t\t\tmessage.minimumSequenceNumber >= this.sequenceNumberForMsnTracking\n\t\t) {\n\t\t\tassert(\n\t\t\t\tthis.msnTrackingTimestamp !== undefined,\n\t\t\t\t0x2ce /* \"msnTrackingTimestamp should not be undefined\" */,\n\t\t\t);\n\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\teventName: \"MsnStatistics\",\n\t\t\t\tsequenceNumber,\n\t\t\t\tmsnDistance: sequenceNumber - this.sequenceNumberForMsnTracking,\n\t\t\t\tduration: message.timestamp - this.msnTrackingTimestamp,\n\t\t\t});\n\t\t\tthis.sequenceNumberForMsnTracking = undefined;\n\t\t}\n\n\t\tif (\n\t\t\tthis.clientId === message.clientId &&\n\t\t\tmessage.type === MessageType.Operation &&\n\t\t\t(this.opLatencyLogger.isSamplingDisabled ||\n\t\t\t\tthis.clientSequenceNumberForLatencyStatistics === message.clientSequenceNumber)\n\t\t) {\n\t\t\t// We do an explicit check for undefined right after this\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tconst latencyData = this.latencyStatistics.get(message.clientSequenceNumber)!;\n\t\t\tassert(latencyData !== undefined, 0x7c5 /* Undefined latency statistics for op */);\n\t\t\tassert(\n\t\t\t\tlatencyData.opProcessingTimes.submitOpEventTime !== undefined,\n\t\t\t\t0x120 /* \"Undefined latency statistics for op (op send time)\" */,\n\t\t\t);\n\t\t\tconst currentTime = Date.now();\n\t\t\tif (latencyData.opProcessingTimes.inboundPushEventTime !== undefined) {\n\t\t\t\tlatencyData.opPerfData.durationInboundToProcessing =\n\t\t\t\t\tcurrentTime - latencyData.opProcessingTimes.inboundPushEventTime;\n\t\t\t}\n\t\t\tconst duration = currentTime - latencyData.opProcessingTimes.submitOpEventTime;\n\n\t\t\t// One of the core expectations for Fluid service is to be fast.\n\t\t\t// When it's not the case, we want to learn about it and be able to investigate, so\n\t\t\t// raise awareness.\n\t\t\t// This also helps identify cases where it's due to client behavior (sending too many ops)\n\t\t\t// that results in overwhelming ordering service and thus starting to see long latencies.\n\t\t\t// The threshold could be adjusted, but ideally it stays workload-agnostic, as service\n\t\t\t// performance impacts all workloads relying on service.\n\t\t\tconst category = duration > latencyThreshold ? \"error\" : \"performance\";\n\t\t\tthis.opLatencyLogger.sendPerformanceEvent({\n\t\t\t\teventName: \"OpRoundtripTime\",\n\t\t\t\tsequenceNumber,\n\t\t\t\treferenceSequenceNumber: message.referenceSequenceNumber,\n\t\t\t\tduration,\n\t\t\t\tcategory,\n\t\t\t\tpingLatency: this.pingLatency,\n\t\t\t\tmsnDistance:\n\t\t\t\t\tthis.deltaManager.lastSequenceNumber - this.deltaManager.minimumSequenceNumber,\n\t\t\t\t...latencyData.opPerfData,\n\t\t\t});\n\n\t\t\tthis.clientSequenceNumberForLatencyStatistics = undefined;\n\t\t\tthis.latencyStatistics.delete(message.clientSequenceNumber);\n\t\t}\n\n\t\tif (isRuntimeMessage(message)) {\n\t\t\t// Sampled logging of Ops that have been processed by the current client, the NoOp sent and the\n\t\t\t// size of the ops processed within one sampling window of this log event.\n\t\t\t// This data will be used to monitor the efficiency of NoOp-heuristics or to get approximate collab window size.\n\t\t\tthis.opsLogger.sendPerformanceEvent({\n\t\t\t\teventName: \"OpStats\",\n\t\t\t\t// Logging as 'details' property to avoid adding new column name to the log tables */\n\t\t\t\tdetails: {\n\t\t\t\t\t// Count of the ops processed by the current client. Note: these counts are after\n\t\t\t\t\t// compression/grouping/chunking (if enabled) of the ops.\n\t\t\t\t\tprocessedOpCount: OpPerfTelemetry.PROCESSED_OPS_SAMPLE_RATE,\n\t\t\t\t\t// Cumulative size of all the ops processed by the current client since the last OpStats event log\n\t\t\t\t\tprocessedOpSize: this.processedOpSizeForTelemetry,\n\t\t\t\t\t// Count of all the NoOp sent by the current client since the last OpStats event log\n\t\t\t\t\tsubmitedNoOpCount: this.noOpCountForTelemetry,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n}\n\n/**\n * Starts monitoring and generation of telemetry related to op performance.\n *\n * @param clientId - The clientId of the current container.\n * @param deltaManager - DeltaManager instance to monitor.\n * @param containerRuntimeEvents - Emitter of events for the container runtime.\n * @param logger - Telemetry logger to write events to.\n */\nexport function ReportOpPerfTelemetry(\n\tclientId: string | undefined,\n\tdeltaManager: IDeltaManagerFull,\n\tcontainerRuntimeEvents: IEventProvider<IContainerRuntimeEvents>,\n\tlogger: ITelemetryBaseLogger,\n): void {\n\tnew OpPerfTelemetry(\n\t\tclientId,\n\t\tdeltaManager,\n\t\tcontainerRuntimeEvents,\n\t\tcreateChildLogger({ logger }),\n\t);\n}\n"]}
1
+ {"version":3,"file":"connectionTelemetry.js","sourceRoot":"","sources":["../src/connectionT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yright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport type { IDeltaManagerFull } from \"@fluidframework/container-definitions/internal\";\nimport type { IContainerRuntimeEvents } from \"@fluidframework/container-runtime-definitions/internal\";\nimport type { ITelemetryBaseLogger, IEventProvider } from \"@fluidframework/core-interfaces\";\nimport { LogLevel } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport {\n\ttype IDocumentMessage,\n\tMessageType,\n\ttype ISequencedDocumentMessage,\n} from \"@fluidframework/driver-definitions/internal\";\nimport { isRuntimeMessage } from \"@fluidframework/driver-utils/internal\";\nimport {\n\ttype IEventSampler,\n\ttype TelemetryLoggerExt,\n\ttype ISampledTelemetryLogger,\n\tcreateChildLogger,\n\tcreateSampledLogger,\n\tformatTick,\n} from \"@fluidframework/telemetry-utils/internal\";\n\n/**\n * We report various latency-related errors when waiting for op roundtrip takes longer than that amout of time.\n */\nexport const latencyThreshold = 5000;\n\n// Phases in OpPerfTelemetry:\n// 1.\tOp is added to DeltaManager (DM) buffer.\n// 2.\tOp is sent to service (op leaves outbound queue).\n// \t - Note: We do not know for sure when op is sent, we only track when it is added to outbound queue.\n// If outbound queue is paused, time queue is paused is counted as network time.\n// 3.\tOp received from service back (pushed to inbound queue).\n// 4.\tOp is processed.\ninterface IOpPerfTelemetryProperties {\n\t/**\n\t * Measure time between (1) and (2) - Measure time outbound op is sitting in queue due to active batch\n\t */\n\tdurationOutboundBatching: number; // was durationOutboundQueue in previous versions\n\t/**\n\t * Measure time between (2) and (3) - Track how long it took for op to be acked by service\n\t */\n\tdurationNetwork: number; // was durationInboundQueue\n\t/**\n\t * Measure time between (3) and (4) - Time between DM's inbound \"push\" event until DM's \"op\" event\n\t */\n\tdurationInboundToProcessing: number;\n\t/**\n\t * Length of the DeltaManager's inbound queue at the time of the DM's inbound \"push\" event (3)\n\t */\n\tlengthInboundQueue: number;\n}\n\n/**\n * Timings collected at various moments during the op processing.\n */\ninterface IOpPerfTimings {\n\t/**\n\t * Starting time for (1)\n\t */\n\tsubmitOpEventTime: number;\n\t/**\n\t * Starting time for (2)\n\t */\n\toutboundPushEventTime: number;\n\t/**\n\t * Starting time for (3)\n\t */\n\tinboundPushEventTime: number;\n}\n\nclass OpPerfTelemetry {\n\tprivate pingLatency: number | undefined;\n\n\t// Collab window tracking. This is timestamp of %1000 message.\n\tprivate sequenceNumberForMsnTracking: number | undefined;\n\tprivate msnTrackingTimestamp: number = 0;\n\t// To track round trip time for every %500 client message.\n\tprivate clientSequenceNumberForLatencyStatistics: number | undefined;\n\t// Performance Data to be reported for ops round trips and processing.\n\tprivate readonly latencyStatistics = new Map<\n\t\tnumber,\n\t\t{\n\t\t\topProcessingTimes: Partial<IOpPerfTimings>;\n\t\t\topPerfData: Partial<IOpPerfTelemetryProperties>;\n\t\t}\n\t>();\n\n\tprivate firstConnection = true;\n\tprivate connectionOpSeqNumber: number | undefined;\n\tprivate readonly bootTime = performanceNow();\n\tprivate connectionStartTime = 0;\n\tprivate gap = 0;\n\n\t/**\n\t * Count of no-ops sent by this client. This variable is reset everytime the OpStats sampled event is logged\n\t */\n\tprivate noOpCountForTelemetry = 0;\n\t/**\n\t * Cumulative size of the ops processed by this client. This variable is reset everytime the OpStats sampled event is logged\n\t */\n\tprivate processedOpSizeForTelemetry = 0;\n\n\tprivate readonly logger: TelemetryLoggerExt;\n\n\tprivate static readonly OP_LATENCY_SAMPLE_RATE = 500;\n\tprivate readonly opLatencyLogger: ISampledTelemetryLogger;\n\n\tprivate static readonly DELTA_LATENCY_SAMPLE_RATE = 100;\n\tprivate readonly deltaLatencyLogger: ISampledTelemetryLogger;\n\n\tprivate static readonly PROCESSED_OPS_SAMPLE_RATE = 500;\n\n\t/**\n\t * A sampled logger to log Ops that have been processed by the current client, the NoOp sent and the\n\t * size of the ops processed within one sampling window of this log event.\n\t * The data from this logger will be used to monitor the efficiency of NoOp-heuristics or to get approximate collab window size.\n\t * Note: no log events are sent when sampling is disabled, because logging at every op will be too noisy.\n\t */\n\tprivate readonly opsLogger: ISampledTelemetryLogger;\n\n\t/**\n\t * Create an instance of OpPerfTelemetry which starts monitoring and generating telemetry related to op performance.\n\t *\n\t * @param clientId - The clientId of the current container.\n\t * @param deltaManager - DeltaManager instance to monitor.\n\t * @param containerRuntimeEvents - Emitter of events for the container runtime.\n\t * @param logger - Telemetry logger to write events to.\n\t */\n\tpublic constructor(\n\t\t/**\n\t\t * The clientId of the current container.\n\t\t *\n\t\t * @remarks Until the container connects to the server and receives an ack for its own join op, this can be undefined.\n\t\t * It gets updated in response to event changes once the value provided by the server is available.\n\t\t * If the container loses its connection, this could be the last known clientId.\n\t\t */\n\t\tprivate clientId: string | undefined,\n\t\t/**\n\t\t * DeltaManager instance to monitor.\n\t\t */\n\t\tprivate readonly deltaManager: IDeltaManagerFull,\n\t\t/**\n\t\t * Emitter of events for the container runtime.\n\t\t */\n\t\tcontainerRuntimeEvents: IEventProvider<IContainerRuntimeEvents>,\n\t\t/**\n\t\t * Telemetry logger to write events to.\n\t\t */\n\t\tlogger: TelemetryLoggerExt,\n\t) {\n\t\tthis.logger = createChildLogger({ logger, namespace: \"OpPerf\" });\n\n\t\tconst deltaLatencyEventSampler: IEventSampler = (() => {\n\t\t\tlet eventCount = -1;\n\t\t\treturn {\n\t\t\t\tsample: () => {\n\t\t\t\t\teventCount++;\n\t\t\t\t\tconst shouldSample = eventCount % OpPerfTelemetry.DELTA_LATENCY_SAMPLE_RATE === 0;\n\t\t\t\t\tif (shouldSample) {\n\t\t\t\t\t\teventCount = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn shouldSample;\n\t\t\t\t},\n\t\t\t};\n\t\t})();\n\n\t\tthis.deltaLatencyLogger = createSampledLogger(logger, deltaLatencyEventSampler);\n\n\t\t// The SampledLogger here is used get access to the isSamplingDisabled property derived from\n\t\t// telemetry config properties. The actual sampling logic for op messages happens outside this SampledLogger\n\t\t// due to complexity of the different asynchronus scenarios of the op message lifecycle.\n\t\tthis.opLatencyLogger = createSampledLogger(logger);\n\n\t\tconst opsEventSampler: IEventSampler = (() => {\n\t\t\tlet eventCount = 0;\n\t\t\treturn {\n\t\t\t\tsample: () => {\n\t\t\t\t\teventCount++;\n\t\t\t\t\tconst shouldSample = eventCount % OpPerfTelemetry.PROCESSED_OPS_SAMPLE_RATE === 0;\n\t\t\t\t\tif (shouldSample) {\n\t\t\t\t\t\teventCount = 0;\n\t\t\t\t\t\tthis.noOpCountForTelemetry = 0;\n\t\t\t\t\t\tthis.processedOpSizeForTelemetry = 0;\n\t\t\t\t\t}\n\t\t\t\t\treturn shouldSample;\n\t\t\t\t},\n\t\t\t};\n\t\t})();\n\t\tthis.opsLogger = createSampledLogger(\n\t\t\tlogger,\n\t\t\topsEventSampler,\n\t\t\ttrue /* skipLoggingWhenSamplingIsDisabled */,\n\t\t);\n\n\t\tthis.deltaManager.on(\"pong\", (latency) => this.recordPingTime(latency));\n\t\tthis.deltaManager.on(\"submitOp\", (message) => this.beforeOpSubmit(message));\n\t\tthis.deltaManager.on(\"op\", (message) => this.afterProcessingOp(message));\n\t\tthis.deltaManager.on(\"connect\", (details, opsBehind) => {\n\t\t\tif (opsBehind !== undefined) {\n\t\t\t\tthis.connectionOpSeqNumber = this.deltaManager.lastKnownSeqNumber;\n\t\t\t\tthis.gap = opsBehind;\n\t\t\t\tthis.connectionStartTime = performanceNow();\n\n\t\t\t\t// We might be already up-today. If so, report it right away.\n\t\t\t\tif (this.gap <= 0) {\n\t\t\t\t\tthis.reportGettingUpToDate();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tthis.deltaManager.on(\"disconnect\", () => {\n\t\t\tthis.sequenceNumberForMsnTracking = undefined;\n\t\t\tthis.clientSequenceNumberForLatencyStatistics = undefined;\n\t\t\tthis.connectionOpSeqNumber = undefined;\n\t\t\tthis.firstConnection = false;\n\t\t\tthis.latencyStatistics.clear();\n\t\t});\n\n\t\tthis.deltaManager.outbound.on(\"push\", (messages) => {\n\t\t\tfor (const msg of messages) {\n\t\t\t\tif (\n\t\t\t\t\tmsg.type === MessageType.Operation &&\n\t\t\t\t\t(this.opLatencyLogger.isSamplingDisabled ||\n\t\t\t\t\t\tthis.clientSequenceNumberForLatencyStatistics === msg.clientSequenceNumber)\n\t\t\t\t) {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\t\tconst latencyStats = this.latencyStatistics.get(msg.clientSequenceNumber)!;\n\t\t\t\t\tassert(latencyStats !== undefined, 0x7c2 /* Latency stats for op should exist */);\n\t\t\t\t\tassert(\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.outboundPushEventTime === undefined,\n\t\t\t\t\t\t0x2c8 /* \"outboundPushEventTime should be undefined\" */,\n\t\t\t\t\t);\n\t\t\t\t\tassert(\n\t\t\t\t\t\tlatencyStats.opPerfData.durationNetwork === undefined,\n\t\t\t\t\t\t0x2c9 /* \"durationNetwork should be undefined\" */,\n\t\t\t\t\t);\n\t\t\t\t\tlatencyStats.opProcessingTimes.outboundPushEventTime = Date.now();\n\n\t\t\t\t\tassert(\n\t\t\t\t\t\tlatencyStats.opPerfData.durationOutboundBatching === undefined,\n\t\t\t\t\t\t0x2ca /* \"durationOutboundBatching should be undefined\" */,\n\t\t\t\t\t);\n\n\t\t\t\t\tassert(\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.submitOpEventTime !== undefined,\n\t\t\t\t\t\t0x2cb /* \"submitOpEventTime should be undefined\" */,\n\t\t\t\t\t);\n\n\t\t\t\t\tlatencyStats.opPerfData.durationOutboundBatching =\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.outboundPushEventTime -\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.submitOpEventTime;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis.deltaManager.inbound.on(\"push\", (message: ISequencedDocumentMessage) => {\n\t\t\tif (\n\t\t\t\tthis.clientId === message.clientId &&\n\t\t\t\tmessage.type === MessageType.Operation &&\n\t\t\t\t(this.opLatencyLogger.isSamplingDisabled ||\n\t\t\t\t\tthis.clientSequenceNumberForLatencyStatistics === message.clientSequenceNumber)\n\t\t\t) {\n\t\t\t\t// We do an explicit check for undefined right after this\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\t\tconst latencyStats = this.latencyStatistics.get(message.clientSequenceNumber)!;\n\t\t\t\tassert(latencyStats !== undefined, 0x7c3 /* Latency stats for op should exist */);\n\t\t\t\tif (latencyStats.opProcessingTimes.outboundPushEventTime !== undefined) {\n\t\t\t\t\tlatencyStats.opProcessingTimes.inboundPushEventTime = Date.now();\n\t\t\t\t\tlatencyStats.opPerfData.durationNetwork =\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.inboundPushEventTime -\n\t\t\t\t\t\tlatencyStats.opProcessingTimes.outboundPushEventTime;\n\t\t\t\t\tlatencyStats.opPerfData.lengthInboundQueue = this.deltaManager.inbound.length;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isRuntimeMessage(message) && typeof message.contents === \"string\") {\n\t\t\t\tthis.processedOpSizeForTelemetry += message.contents.length;\n\t\t\t}\n\t\t});\n\n\t\tthis.deltaManager.inbound.on(\"idle\", (count: number, duration: number) => {\n\t\t\t// Do not want to log zero for sure.\n\t\t\t// We are more interested in aggregates, so logging only if we are processing some number of ops\n\t\t\t// Cut-off is arbitrary - can be increased or decreased based on amount of data collected and questions we\n\t\t\t// want to get answered\n\t\t\t// back-compat: Once 0.36 loader version saturates (count & duration args were added there),\n\t\t\t// we can remove typeof check.\n\t\t\tif (typeof count === \"number\" && count >= 100) {\n\t\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\t\teventName: \"GetDeltas_OpProcessing\",\n\t\t\t\t\tcount,\n\t\t\t\t\tduration,\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\n\t\tcontainerRuntimeEvents.on(\"connected\", (newClientId) => {\n\t\t\tthis.clientId = newClientId;\n\t\t});\n\t}\n\n\tprivate reportGettingUpToDate(): void {\n\t\tthis.connectionOpSeqNumber = undefined;\n\t\tthis.logger.sendPerformanceEvent(\n\t\t\t{\n\t\t\t\teventName: \"ConnectionSpeed\",\n\t\t\t\tduration: performanceNow() - this.connectionStartTime,\n\t\t\t\tops: this.gap,\n\t\t\t\t// track time to connect only for first connection.\n\t\t\t\ttimeToConnect: this.firstConnection\n\t\t\t\t\t? formatTick(this.connectionStartTime - this.bootTime)\n\t\t\t\t\t: undefined,\n\t\t\t\tfirstConnection: this.firstConnection,\n\t\t\t},\n\t\t\tundefined, // error\n\t\t\tLogLevel.info,\n\t\t);\n\t}\n\n\tprivate recordPingTime(latency: number): void {\n\t\tthis.pingLatency = latency;\n\n\t\t// Log if latency is longer than 1 min\n\t\tif (latency > 1000 * 60) {\n\t\t\tthis.logger.sendErrorEvent({\n\t\t\t\teventName: \"LatencyTooLong\",\n\t\t\t\tduration: latency,\n\t\t\t});\n\t\t}\n\n\t\t// logging one in every DELTA_LATENCY_SAMPLE_RATE pongs, including the first time, if it is a \"write\" client.\n\t\tif (this.deltaManager.active) {\n\t\t\tthis.deltaLatencyLogger.sendPerformanceEvent({\n\t\t\t\teventName: \"DeltaLatency\",\n\t\t\t\tduration: latency,\n\t\t\t});\n\t\t}\n\t}\n\n\tprivate beforeOpSubmit(message: IDocumentMessage): void {\n\t\t// start with first client op and measure latency every 500 client ops\n\t\tif (\n\t\t\tthis.opLatencyLogger.isSamplingDisabled ||\n\t\t\t(this.clientSequenceNumberForLatencyStatistics === undefined &&\n\t\t\t\tmessage.clientSequenceNumber % OpPerfTelemetry.OP_LATENCY_SAMPLE_RATE === 1)\n\t\t) {\n\t\t\tassert(\n\t\t\t\tthis.latencyStatistics.get(message.clientSequenceNumber) === undefined,\n\t\t\t\t0x7c4 /* Existing op perf data for client sequence number */,\n\t\t\t);\n\t\t\tthis.clientSequenceNumberForLatencyStatistics = message.clientSequenceNumber;\n\t\t\tthis.latencyStatistics.set(message.clientSequenceNumber, {\n\t\t\t\topProcessingTimes: {\n\t\t\t\t\tsubmitOpEventTime: Date.now(),\n\t\t\t\t},\n\t\t\t\topPerfData: {},\n\t\t\t});\n\t\t}\n\n\t\tif (message.type === MessageType.NoOp) {\n\t\t\t// Count the number of no-ops submitted by this client.\n\t\t\t// The value is reset when we log the OpStats sampled event.\n\t\t\tthis.noOpCountForTelemetry++;\n\t\t}\n\t}\n\n\tprivate afterProcessingOp(message: ISequencedDocumentMessage): void {\n\t\tconst sequenceNumber = message.sequenceNumber;\n\n\t\tif (sequenceNumber === this.connectionOpSeqNumber) {\n\t\t\tthis.reportGettingUpToDate();\n\t\t}\n\n\t\t// Record collab window max size after every 1000th op.\n\t\tif (this.sequenceNumberForMsnTracking === undefined && sequenceNumber % 1000 === 0) {\n\t\t\tthis.sequenceNumberForMsnTracking = sequenceNumber;\n\t\t\tthis.msnTrackingTimestamp = message.timestamp;\n\t\t}\n\t\tif (\n\t\t\tthis.sequenceNumberForMsnTracking !== undefined &&\n\t\t\tmessage.minimumSequenceNumber >= this.sequenceNumberForMsnTracking\n\t\t) {\n\t\t\tassert(\n\t\t\t\tthis.msnTrackingTimestamp !== undefined,\n\t\t\t\t0x2ce /* \"msnTrackingTimestamp should not be undefined\" */,\n\t\t\t);\n\t\t\tthis.logger.sendPerformanceEvent({\n\t\t\t\teventName: \"MsnStatistics\",\n\t\t\t\tsequenceNumber,\n\t\t\t\tmsnDistance: sequenceNumber - this.sequenceNumberForMsnTracking,\n\t\t\t\tduration: message.timestamp - this.msnTrackingTimestamp,\n\t\t\t});\n\t\t\tthis.sequenceNumberForMsnTracking = undefined;\n\t\t}\n\n\t\tif (\n\t\t\tthis.clientId === message.clientId &&\n\t\t\tmessage.type === MessageType.Operation &&\n\t\t\t(this.opLatencyLogger.isSamplingDisabled ||\n\t\t\t\tthis.clientSequenceNumberForLatencyStatistics === message.clientSequenceNumber)\n\t\t) {\n\t\t\t// We do an explicit check for undefined right after this\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n\t\t\tconst latencyData = this.latencyStatistics.get(message.clientSequenceNumber)!;\n\t\t\tassert(latencyData !== undefined, 0x7c5 /* Undefined latency statistics for op */);\n\t\t\tassert(\n\t\t\t\tlatencyData.opProcessingTimes.submitOpEventTime !== undefined,\n\t\t\t\t0x120 /* \"Undefined latency statistics for op (op send time)\" */,\n\t\t\t);\n\t\t\tconst currentTime = Date.now();\n\t\t\tif (latencyData.opProcessingTimes.inboundPushEventTime !== undefined) {\n\t\t\t\tlatencyData.opPerfData.durationInboundToProcessing =\n\t\t\t\t\tcurrentTime - latencyData.opProcessingTimes.inboundPushEventTime;\n\t\t\t}\n\t\t\tconst duration = currentTime - latencyData.opProcessingTimes.submitOpEventTime;\n\n\t\t\t// One of the core expectations for Fluid service is to be fast.\n\t\t\t// When it's not the case, we want to learn about it and be able to investigate, so\n\t\t\t// raise awareness.\n\t\t\t// This also helps identify cases where it's due to client behavior (sending too many ops)\n\t\t\t// that results in overwhelming ordering service and thus starting to see long latencies.\n\t\t\t// The threshold could be adjusted, but ideally it stays workload-agnostic, as service\n\t\t\t// performance impacts all workloads relying on service.\n\t\t\tconst category = duration > latencyThreshold ? \"error\" : \"performance\";\n\t\t\tthis.opLatencyLogger.sendPerformanceEvent({\n\t\t\t\teventName: \"OpRoundtripTime\",\n\t\t\t\tsequenceNumber,\n\t\t\t\treferenceSequenceNumber: message.referenceSequenceNumber,\n\t\t\t\tduration,\n\t\t\t\tcategory,\n\t\t\t\tpingLatency: this.pingLatency,\n\t\t\t\tmsnDistance:\n\t\t\t\t\tthis.deltaManager.lastSequenceNumber - this.deltaManager.minimumSequenceNumber,\n\t\t\t\t...latencyData.opPerfData,\n\t\t\t});\n\n\t\t\tthis.clientSequenceNumberForLatencyStatistics = undefined;\n\t\t\tthis.latencyStatistics.delete(message.clientSequenceNumber);\n\t\t}\n\n\t\tif (isRuntimeMessage(message)) {\n\t\t\t// Sampled logging of Ops that have been processed by the current client, the NoOp sent and the\n\t\t\t// size of the ops processed within one sampling window of this log event.\n\t\t\t// This data will be used to monitor the efficiency of NoOp-heuristics or to get approximate collab window size.\n\t\t\tthis.opsLogger.sendPerformanceEvent({\n\t\t\t\teventName: \"OpStats\",\n\t\t\t\t// Logging as 'details' property to avoid adding new column name to the log tables */\n\t\t\t\tdetails: {\n\t\t\t\t\t// Count of the ops processed by the current client. Note: these counts are after\n\t\t\t\t\t// compression/grouping/chunking (if enabled) of the ops.\n\t\t\t\t\tprocessedOpCount: OpPerfTelemetry.PROCESSED_OPS_SAMPLE_RATE,\n\t\t\t\t\t// Cumulative size of all the ops processed by the current client since the last OpStats event log\n\t\t\t\t\tprocessedOpSize: this.processedOpSizeForTelemetry,\n\t\t\t\t\t// Count of all the NoOp sent by the current client since the last OpStats event log\n\t\t\t\t\tsubmitedNoOpCount: this.noOpCountForTelemetry,\n\t\t\t\t},\n\t\t\t});\n\t\t}\n\t}\n}\n\n/**\n * Starts monitoring and generation of telemetry related to op performance.\n *\n * @param clientId - The clientId of the current container.\n * @param deltaManager - DeltaManager instance to monitor.\n * @param containerRuntimeEvents - Emitter of events for the container runtime.\n * @param logger - Telemetry logger to write events to.\n */\nexport function ReportOpPerfTelemetry(\n\tclientId: string | undefined,\n\tdeltaManager: IDeltaManagerFull,\n\tcontainerRuntimeEvents: IEventProvider<IContainerRuntimeEvents>,\n\tlogger: ITelemetryBaseLogger,\n): void {\n\tnew OpPerfTelemetry(\n\t\tclientId,\n\t\tdeltaManager,\n\t\tcontainerRuntimeEvents,\n\t\tcreateChildLogger({ logger }),\n\t);\n}\n"]}
@@ -18,7 +18,7 @@ import type { IIdCompressorCore, SerializedIdCompressorWithOngoingSession } from
18
18
  import { FlushMode } from "@fluidframework/runtime-definitions/internal";
19
19
  import type { ISummaryTreeWithStats, ITelemetryContext, IGarbageCollectionData, CreateChildSummarizerNodeParam, IDataStore, IFluidDataStoreContextDetached, IFluidDataStoreRegistry, IFluidParentContext, NamedFluidDataStoreRegistryEntries, SummarizeInternalFn, ISummarizerNodeWithGC, StageControlsInternal, IContainerRuntimeBaseInternal, MinimumVersionForCollab, ContainerExtensionExpectations } from "@fluidframework/runtime-definitions/internal";
20
20
  import { TelemetryContext } from "@fluidframework/runtime-utils/internal";
21
- import type { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
21
+ import type { TelemetryLoggerExt } from "@fluidframework/telemetry-utils/internal";
22
22
  import { type IPendingBlobs, type IBlobManagerLoadInfo } from "./blobManager/index.js";
23
23
  import type { ICompressionRuntimeOptions } from "./compressionDefinitions.js";
24
24
  import { GCNodeType, type IGCRuntimeOptions, type IGCStats, type IGarbageCollectionRuntime } from "./gc/index.js";
@@ -274,7 +274,7 @@ export declare const makeLegacySendBatchFn: (submitFn: (type: MessageType, conte
274
274
  * to understand if/when it is hit.
275
275
  * We only want to log this once, to avoid spamming telemetry if we are wrong and these cases are hit commonly.
276
276
  */
277
- export declare let getSingleUseLegacyLogCallback: (logger: ITelemetryLoggerExt, type: string) => (codePath: string) => void;
277
+ export declare let getSingleUseLegacyLogCallback: (logger: TelemetryLoggerExt, type: string) => (codePath: string) => void;
278
278
  /**
279
279
  * A {@link TypedMessage} that has unknown content explicitly
280
280
  * noted as deserialized JSON.
@@ -371,7 +371,6 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
371
371
  private readonly electedSummarizerData;
372
372
  private readonly runtimeOptions;
373
373
  private readonly containerScope;
374
- readonly baseLogger: ITelemetryBaseLogger;
375
374
  private readonly _storage;
376
375
  private readonly createIdCompressorFn;
377
376
  private readonly documentsSchemaController;
@@ -444,6 +443,17 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
444
443
  get IFluidDataStoreRegistry(): IFluidDataStoreRegistry;
445
444
  private readonly _getAttachState;
446
445
  get attachState(): AttachState;
446
+ /**
447
+ * Whether local op submission is currently disallowed.
448
+ *
449
+ * This is `true` in two distinct situations.
450
+ *
451
+ * First: the delta manager reports a read-only connection (host/service-imposed permission or connection state — the historical meaning of `readOnly`).
452
+ *
453
+ * Second: the `PendingStateManager` is replaying stashed ops (`isApplyingStashedOps`). During this window DDSes must not submit new local ops, as doing so would interleave fresh content ahead of the stashed pending stream and corrupt pending local state. Surfacing it through `isReadOnly()` lets DDSes that consult `readOnly` at realize time self-suppress; see the apply-lifecycle docs on `PendingStateManager` for the full rationale.
454
+ *
455
+ * Note this layers a third meaning ("transiently quiescing for stashed-op replay") onto the `readOnly` predicate, which is broader than its host/connection-permission origin.
456
+ */
447
457
  readonly isReadOnly: () => boolean;
448
458
  /**
449
459
  * Current session schema - defines what options are on & off.
@@ -595,6 +605,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
595
605
  */
596
606
  get ILayerCompatDetails(): ILayerCompatDetails;
597
607
  private readonly extensions;
608
+ readonly baseLogger: ITelemetryBaseLogger;
598
609
  /***/
599
610
  protected constructor(context: IContainerContext, registry: IFluidDataStoreRegistry, metadata: IContainerRuntimeMetadata | undefined, electedSummarizerData: ISerializedElection | undefined, chunks: [string, string[]][], dataStoreAliasMap: [string, string][], runtimeOptions: Readonly<ContainerRuntimeOptionsInternal>, containerScope: FluidObject, baseLogger: ITelemetryBaseLogger, existing: boolean, blobManagerLoadInfo: IBlobManagerLoadInfo, _storage: IContainerStorageService, createIdCompressorFn: () => IIdCompressor & IIdCompressorCore, documentsSchemaController: DocumentsSchemaController, featureGatesForTelemetry: Record<string, boolean | number | undefined>, provideEntryPoint: (containerRuntime: IContainerRuntime) => Promise<FluidObject>, minVersionForCollab: MinimumVersionForCollab, requestHandler?: ((request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>) | undefined, summaryConfiguration?: ISummaryConfiguration, recentBatchInfo?: [number, string][]);
600
611
  onSchemaChange(schema: IDocumentSchemaCurrent): void;
@@ -843,7 +854,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
843
854
  /**
844
855
  * Logger to use for correlated summary events
845
856
  */
846
- summaryLogger?: ITelemetryLoggerExt;
857
+ summaryLogger?: TelemetryLoggerExt;
847
858
  /**
848
859
  * True to run garbage collection before summarizing; defaults to true
849
860
  */
@@ -918,7 +929,7 @@ export declare class ContainerRuntime extends TypedEventEmitter<IContainerRuntim
918
929
  /**
919
930
  * Logger to use for logging GC events
920
931
  */
921
- logger?: ITelemetryLoggerExt;
932
+ logger?: TelemetryLoggerExt;
922
933
  /**
923
934
  * True to run GC sweep phase after the mark phase
924
935
  */
@@ -1 +1 @@
1
- {"version":3,"file":"containerRuntime.d.ts","sourceRoot":"","sources":["../src/containerRuntime.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,mBAAmB,EACnB,0BAA0B,EAC1B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAIN,iBAAiB,EACjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACX,SAAS,EAET,uBAAuB,EAEvB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACpE,OAAO,KAAK,EACX,iBAAiB,EACjB,0BAA0B,EAC1B,QAAQ,EACR,aAAa,EAGb,wBAAwB,EACxB,gBAAgB,EAChB,MAAM,gDAAgD,CAAC;AAKxD,OAAO,KAAK,EACX,yBAAyB,EACzB,oBAAoB,EAIpB,0BAA0B,EAC1B,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,EAEzB,6CAA6C,EAG7C,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EACX,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,oBAAoB,EAEpB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,KAAK,EACX,mBAAmB,EACnB,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,MAAM,0CAA0C,CAAC;AAWlD,OAAO,KAAK,EACX,cAAc,EACd,cAAc,EACd,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAE5C,O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AQ,CAAC,uBAAuB,CAiBrC;IAEH,OAAO,CAAC,eAAe;IAiBvB,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAI5B;IAEH,gBAAgB,CACtB,CAAC,EACD,kBAAkB,SAAS,0BAA0B,EACrD,WAAW,SAAS,OAAO,EAAE,EAE7B,EAAE,EAAE,oBAAoB,EACxB,OAAO,EAAE,yBAAyB,CAAC,CAAC,EAAE,kBAAkB,EAAE,WAAW,CAAC,EACtE,GAAG,UAAU,EAAE,WAAW,GACxB,CAAC;IASG,YAAY,CAClB,CAAC,EACD,kBAAkB,SAAS,0BAA0B,EACrD,WAAW,SAAS,OAAO,EAAE,EAE7B,EAAE,EAAE,oBAAoB,EACxB,YAAY,EAAE,8BAA8B,EAC5C,GAAG,UAAU,EAAE,WAAW,GACxB,CAAC;IAWJ,OAAO,CAAC,wBAAwB;IA0FhC,OAAO,KAAK,sBAAsB,GAEjC;CACD;AAED,wBAAgB,2BAA2B,CAAC,EAC3C,IAAI,EACJ,QAAQ,GACR,EAAE,4BAA4B,GAAG,OAAO,CA4BxC"}
@@ -632,14 +632,31 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
632
632
  this.electedSummarizerData = electedSummarizerData;
633
633
  this.runtimeOptions = runtimeOptions;
634
634
  this.containerScope = containerScope;
635
- this.baseLogger = baseLogger;
636
635
  this._storage = _storage;
637
636
  this.createIdCompressorFn = createIdCompressorFn;
638
637
  this.documentsSchemaController = documentsSchemaController;
639
638
  this.minVersionForCollab = minVersionForCollab;
640
639
  this.requestHandler = requestHandler;
641
640
  this.summaryConfiguration = summaryConfiguration;
642
- this.isReadOnly = () => this.deltaManager.readOnlyInfo.readonly === true;
641
+ /**
642
+ * Whether local op submission is currently disallowed.
643
+ *
644
+ * This is `true` in two distinct situations.
645
+ *
646
+ * First: the delta manager reports a read-only connection (host/service-imposed permission or connection state — the historical meaning of `readOnly`).
647
+ *
648
+ * Second: the `PendingStateManager` is replaying stashed ops (`isApplyingStashedOps`). During this window DDSes must not submit new local ops, as doing so would interleave fresh content ahead of the stashed pending stream and corrupt pending local state. Surfacing it through `isReadOnly()` lets DDSes that consult `readOnly` at realize time self-suppress; see the apply-lifecycle docs on `PendingStateManager` for the full rationale.
649
+ *
650
+ * Note this layers a third meaning ("transiently quiescing for stashed-op replay") onto the `readOnly` predicate, which is broader than its host/connection-permission origin.
651
+ */
652
+ this.isReadOnly = () =>
653
+ // `_deltaManager` and `pendingStateManager` are both assigned partway
654
+ // through the constructor; `baseLogger` is built earlier and stamps
655
+ // `isReadOnly` on every error event (e.g. layer-compat failures
656
+ // during construction), so this can be called before either is
657
+ // assigned. Optional chains keep that window safe.
658
+ this._deltaManager?.readOnlyInfo.readonly === true ||
659
+ this.pendingStateManager?.isApplyingStashedOps === true;
643
660
  // We accumulate Id compressor Ops while Id compressor is not loaded yet (only for "delayed" mode)
644
661
  // Once it loads, it will process all such ops and we will stop accumulating further ops - ops will be processes as they come in.
645
662
  this.pendingIdCompressorOps = [];
@@ -658,7 +675,13 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
658
675
  expiry: { policy: "absolute", durationMs: 60000 },
659
676
  });
660
677
  this.extensions = new Map();
661
- this.notifyReadOnlyState = (readonly) => this.channelCollection.notifyReadOnlyState(readonly);
678
+ // Boolean payload from the `"readonly"` delta-manager event is intentionally
679
+ // ignored — `isReadOnly()` aggregates delta-manager readonly with the PSM
680
+ // apply window, and that aggregation is the source of truth for fanout.
681
+ // `channelCollection?.` guards against future wiring changes; both callers
682
+ // today (the `"readonly"` listener and `onAfterStashedOpsApplied`) fire
683
+ // after `channelCollection` is assigned.
684
+ this.notifyReadOnlyState = (_readonly) => this.channelCollection?.notifyReadOnlyState(this.isReadOnly());
662
685
  /**
663
686
  * Enter Staging Mode, such that ops submitted to the ContainerRuntime will not be sent to the ordering service.
664
687
  * To exit Staging Mode, call either discardChanges or commitChanges on the Stage Controls returned from this method.
@@ -817,15 +840,20 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
817
840
  // In old loaders without dispose functionality, closeFn is equivalent but will also switch container to readonly mode
818
841
  this.disposeFn = disposeFn ?? closeFn;
819
842
  this.isSnapshotInstanceOfISnapshot = snapshotWithContents !== undefined;
820
- this.mc = (0, internal_8.createChildMonitoringContext)({
821
- logger: this.baseLogger,
822
- namespace: "ContainerRuntime",
843
+ this.baseLogger = (0, internal_8.createChildLogger)({
844
+ logger: baseLogger,
823
845
  properties: {
824
- all: {
825
- inStagingMode: this.inStagingMode,
846
+ error: {
847
+ inStagingMode: () => this.inStagingMode,
848
+ isApplyingStashedOps: () => this.pendingStateManager?.isApplyingStashedOps,
849
+ isReadOnly: () => this.isReadOnly(),
826
850
  },
827
851
  },
828
852
  });
853
+ this.mc = (0, internal_8.createChildMonitoringContext)({
854
+ logger: this.baseLogger,
855
+ namespace: "ContainerRuntime",
856
+ });
829
857
  // Validate that the Loader is compatible with this Runtime.
830
858
  const maybeLoaderCompatDetailsForRuntime = context;
831
859
  (0, runtimeLayerCompatState_js_1.validateLoaderCompatibility)(maybeLoaderCompatDetailsForRuntime.ILayerCompatDetails, this.disposeFn, this.mc);
@@ -948,7 +976,18 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
948
976
  reSubmitBatch: this.reSubmitBatch.bind(this),
949
977
  isActiveConnection: () => this.innerDeltaManager.active,
950
978
  isAttached: () => this.attachState !== container_definitions_1.AttachState.Detached,
951
- }, pendingRuntimeState?.pending, this.baseLogger);
979
+ }, pendingRuntimeState?.pending, this.baseLogger, {
980
+ // PSM has cleared `isApplyingStashedOps`; `isReadOnly()` now
981
+ // reflects the network-readonly state again. Fan out so DDSes
982
+ // know they can submit once more. No open hook is needed —
983
+ // the apply window opens before `channelCollection` exists,
984
+ // so a fanout there would be a no-op; data stores instead
985
+ // pick up the initial readonly state from `isReadOnly()`
986
+ // when they're first asked.
987
+ onAfterStashedOpsApplied: () => {
988
+ this.notifyReadOnlyState();
989
+ },
990
+ });
952
991
  let outerDeltaManager = this.innerDeltaManager;
953
992
  this.useDeltaManagerOpsProxy =
954
993
  this.mc.config.getBoolean("Fluid.ContainerRuntime.DeltaManagerOpsProxy") === true;
@@ -1214,6 +1253,13 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
1214
1253
  telemetryDocumentId: this.telemetryDocumentId,
1215
1254
  groupedBatchingEnabled: this.groupedBatchingEnabled,
1216
1255
  initialSequenceNumber: this.deltaManager.initialSequenceNumber,
1256
+ // Number of ops since the last summary that this client is aware of (including ops still
1257
+ // queued for processing). Computed as the gap between the latest known op sequence number
1258
+ // and the sequence number of the message at which the last summary was taken (per snapshot
1259
+ // metadata). Falls back to lastKnownSeqNumber when no prior summary message is recorded
1260
+ // (e.g. new container or older snapshot without metadata).
1261
+ numUnsummarizedOps: this.deltaManager.lastKnownSeqNumber -
1262
+ (this.messageAtLastSummary?.sequenceNumber ?? 0),
1217
1263
  minVersionForCollab: this.minVersionForCollab,
1218
1264
  // logging hardware telemetry
1219
1265
  deviceSpec: { ...getDeviceSpec() },
@@ -1666,6 +1712,24 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
1666
1712
  if (!this.shouldSendOps()) {
1667
1713
  return;
1668
1714
  }
1715
+ // Invariant: the canSendOps edge in `setConnectionStateCore` — the
1716
+ // only caller of this method — cannot fire while
1717
+ // `applyStashedOpsAt` is in flight, because the loader awaits the
1718
+ // apply before transitioning the runtime to a write-capable
1719
+ // connection. If this assert ever fires, that contract has changed
1720
+ // and the submit guard at `submit()` would catch a runtime-internal
1721
+ // resubmit (`Rejoin`, `GC`, `FluidDataStoreOp`) for an op type
1722
+ // outside the apply-window allowlist.
1723
+ //
1724
+ // The precondition is held by the load sequence: `loadRuntime2`
1725
+ // awaits `pendingStateManager.applyStashedOpsAt(...)` before
1726
+ // returning the runtime, and the loader gates `setLoaded` on that
1727
+ // completion before any write-capable connection edge fires. A
1728
+ // maintainer reordering either sequence (or adding a new
1729
+ // `canSendOps` edge that fires before the apply resolves) is what
1730
+ // would trip this assert.
1731
+ // @see {@link ContainerRuntime.loadRuntime2} (awaits `applyStashedOpsAt`)
1732
+ (0, internal_2.assert)(!this.pendingStateManager.isApplyingStashedOps, 0xd01 /* replayPendingStates must not be called during stashed-op apply window */);
1669
1733
  // Replaying is an internal operation and we don't want to generate noise while doing it.
1670
1734
  // So temporarily disable dirty state change events, and save the old state.
1671
1735
  // When we're done, we'll emit the event if the state changed.
@@ -3062,6 +3126,45 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
3062
3126
  }
3063
3127
  submit(containerRuntimeMessage, localOpMetadata = undefined, metadata) {
3064
3128
  this.verifyNotClosed();
3129
+ // Nothing should be submitting while we're replaying stashed ops.
3130
+ // The runtime is readonly during the apply window (see
3131
+ // `PendingStateManager._applyLifecycle`), so a compliant DDS skips
3132
+ // submits. If we land here anyway, a DDS bypassed the readonly gate
3133
+ // (e.g. a realize-time write that doesn't consult `readOnly`) and
3134
+ // produced a local op that has no counterpart in the saved-op
3135
+ // replay — we cannot reconcile the mismatch, so fail fatally. We
3136
+ // check here (rather than at flush) because outbox flushes are
3137
+ // deferred and the apply window could close before the offending op
3138
+ // reaches the pending queue.
3139
+ //
3140
+ // Allowlist: `BlobAttach` is a runtime-internal op type that may
3141
+ // legitimately fire during apply — produced by `sharePendingBlobs`,
3142
+ // which is invoked from `loadRuntime2` before `applyStashedOpsAt`
3143
+ // resolves. `IdAllocation` is not in this allowlist because the
3144
+ // assert at 0x9a5 below enforces that it never reaches `submit()`
3145
+ // at all; treating that assert as the single source of truth.
3146
+ //
3147
+ // Always surface the error event to telemetry on a bypass so we can
3148
+ // attribute incidents regardless of the on-switch state. The
3149
+ // `EnableSubmitDuringStashedApplyThrow` config opts in to the
3150
+ // throw + container close; by default we log only, so a first- or
3151
+ // third-party DDS that quietly bypasses the readonly gate in
3152
+ // production is observable without escalating to a fatal close.
3153
+ if (this.pendingStateManager.isApplyingStashedOps &&
3154
+ containerRuntimeMessage.type !== messageTypes_js_1.ContainerMessageType.BlobAttach) {
3155
+ const error = new internal_8.UsageError("Local op submitted during stashed-op apply window", {
3156
+ messageType: containerRuntimeMessage.type,
3157
+ });
3158
+ this.mc.logger.sendErrorEvent({ eventName: "SubmitDuringStashedOpApply" }, error);
3159
+ if (this.mc.config.getBoolean("Fluid.ContainerRuntime.EnableSubmitDuringStashedApplyThrow") === true) {
3160
+ // Close the container before throwing so the "throw + close"
3161
+ // contract is enforced by this code path rather than by
3162
+ // whichever caller happens to wrap the throw in `.catch(closeFn)`.
3163
+ // `closeFn` is idempotent; a caller that also closes won't double-close.
3164
+ this.closeFn(error);
3165
+ throw error;
3166
+ }
3167
+ }
3065
3168
  // There should be no ops in detached container state!
3066
3169
  (0, internal_2.assert)(this.attachState !== container_definitions_1.AttachState.Detached, 0x132 /* "sending ops in detached container" */);
3067
3170
  (0, internal_2.assert)(metadata === undefined ||