o11y 264.26.0 → 264.33.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 (268) hide show
  1. package/dist/modules/o11y/client/client.js +8 -0
  2. package/dist/modules/o11y/client/client.js.map +1 -1
  3. package/dist/modules/o11y/client/interfaces/Instrumentation.d.ts +1 -0
  4. package/dist/modules/o11y/client/library/InstrumentationImpl.d.ts +1 -0
  5. package/dist/modules/o11y/client/monitors/ErrorMonitor.d.ts +24 -0
  6. package/dist/modules/o11y/client/monitors/index.d.ts +1 -0
  7. package/dist/modules/o11y/client/orchestrator/initialize.d.ts +11 -2
  8. package/dist/modules/o11y/client/orchestrator.d.ts +1 -1
  9. package/dist/modules/o11y/client/queue/types.d.ts +1 -1
  10. package/dist/modules/o11y/client/telemetry_uploader.d.ts +2 -0
  11. package/dist/modules/o11y/collectors/interfaces/Instrumentation.d.ts +1 -0
  12. package/dist/modules/o11y/collectors/library/InstrumentationImpl.d.ts +1 -0
  13. package/dist/modules/o11y/collectors/monitors/ErrorMonitor.d.ts +24 -0
  14. package/dist/modules/o11y/collectors/monitors/index.d.ts +1 -0
  15. package/dist/modules/o11y/collectors/orchestrator/initialize.d.ts +11 -2
  16. package/dist/modules/o11y/collectors/orchestrator.d.ts +1 -1
  17. package/dist/modules/o11y/collectors/queue/types.d.ts +1 -1
  18. package/dist/modules/o11y/collectors/telemetry_uploader.d.ts +2 -0
  19. package/dist/modules/o11y/core_envelope/interfaces/Instrumentation.d.ts +1 -0
  20. package/dist/modules/o11y/core_envelope/library/InstrumentationImpl.d.ts +1 -0
  21. package/dist/modules/o11y/core_envelope/monitors/ErrorMonitor.d.ts +24 -0
  22. package/dist/modules/o11y/core_envelope/monitors/index.d.ts +1 -0
  23. package/dist/modules/o11y/core_envelope/orchestrator/initialize.d.ts +11 -2
  24. package/dist/modules/o11y/core_envelope/orchestrator.d.ts +1 -1
  25. package/dist/modules/o11y/core_envelope/queue/types.d.ts +1 -1
  26. package/dist/modules/o11y/core_envelope/telemetry_uploader.d.ts +2 -0
  27. package/dist/modules/o11y/monitors/interfaces/Instrumentation.d.ts +1 -0
  28. package/dist/modules/o11y/monitors/library/InstrumentationImpl.d.ts +1 -0
  29. package/dist/modules/o11y/monitors/monitors/ErrorMonitor.d.ts +24 -0
  30. package/dist/modules/o11y/monitors/monitors/index.d.ts +1 -0
  31. package/dist/modules/o11y/monitors/monitors.js +157 -1
  32. package/dist/modules/o11y/monitors/monitors.js.map +1 -1
  33. package/dist/modules/o11y/monitors/orchestrator/initialize.d.ts +11 -2
  34. package/dist/modules/o11y/monitors/orchestrator.d.ts +1 -1
  35. package/dist/modules/o11y/monitors/queue/types.d.ts +1 -1
  36. package/dist/modules/o11y/monitors/telemetry_uploader.d.ts +2 -0
  37. package/dist/modules/o11y/orchestrator/interfaces/Instrumentation.d.ts +1 -0
  38. package/dist/modules/o11y/orchestrator/library/InstrumentationImpl.d.ts +1 -0
  39. package/dist/modules/o11y/orchestrator/monitors/ErrorMonitor.d.ts +24 -0
  40. package/dist/modules/o11y/orchestrator/monitors/index.d.ts +1 -0
  41. package/dist/modules/o11y/orchestrator/orchestrator/initialize.d.ts +11 -2
  42. package/dist/modules/o11y/orchestrator/orchestrator.d.ts +1 -1
  43. package/dist/modules/o11y/orchestrator/orchestrator.js +112 -4398
  44. package/dist/modules/o11y/orchestrator/orchestrator.js.map +1 -1
  45. package/dist/modules/o11y/orchestrator/queue/types.d.ts +1 -1
  46. package/dist/modules/o11y/orchestrator/telemetry_uploader.d.ts +2 -0
  47. package/dist/modules/o11y/queue/interfaces/Instrumentation.d.ts +1 -0
  48. package/dist/modules/o11y/queue/library/InstrumentationImpl.d.ts +1 -0
  49. package/dist/modules/o11y/queue/monitors/ErrorMonitor.d.ts +24 -0
  50. package/dist/modules/o11y/queue/monitors/index.d.ts +1 -0
  51. package/dist/modules/o11y/queue/orchestrator/initialize.d.ts +11 -2
  52. package/dist/modules/o11y/queue/orchestrator.d.ts +1 -1
  53. package/dist/modules/o11y/queue/queue/types.d.ts +1 -1
  54. package/dist/modules/o11y/queue/queue.js +1 -0
  55. package/dist/modules/o11y/queue/queue.js.map +1 -1
  56. package/dist/modules/o11y/queue/telemetry_uploader.d.ts +2 -0
  57. package/dist/modules/o11y/shared/interfaces/Instrumentation.d.ts +1 -0
  58. package/dist/modules/o11y/shared/library/InstrumentationImpl.d.ts +1 -0
  59. package/dist/modules/o11y/shared/monitors/ErrorMonitor.d.ts +24 -0
  60. package/dist/modules/o11y/shared/monitors/index.d.ts +1 -0
  61. package/dist/modules/o11y/shared/orchestrator/initialize.d.ts +11 -2
  62. package/dist/modules/o11y/shared/orchestrator.d.ts +1 -1
  63. package/dist/modules/o11y/shared/queue/types.d.ts +1 -1
  64. package/dist/modules/o11y/shared/telemetry_uploader.d.ts +2 -0
  65. package/dist/modules/o11y/simple_collector/interfaces/Instrumentation.d.ts +1 -0
  66. package/dist/modules/o11y/simple_collector/library/InstrumentationImpl.d.ts +1 -0
  67. package/dist/modules/o11y/simple_collector/monitors/ErrorMonitor.d.ts +24 -0
  68. package/dist/modules/o11y/simple_collector/monitors/index.d.ts +1 -0
  69. package/dist/modules/o11y/simple_collector/orchestrator/initialize.d.ts +11 -2
  70. package/dist/modules/o11y/simple_collector/orchestrator.d.ts +1 -1
  71. package/dist/modules/o11y/simple_collector/queue/types.d.ts +1 -1
  72. package/dist/modules/o11y/simple_collector/telemetry_uploader.d.ts +2 -0
  73. package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/Instrumentation.d.ts +1 -0
  74. package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/InstrumentationImpl.d.ts +1 -0
  75. package/dist/modules/o11y/telemetry_uploader/monitors/ErrorMonitor.d.ts +24 -0
  76. package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/monitors/index.d.ts +1 -0
  77. package/dist/modules/o11y/telemetry_uploader/orchestrator/initialize.d.ts +24 -0
  78. package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/orchestrator.d.ts +1 -1
  79. package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/queue/types.d.ts +1 -1
  80. package/dist/modules/o11y/telemetry_uploader/telemetry_uploader.d.ts +2 -0
  81. package/dist/modules/o11y/{telemetry-uploader/telemetry-uploader.js → telemetry_uploader/telemetry_uploader.js} +1 -1
  82. package/dist/modules/o11y/{telemetry-uploader/telemetry-uploader.js.map → telemetry_uploader/telemetry_uploader.js.map} +1 -1
  83. package/dist/modules/o11y/tenant_class_channel/interfaces/Instrumentation.d.ts +1 -0
  84. package/dist/modules/o11y/tenant_class_channel/library/InstrumentationImpl.d.ts +1 -0
  85. package/dist/modules/o11y/tenant_class_channel/monitors/ErrorMonitor.d.ts +24 -0
  86. package/dist/modules/o11y/tenant_class_channel/monitors/index.d.ts +1 -0
  87. package/dist/modules/o11y/tenant_class_channel/orchestrator/initialize.d.ts +11 -2
  88. package/dist/modules/o11y/tenant_class_channel/orchestrator.d.ts +1 -1
  89. package/dist/modules/o11y/tenant_class_channel/queue/types.d.ts +1 -1
  90. package/dist/modules/o11y/tenant_class_channel/telemetry_uploader.d.ts +2 -0
  91. package/dist/modules/o11y/tenant_class_channel/tenant_class_channel.js-meta.xml +7 -0
  92. package/dist/modules/o11y/web_vitals/interfaces/Instrumentation.d.ts +1 -0
  93. package/dist/modules/o11y/web_vitals/library/InstrumentationImpl.d.ts +1 -0
  94. package/dist/modules/o11y/web_vitals/monitors/ErrorMonitor.d.ts +24 -0
  95. package/dist/modules/o11y/web_vitals/monitors/index.d.ts +1 -0
  96. package/dist/modules/o11y/web_vitals/orchestrator/initialize.d.ts +11 -2
  97. package/dist/modules/o11y/web_vitals/orchestrator.d.ts +1 -1
  98. package/dist/modules/o11y/web_vitals/queue/types.d.ts +1 -1
  99. package/dist/modules/o11y/web_vitals/telemetry_uploader.d.ts +2 -0
  100. package/package.json +2 -2
  101. package/dist/modules/o11y/client/telemetry-uploader.d.ts +0 -2
  102. package/dist/modules/o11y/collectors/telemetry-uploader.d.ts +0 -2
  103. package/dist/modules/o11y/core_envelope/telemetry-uploader.d.ts +0 -2
  104. package/dist/modules/o11y/monitors/telemetry-uploader.d.ts +0 -2
  105. package/dist/modules/o11y/orchestrator/telemetry-uploader.d.ts +0 -2
  106. package/dist/modules/o11y/queue/telemetry-uploader.d.ts +0 -2
  107. package/dist/modules/o11y/shared/telemetry-uploader.d.ts +0 -2
  108. package/dist/modules/o11y/simple_collector/telemetry-uploader.d.ts +0 -2
  109. package/dist/modules/o11y/telemetry-uploader/orchestrator/initialize.d.ts +0 -15
  110. package/dist/modules/o11y/telemetry-uploader/telemetry-uploader.d.ts +0 -2
  111. package/dist/modules/o11y/tenant_class_channel/telemetry-uploader.d.ts +0 -2
  112. package/dist/modules/o11y/web_vitals/telemetry-uploader.d.ts +0 -2
  113. /package/dist/modules/o11y/client/{telemetry-uploader → telemetry_uploader}/TelemetryUploader.d.ts +0 -0
  114. /package/dist/modules/o11y/collectors/{telemetry-uploader → telemetry_uploader}/TelemetryUploader.d.ts +0 -0
  115. /package/dist/modules/o11y/core_envelope/{telemetry-uploader → telemetry_uploader}/TelemetryUploader.d.ts +0 -0
  116. /package/dist/modules/o11y/monitors/{telemetry-uploader → telemetry_uploader}/TelemetryUploader.d.ts +0 -0
  117. /package/dist/modules/o11y/orchestrator/{telemetry-uploader → telemetry_uploader}/TelemetryUploader.d.ts +0 -0
  118. /package/dist/modules/o11y/queue/{telemetry-uploader → telemetry_uploader}/TelemetryUploader.d.ts +0 -0
  119. /package/dist/modules/o11y/shared/{telemetry-uploader → telemetry_uploader}/TelemetryUploader.d.ts +0 -0
  120. /package/dist/modules/o11y/simple_collector/{telemetry-uploader → telemetry_uploader}/TelemetryUploader.d.ts +0 -0
  121. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/client.d.ts +0 -0
  122. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/collectors/core-collector/CoreCollector.d.ts +0 -0
  123. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/collectors/core-collector/CoreEnvelopeProtobufUtility.d.ts +0 -0
  124. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/collectors/core-collector/UploadMode.d.ts +0 -0
  125. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/collectors/core-collector/interfaces/CoreCollectorOptions.d.ts +0 -0
  126. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/collectors/core-collector/interfaces/UploadResult.d.ts +0 -0
  127. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/collectors/hybrid-collector/HybridCollector.d.ts +0 -0
  128. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/collectors/index.d.ts +0 -0
  129. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/collectors/protobuf-util.d.ts +0 -0
  130. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/collectors.d.ts +0 -0
  131. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/console-collector/ConsoleCollector.d.ts +0 -0
  132. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/CoreEnvelopeBuilder.d.ts +0 -0
  133. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/index.d.ts +0 -0
  134. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/BucketHistogram.d.ts +0 -0
  135. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/CoreEnvelope.d.ts +0 -0
  136. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/CoreEnvelopeContents.d.ts +0 -0
  137. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/CoreEnvelopeContentsRaw.d.ts +0 -0
  138. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/CoreEnvelopeDiagnostics.d.ts +0 -0
  139. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/EncodedSchematizedPayload.d.ts +0 -0
  140. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/LogMessage.d.ts +0 -0
  141. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/LogMessageRaw.d.ts +0 -0
  142. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/MessageBundle.d.ts +0 -0
  143. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/MetricTag.d.ts +0 -0
  144. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/Metrics.d.ts +0 -0
  145. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/StaticAttributes.d.ts +0 -0
  146. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/UpCounter.d.ts +0 -0
  147. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/ValueRecorder.d.ts +0 -0
  148. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope/interfaces/index.d.ts +0 -0
  149. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/core_envelope.d.ts +0 -0
  150. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/index.d.ts +0 -0
  151. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/Activity.d.ts +0 -0
  152. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/ActivityApiOptions.d.ts +0 -0
  153. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/ActivityDetail.d.ts +0 -0
  154. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/ActivityStartApiOptions.d.ts +0 -0
  155. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/ActivityStartOptions.d.ts +0 -0
  156. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/ActivityStopOptions.d.ts +0 -0
  157. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/ApiOptions.d.ts +0 -0
  158. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/BucketHistogram.d.ts +0 -0
  159. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/BucketMetric.d.ts +0 -0
  160. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/BufferedLog.d.ts +0 -0
  161. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/Co11y.d.ts +0 -0
  162. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/Communicator.d.ts +0 -0
  163. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/DomEventApiOptions.d.ts +0 -0
  164. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/Environment.d.ts +0 -0
  165. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/HeaderProcessorArgs.d.ts +0 -0
  166. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/IdleDetector.d.ts +0 -0
  167. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/IdleDetectorOptions.d.ts +0 -0
  168. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/IdleDetectorReport.d.ts +0 -0
  169. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/InstrumentationContext.d.ts +0 -0
  170. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/InstrumentedAppMethods.d.ts +0 -0
  171. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/InstrumentedAppOptions.d.ts +0 -0
  172. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/LogCollector.d.ts +0 -0
  173. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/LogCollectorOptions.d.ts +0 -0
  174. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/LogMeta.d.ts +0 -0
  175. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/Metric.d.ts +0 -0
  176. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/MetricsCollector.d.ts +0 -0
  177. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/MetricsExtractorMethods.d.ts +0 -0
  178. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/MetricsReporter.d.ts +0 -0
  179. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/NetworkInstrumentationOptions.d.ts +0 -0
  180. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/Nextgen.d.ts +0 -0
  181. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/PayloadProvider.d.ts +0 -0
  182. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/PayloadProviderArgs.d.ts +0 -0
  183. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/RootActivity.d.ts +0 -0
  184. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/Schema.d.ts +0 -0
  185. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/SchemaTokens.d.ts +0 -0
  186. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/SchematizedPayload.d.ts +0 -0
  187. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/TenantClass.d.ts +0 -0
  188. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/TracingHeadersOptions.d.ts +0 -0
  189. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/UpCounter.d.ts +0 -0
  190. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/ValueRecorder.d.ts +0 -0
  191. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/index.d.ts +0 -0
  192. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces/pbjs.d.ts +0 -0
  193. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/ActivityData.d.ts +0 -0
  194. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/BucketHistogram.d.ts +0 -0
  195. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/ErrorData.d.ts +0 -0
  196. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/EventData.d.ts +0 -0
  197. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/InstrumentedEventData.d.ts +0 -0
  198. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/MetricTag.d.ts +0 -0
  199. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/MouseEventData.d.ts +0 -0
  200. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/SenderLogMessage.d.ts +0 -0
  201. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/SenderMetricsMessage.d.ts +0 -0
  202. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/UpCounter.d.ts +0 -0
  203. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/ValueRecorder.d.ts +0 -0
  204. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/WebVitalsData.d.ts +0 -0
  205. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/interfaces-private/index.d.ts +0 -0
  206. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/ActivityImpl.d.ts +0 -0
  207. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/ActivityNoOp.d.ts +0 -0
  208. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/AppInstrumentationImpl.d.ts +0 -0
  209. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/AutomaticClickTracker.d.ts +0 -0
  210. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/BucketHistogramImpl.d.ts +0 -0
  211. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/DomEventHelpers.d.ts +0 -0
  212. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/FuzzyMapper.d.ts +0 -0
  213. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/IdleDetectorImpl.d.ts +0 -0
  214. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/MetricsImpl.d.ts +0 -0
  215. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/MetricsStore.d.ts +0 -0
  216. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/MockObj.d.ts +0 -0
  217. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/NextgenImpl.d.ts +0 -0
  218. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/PerformanceObservability.d.ts +0 -0
  219. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/ReceiverConnector.d.ts +0 -0
  220. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/RootActivityHistoryImpl.d.ts +0 -0
  221. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/RootActivityImpl.d.ts +0 -0
  222. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/RootActivityNoOp.d.ts +0 -0
  223. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/SenderConnector.d.ts +0 -0
  224. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/SizeLimitedMap.d.ts +0 -0
  225. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/TaskerImpl.d.ts +0 -0
  226. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/TimerOverride.d.ts +0 -0
  227. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/Tracing.d.ts +0 -0
  228. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/ValueRecorderImpl.d.ts +0 -0
  229. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/library/tenantClassChannel.d.ts +0 -0
  230. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/monitors/ClickMonitor.d.ts +0 -0
  231. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/monitors/HistoryMonitor.d.ts +0 -0
  232. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/monitors/PageContext.d.ts +0 -0
  233. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/monitors/RootActivityManager.d.ts +0 -0
  234. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/monitors/types.d.ts +0 -0
  235. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/monitors.d.ts +0 -0
  236. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/queue/drain.d.ts +0 -0
  237. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/queue/overwrite.d.ts +0 -0
  238. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/queue/ringBuffer.d.ts +0 -0
  239. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/queue.d.ts +0 -0
  240. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/sender_collector/SenderCollector.d.ts +0 -0
  241. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared/Co11yImpl.d.ts +0 -0
  242. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared/LazyMapToList.d.ts +0 -0
  243. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared/LogValidator.d.ts +0 -0
  244. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared/MetricsUtility.d.ts +0 -0
  245. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared/PayloadUtility.d.ts +0 -0
  246. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared/PublicSafety.d.ts +0 -0
  247. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared/SchemaUtil.d.ts +0 -0
  248. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared/TypeDefinitions.d.ts +0 -0
  249. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared/UpCounterImpl.d.ts +0 -0
  250. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared/Utility.d.ts +0 -0
  251. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared/index.d.ts +0 -0
  252. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/shared.d.ts +0 -0
  253. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/simple_collector/SimpleCollector.d.ts +0 -0
  254. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/simple_collector/index.d.ts +0 -0
  255. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/simple_collector/interfaces/SimpleCollectorOptions.d.ts +0 -0
  256. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/simple_collector.d.ts +0 -0
  257. /package/dist/modules/o11y/{telemetry-uploader/telemetry-uploader → telemetry_uploader/telemetry_uploader}/TelemetryUploader.d.ts +0 -0
  258. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/tenant_class_channel.d.ts +0 -0
  259. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/test/MockMouseEvent.d.ts +0 -0
  260. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/test/MockUiEvent.d.ts +0 -0
  261. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/test/TestEnvironment.d.ts +0 -0
  262. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/types/RootActivityHistoryEntry.d.ts +0 -0
  263. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/types/TypeDefinitions-Private.d.ts +0 -0
  264. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/version.d.ts +0 -0
  265. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/web_vitals/WebVitals.d.ts +0 -0
  266. /package/dist/modules/o11y/{telemetry-uploader → telemetry_uploader}/web_vitals.d.ts +0 -0
  267. /package/dist/modules/o11y/tenant_class_channel/{telemetry-uploader → telemetry_uploader}/TelemetryUploader.d.ts +0 -0
  268. /package/dist/modules/o11y/web_vitals/{telemetry-uploader → telemetry_uploader}/TelemetryUploader.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"monitors.js","sources":["../../../../src/monitors/PageContext.ts","../../../../src/monitors/types.ts","../../../../src/monitors/RootActivityManager.ts","../../../../src/monitors/HistoryMonitor.ts","../../../../src/monitors/ClickMonitor.ts"],"sourcesContent":["import { appPayloadSchema, pagePayloadSchema, pageviewSchema } from 'o11y_schema/sf_lex';\nimport type { NavigationType } from './types';\n\nconst DEFAULT_APP_TYPE = 'SPA';\nconst DEFAULT_CONTEXT = 'standard';\nconst DEFAULT_PANEL = 'main';\nconst DEFAULT_ENTITY_TYPE = 'page';\n\ntype SchematizedPayload<TSchema> = {\n schema: TSchema;\n payload: Record<string, unknown>;\n};\n\nexport class PageContext {\n private _pageSequence = 1;\n private _currentUrl: string;\n private _currentPathname: string;\n private _previousUrl: string | null = null;\n private _previousPathname: string | null = null;\n private _navigationType: NavigationType = 'initial';\n\n constructor(\n private readonly _appName: string,\n private readonly _appNamespace: string = '',\n private readonly _appType: string = DEFAULT_APP_TYPE\n ) {\n this._currentUrl = window.location.href;\n this._currentPathname = window.location.pathname;\n }\n\n syncWithCurrentLocation(navigationType: NavigationType = 'initial'): void {\n this._currentUrl = window.location.href;\n this._currentPathname = window.location.pathname;\n this._navigationType = navigationType;\n this._previousUrl = null;\n this._previousPathname = null;\n this._pageSequence = 1;\n }\n\n captureNavigation(navigationType: NavigationType): void {\n this._previousUrl = this._currentUrl;\n this._previousPathname = this._currentPathname;\n this._currentUrl = window.location.href;\n this._currentPathname = window.location.pathname;\n this._navigationType = navigationType;\n this._pageSequence += 1;\n }\n\n getPageSequence(): number {\n return this._pageSequence;\n }\n\n getCurrentUrl(): string {\n return this._currentUrl;\n }\n\n getCurrentPathname(): string {\n return this._currentPathname;\n }\n\n getNavigationType(): NavigationType {\n return this._navigationType;\n }\n\n getPreviousUrl(): string | null {\n return this._previousUrl;\n }\n\n buildPagePayload(): SchematizedPayload<typeof pagePayloadSchema> {\n return {\n schema: pagePayloadSchema,\n payload: {\n pageSequence: this._pageSequence,\n url: this._currentUrl,\n apiName: this._currentPathname,\n context: DEFAULT_CONTEXT,\n panel: DEFAULT_PANEL,\n developerName: this._currentPathname.replace(/^\\//, '') || 'home',\n entityType: DEFAULT_ENTITY_TYPE,\n entity: this._currentPathname\n }\n };\n }\n\n buildAppPayload(): SchematizedPayload<typeof appPayloadSchema> {\n return {\n schema: appPayloadSchema,\n payload: {\n appNamespace: this._appNamespace,\n appName: this._appName,\n appType: this._appType,\n jtbdName: '',\n jtbdPhase: '',\n jtbdCount: 0\n }\n };\n }\n\n buildPageviewPayload(): SchematizedPayload<typeof pageviewSchema> {\n const hasPrevious = Boolean(this._previousUrl);\n const payload: Record<string, unknown> = {\n pageSequence: this._pageSequence,\n prevPageUrl: this._previousUrl ?? '',\n prevPageApiName: this._previousPathname ?? '',\n prevPageAppName: hasPrevious ? this._appName : '',\n prevPageAppNamespace: hasPrevious ? this._appNamespace : '',\n prevPageAppType: hasPrevious ? this._appType : '',\n prevPageContext: hasPrevious ? DEFAULT_CONTEXT : '',\n prevPagePanel: hasPrevious ? DEFAULT_PANEL : '',\n prevPageEntity: this._previousPathname ?? '',\n prevPageEntityType: hasPrevious ? DEFAULT_ENTITY_TYPE : '',\n navStyle: this._navigationType\n };\n\n return {\n schema: pageviewSchema,\n payload\n };\n }\n}\n","export type NavigationType = 'push' | 'replace' | 'pop' | 'initial';\n\nexport type Log = (...args: unknown[]) => void;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport const NO_OP_LOG: Log = () => {\n /* noop */\n};\n\nexport interface ActivityTriggerMetadata {\n target?: string;\n xpath?: string;\n scope?: string;\n componentName?: string;\n}\n\nexport type RootActivityCategory = 'page' | 'interaction' | 'other';\n\nexport interface RootActivityOptions {\n category?: RootActivityCategory;\n navigationType?: NavigationType;\n trigger?: ActivityTriggerMetadata;\n}\n","import { scenarioTrackerSchema } from 'o11y_schema/sf_lex';\nimport type { Log, RootActivityOptions } from './types';\nimport { NO_OP_LOG } from './types';\nimport { PageContext } from './PageContext';\nimport type { InstrumentedAppMethods } from '../interfaces/InstrumentedAppMethods';\nimport type { IdleDetector } from '../interfaces/IdleDetector';\nimport type { RootActivity } from '../interfaces/RootActivity';\n\nconst ROOT_ACTIVITY_NAME = 'rootActivity';\n\ninterface ActiveRootActivityMetadata extends RootActivityOptions {\n name: string;\n}\n\ntype RootActivityStopReason = 'idle' | 'manual';\n\nexport class RootActivityManager {\n private _currentRootActivity: RootActivity | null = null;\n private _currentRootMetadata: ActiveRootActivityMetadata | null = null;\n private _idleCallbackRegistered = false;\n private _scenarioSequence = 1;\n private _firstRootActivity = true;\n\n constructor(\n private readonly _instrApp: InstrumentedAppMethods,\n private readonly _idleDetector: IdleDetector,\n private readonly _pageContext: PageContext,\n private readonly _log: Log = NO_OP_LOG\n ) {}\n\n startRootActivity(options: RootActivityOptions = {}): RootActivity {\n if (this._currentRootActivity) {\n this._finishCurrentRootActivity('manual');\n }\n\n const rootActivity = this._instrApp.startRootActivity(\n ROOT_ACTIVITY_NAME,\n undefined,\n undefined,\n {\n perfStartOverride: this._firstRootActivity ? 0 : undefined\n }\n );\n\n this._firstRootActivity = false;\n this._currentRootActivity = rootActivity;\n this._currentRootMetadata = {\n name: ROOT_ACTIVITY_NAME,\n category: options.category ?? 'other',\n navigationType: options.navigationType ?? this._pageContext.getNavigationType(),\n trigger: options.trigger\n };\n\n this._registerIdleCallback();\n return rootActivity;\n }\n\n stopRootActivity(): void {\n this._finishCurrentRootActivity('manual');\n }\n\n restartRootActivity(options: RootActivityOptions = {}): RootActivity {\n this.stopRootActivity();\n return this.startRootActivity(options);\n }\n\n hasActiveRootActivity(): boolean {\n return this._currentRootActivity !== null;\n }\n\n getCurrentRootActivity(): RootActivity | null {\n return this._currentRootActivity;\n }\n\n private _onIdleDetected(): void {\n if (this._currentRootActivity) {\n this._log('[o11y Monitor] Idle detected, finalizing rootActivity');\n this._finishCurrentRootActivity('idle');\n }\n }\n\n private _registerIdleCallback(): void {\n if (this._idleCallbackRegistered) {\n return;\n }\n\n this._idleCallbackRegistered = true;\n this._idleDetector.requestIdleDetectedCallback(() => {\n this._idleCallbackRegistered = false;\n this._onIdleDetected();\n });\n }\n\n private _finishCurrentRootActivity(reason: RootActivityStopReason): void {\n if (!this._currentRootActivity) {\n return;\n }\n\n const activity = this._currentRootActivity;\n const metadata = this._currentRootMetadata;\n\n try {\n if (reason === 'idle') {\n this._emitPageviewIfNeeded(metadata);\n }\n const scenarioPayload = this._buildScenarioTrackerPayload(metadata);\n activity.stop(scenarioTrackerSchema, scenarioPayload);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[o11y Monitor] Failed to stop rootActivity', error);\n } finally {\n this._currentRootActivity = null;\n this._currentRootMetadata = null;\n this._idleCallbackRegistered = false;\n }\n }\n\n private _emitPageviewIfNeeded(metadata: ActiveRootActivityMetadata | null): void {\n if (!metadata || metadata.category !== 'page') {\n return;\n }\n\n const { schema, payload } = this._pageContext.buildPageviewPayload();\n this._instrApp.log(schema, payload);\n }\n\n private _buildScenarioTrackerPayload(\n metadata: ActiveRootActivityMetadata | null\n ): Record<string, unknown> {\n return {\n stSequence: this._scenarioSequence++,\n pageUrl: this._pageContext.getCurrentUrl(),\n pageLocation: this._pageContext.getCurrentPathname(),\n pageEntityType: 'page',\n target: metadata?.trigger?.target ?? metadata?.name ?? '',\n xpath: metadata?.trigger?.xpath ?? '',\n scope:\n metadata?.trigger?.scope ??\n metadata?.trigger?.componentName ??\n metadata?.name ??\n '',\n isInAiltn: false,\n isInO11y: true,\n startHeap: 0,\n endHeap: 0,\n uiThreadDelay: 0,\n hasEptDeviation: false,\n eptDeviationReason: ''\n };\n }\n}\n","import type { RootActivityManager } from './RootActivityManager';\nimport type { Log, NavigationType } from './types';\nimport { NO_OP_LOG } from './types';\nimport type { PageContext } from './PageContext';\n\nfunction normalizeUrlForCompare(url: string): string {\n try {\n const u = new URL(url);\n const pathname =\n u.pathname.length > 1 && u.pathname.endsWith('/')\n ? u.pathname.slice(0, -1)\n : u.pathname;\n const search = u.search === '?' ? '' : u.search;\n return `${u.origin}${pathname}${search}${u.hash}`;\n } catch {\n return url;\n }\n}\n\nexport class HistoryMonitor {\n private _originalPushState: typeof history.pushState;\n private _originalReplaceState: typeof history.replaceState;\n private _wrappedPushState?: typeof history.pushState;\n private _wrappedReplaceState?: typeof history.replaceState;\n private _isActive = false;\n\n constructor(\n private readonly _pageContext: PageContext,\n private readonly _rootActivityManager: RootActivityManager,\n private readonly _log: Log = NO_OP_LOG\n ) {\n this._originalPushState = history.pushState;\n this._originalReplaceState = history.replaceState;\n }\n\n activate(): void {\n if (this._isActive) {\n this._log('[o11y Monitor] History monitoring already active');\n return;\n }\n\n this._isActive = true;\n\n this._originalPushState = history.pushState;\n this._originalReplaceState = history.replaceState;\n\n const pushOriginal = this._originalPushState;\n const replaceOriginal = this._originalReplaceState;\n const onChange = this._onHistoryChange.bind(this);\n\n this._wrappedPushState = function (...args) {\n const result = pushOriginal.apply(this, args);\n onChange('push');\n return result;\n };\n history.pushState = this._wrappedPushState;\n\n this._wrappedReplaceState = function (...args) {\n const result = replaceOriginal.apply(this, args);\n onChange('replace');\n return result;\n };\n history.replaceState = this._wrappedReplaceState;\n\n window.addEventListener('popstate', this._handlePopState);\n\n this._log('[o11y Monitor] History monitoring activated');\n }\n\n deactivate(): void {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n\n if (history.pushState === this._wrappedPushState && this._originalPushState) {\n history.pushState = this._originalPushState;\n }\n if (history.replaceState === this._wrappedReplaceState && this._originalReplaceState) {\n history.replaceState = this._originalReplaceState;\n }\n\n window.removeEventListener('popstate', this._handlePopState);\n\n this._log('[o11y Monitor] History monitoring deactivated');\n }\n\n private _handlePopState = (): void => {\n this._onHistoryChange('pop');\n };\n\n private _onHistoryChange(navigationType: NavigationType): void {\n const previousUrl = this._pageContext.getCurrentUrl();\n const newUrl = window.location.href;\n\n if (normalizeUrlForCompare(previousUrl) === normalizeUrlForCompare(newUrl)) {\n return;\n }\n\n this._pageContext.captureNavigation(navigationType);\n\n this._rootActivityManager.restartRootActivity({\n category: 'page',\n navigationType\n });\n\n this._log(`[o11y Monitor] Route changed (${navigationType}): ${window.location.pathname}`);\n }\n\n logInitialPageview(): void {\n this._pageContext.syncWithCurrentLocation('initial');\n this._log('[o11y Monitor] Page context initialized for initial load');\n }\n}\n","import type { ActivityTriggerMetadata } from './types';\nimport type { Log } from './types';\nimport { NO_OP_LOG } from './types';\nimport type { RootActivityManager } from './RootActivityManager';\n\nexport class ClickMonitor {\n private _isActive = false;\n\n constructor(\n private readonly _rootActivityManager: RootActivityManager,\n private readonly _log: Log = NO_OP_LOG\n ) {}\n\n activate(): void {\n if (this._isActive) {\n this._log('[o11y Monitor] Click monitoring already active');\n return;\n }\n\n this._isActive = true;\n document.addEventListener('click', this._handleClick, true);\n this._log('[o11y Monitor] Click monitoring activated');\n }\n\n deactivate(): void {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n document.removeEventListener('click', this._handleClick, true);\n this._log('[o11y Monitor] Click monitoring deactivated');\n }\n\n private _handleClick = (event: MouseEvent): void => {\n const target = event.target;\n if (!(target instanceof HTMLElement)) {\n return;\n }\n\n if (this._rootActivityManager.hasActiveRootActivity()) {\n return;\n }\n\n if (this._isInteractableElement(target)) {\n const elementDesc = this._getElementDescription(target);\n const trigger: ActivityTriggerMetadata = {\n target: elementDesc,\n xpath: this._getXPath(target),\n scope: this._getComponentScope(target),\n componentName: this._getComponentName(target)\n };\n this._rootActivityManager.startRootActivity({\n category: 'interaction',\n trigger\n });\n this._log(`[o11y Monitor] Started rootActivity for click on: ${elementDesc}`);\n }\n };\n\n private _isInteractableElement(element: HTMLElement): boolean {\n if (!element) {\n return false;\n }\n\n const tagName = element.tagName.toLowerCase();\n const interactableTags = ['button', 'a', 'input', 'select', 'textarea', 'label'];\n\n if (interactableTags.includes(tagName)) {\n return true;\n }\n\n if (element.onclick || element.getAttribute('onclick')) {\n return true;\n }\n\n const role = element.getAttribute('role');\n if (role && ['button', 'link', 'menuitem', 'tab'].includes(role)) {\n return true;\n }\n\n if (\n element.hasAttribute('data-testid') ||\n element.hasAttribute('data-cy') ||\n element.hasAttribute('data-test')\n ) {\n return true;\n }\n\n let parent = element.parentElement;\n let depth = 0;\n while (parent && depth < 3) {\n if (interactableTags.includes(parent.tagName.toLowerCase())) {\n return true;\n }\n parent = parent.parentElement;\n depth++;\n }\n\n return false;\n }\n\n private _getElementDescription(element: HTMLElement): string {\n const tagName = element.tagName.toLowerCase();\n const id = element.id ? `#${element.id}` : '';\n const classStr =\n typeof element.className === 'string'\n ? element.className\n : element.getAttribute('class') ?? '';\n const className = classStr ? `.${classStr.split(' ').join('.')}` : '';\n const text = element.textContent?.trim().substring(0, 20) || '';\n\n return `${tagName}${id}${className}${text ? ` \"${text}\"` : ''}`;\n }\n\n private _getXPath(element: HTMLElement): string {\n if (element.id) {\n return `//*[@id=\"${element.id}\"]`;\n }\n\n const MAX_DEPTH = 10;\n const segments: string[] = [];\n let current: HTMLElement | null = element;\n let depth = 0;\n while (current && current.nodeType === Node.ELEMENT_NODE && depth < MAX_DEPTH) {\n const tag = current.tagName.toLowerCase();\n let index = 1;\n let sibling = current.previousElementSibling;\n while (sibling) {\n if (sibling.tagName === current.tagName) {\n index++;\n }\n sibling = sibling.previousElementSibling;\n }\n segments.unshift(`${tag}[${index}]`);\n current = current.parentElement;\n depth++;\n }\n\n const truncated = current !== null;\n return `${truncated ? '...' : ''}/${segments.join('/')}`;\n }\n\n private _getComponentScope(element: HTMLElement): string | undefined {\n const scopeElement =\n element.closest('[data-component], [data-testid], [data-test], [data-cy]') ||\n element.closest('[data-react-component], [data-component-name]');\n if (!scopeElement) {\n return undefined;\n }\n\n return (\n scopeElement.getAttribute('data-component') ||\n scopeElement.getAttribute('data-component-name') ||\n scopeElement.getAttribute('data-react-component') ||\n scopeElement.getAttribute('data-testid') ||\n scopeElement.getAttribute('data-test') ||\n scopeElement.getAttribute('data-cy') ||\n scopeElement.tagName.toLowerCase()\n );\n }\n\n private _getComponentName(element: HTMLElement): string | undefined {\n return (\n element.getAttribute('data-component') ||\n element.getAttribute('data-component-name') ||\n element.getAttribute('data-react-component') ||\n element.getAttribute('data-testid') ||\n element.getAttribute('data-test') ||\n element.getAttribute('data-cy') ||\n element.getAttribute('aria-label') ||\n element.tagName.toLowerCase()\n );\n }\n}\n"],"names":[],"mappings":";;AAGA,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,eAAe,GAAG,UAAU,CAAC;AACnC,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,mBAAmB,GAAG,MAAM,CAAC;MAOtB,WAAW,CAAA;AAQpB,IAAA,WAAA,CACqB,QAAgB,EAChB,aAAA,GAAwB,EAAE,EAC1B,WAAmB,gBAAgB,EAAA;QAFnC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAQ;QAChB,IAAa,CAAA,aAAA,GAAb,aAAa,CAAa;QAC1B,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA2B;QAVhD,IAAa,CAAA,aAAA,GAAG,CAAC,CAAC;QAGlB,IAAY,CAAA,YAAA,GAAkB,IAAI,CAAC;QACnC,IAAiB,CAAA,iBAAA,GAAkB,IAAI,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YAAY,CAAC,YAAY,CAAC,gBAAgB,CAAC;AAC3C,YAAA,YAAY,CAAC,YAAY,CAAC,qBAAqB,CAAC;AAChD,YAAA,YAAY,CAAC,YAAY,CAAC,sBAAsB,CAAC;AACjD,YAAA,YAAY,CAAC,YAAY,CAAC,aAAa,CAAC;AACxC,YAAA,YAAY,CAAC,YAAY,CAAC,WAAW,CAAC;AACtC,YAAA,YAAY,CAAC,YAAY,CAAC,SAAS,CAAC;AACpC,YAAA,YAAY,CAAC,OAAO,CAAC,WAAW,EAAE,EACpC;KACL;AAEO,IAAA,iBAAiB,CAAC,OAAoB,EAAA;AAC1C,QAAA,QACI,OAAO,CAAC,YAAY,CAAC,gBAAgB,CAAC;AACtC,YAAA,OAAO,CAAC,YAAY,CAAC,qBAAqB,CAAC;AAC3C,YAAA,OAAO,CAAC,YAAY,CAAC,sBAAsB,CAAC;AAC5C,YAAA,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC;AACnC,YAAA,OAAO,CAAC,YAAY,CAAC,WAAW,CAAC;AACjC,YAAA,OAAO,CAAC,YAAY,CAAC,SAAS,CAAC;AAC/B,YAAA,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC;AAClC,YAAA,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,EAC/B;KACL;AACJ;;;;"}
1
+ {"version":3,"file":"monitors.js","sources":["../../../../src/monitors/PageContext.ts","../../../../src/monitors/types.ts","../../../../src/monitors/RootActivityManager.ts","../../../../src/monitors/HistoryMonitor.ts","../../../../src/monitors/ClickMonitor.ts","../../../../src/monitors/ErrorMonitor.ts"],"sourcesContent":["import { appPayloadSchema, pagePayloadSchema, pageviewSchema } from 'o11y_schema/sf_lex';\nimport type { NavigationType } from './types';\n\nconst DEFAULT_APP_TYPE = 'SPA';\nconst DEFAULT_CONTEXT = 'standard';\nconst DEFAULT_PANEL = 'main';\nconst DEFAULT_ENTITY_TYPE = 'page';\n\ntype SchematizedPayload<TSchema> = {\n schema: TSchema;\n payload: Record<string, unknown>;\n};\n\nexport class PageContext {\n private _pageSequence = 1;\n private _currentUrl: string;\n private _currentPathname: string;\n private _previousUrl: string | null = null;\n private _previousPathname: string | null = null;\n private _navigationType: NavigationType = 'initial';\n\n constructor(\n private readonly _appName: string,\n private readonly _appNamespace: string = '',\n private readonly _appType: string = DEFAULT_APP_TYPE\n ) {\n this._currentUrl = window.location.href;\n this._currentPathname = window.location.pathname;\n }\n\n syncWithCurrentLocation(navigationType: NavigationType = 'initial'): void {\n this._currentUrl = window.location.href;\n this._currentPathname = window.location.pathname;\n this._navigationType = navigationType;\n this._previousUrl = null;\n this._previousPathname = null;\n this._pageSequence = 1;\n }\n\n captureNavigation(navigationType: NavigationType): void {\n this._previousUrl = this._currentUrl;\n this._previousPathname = this._currentPathname;\n this._currentUrl = window.location.href;\n this._currentPathname = window.location.pathname;\n this._navigationType = navigationType;\n this._pageSequence += 1;\n }\n\n getPageSequence(): number {\n return this._pageSequence;\n }\n\n getCurrentUrl(): string {\n return this._currentUrl;\n }\n\n getCurrentPathname(): string {\n return this._currentPathname;\n }\n\n getNavigationType(): NavigationType {\n return this._navigationType;\n }\n\n getPreviousUrl(): string | null {\n return this._previousUrl;\n }\n\n buildPagePayload(): SchematizedPayload<typeof pagePayloadSchema> {\n return {\n schema: pagePayloadSchema,\n payload: {\n pageSequence: this._pageSequence,\n url: this._currentUrl,\n apiName: this._currentPathname,\n context: DEFAULT_CONTEXT,\n panel: DEFAULT_PANEL,\n developerName: this._currentPathname.replace(/^\\//, '') || 'home',\n entityType: DEFAULT_ENTITY_TYPE,\n entity: this._currentPathname\n }\n };\n }\n\n buildAppPayload(): SchematizedPayload<typeof appPayloadSchema> {\n return {\n schema: appPayloadSchema,\n payload: {\n appNamespace: this._appNamespace,\n appName: this._appName,\n appType: this._appType,\n jtbdName: '',\n jtbdPhase: '',\n jtbdCount: 0\n }\n };\n }\n\n buildPageviewPayload(): SchematizedPayload<typeof pageviewSchema> {\n const hasPrevious = Boolean(this._previousUrl);\n const payload: Record<string, unknown> = {\n pageSequence: this._pageSequence,\n prevPageUrl: this._previousUrl ?? '',\n prevPageApiName: this._previousPathname ?? '',\n prevPageAppName: hasPrevious ? this._appName : '',\n prevPageAppNamespace: hasPrevious ? this._appNamespace : '',\n prevPageAppType: hasPrevious ? this._appType : '',\n prevPageContext: hasPrevious ? DEFAULT_CONTEXT : '',\n prevPagePanel: hasPrevious ? DEFAULT_PANEL : '',\n prevPageEntity: this._previousPathname ?? '',\n prevPageEntityType: hasPrevious ? DEFAULT_ENTITY_TYPE : '',\n navStyle: this._navigationType\n };\n\n return {\n schema: pageviewSchema,\n payload\n };\n }\n}\n","export type NavigationType = 'push' | 'replace' | 'pop' | 'initial';\n\nexport type Log = (...args: unknown[]) => void;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport const NO_OP_LOG: Log = () => {\n /* noop */\n};\n\nexport interface ActivityTriggerMetadata {\n target?: string;\n xpath?: string;\n scope?: string;\n componentName?: string;\n}\n\nexport type RootActivityCategory = 'page' | 'interaction' | 'other';\n\nexport interface RootActivityOptions {\n category?: RootActivityCategory;\n navigationType?: NavigationType;\n trigger?: ActivityTriggerMetadata;\n}\n","import { scenarioTrackerSchema } from 'o11y_schema/sf_lex';\nimport type { Log, RootActivityOptions } from './types';\nimport { NO_OP_LOG } from './types';\nimport { PageContext } from './PageContext';\nimport type { InstrumentedAppMethods } from '../interfaces/InstrumentedAppMethods';\nimport type { IdleDetector } from '../interfaces/IdleDetector';\nimport type { RootActivity } from '../interfaces/RootActivity';\n\nconst ROOT_ACTIVITY_NAME = 'rootActivity';\n\ninterface ActiveRootActivityMetadata extends RootActivityOptions {\n name: string;\n}\n\ntype RootActivityStopReason = 'idle' | 'manual';\n\nexport class RootActivityManager {\n private _currentRootActivity: RootActivity | null = null;\n private _currentRootMetadata: ActiveRootActivityMetadata | null = null;\n private _idleCallbackRegistered = false;\n private _scenarioSequence = 1;\n private _firstRootActivity = true;\n\n constructor(\n private readonly _instrApp: InstrumentedAppMethods,\n private readonly _idleDetector: IdleDetector,\n private readonly _pageContext: PageContext,\n private readonly _log: Log = NO_OP_LOG\n ) {}\n\n startRootActivity(options: RootActivityOptions = {}): RootActivity {\n if (this._currentRootActivity) {\n this._finishCurrentRootActivity('manual');\n }\n\n const rootActivity = this._instrApp.startRootActivity(\n ROOT_ACTIVITY_NAME,\n undefined,\n undefined,\n {\n perfStartOverride: this._firstRootActivity ? 0 : undefined\n }\n );\n\n this._firstRootActivity = false;\n this._currentRootActivity = rootActivity;\n this._currentRootMetadata = {\n name: ROOT_ACTIVITY_NAME,\n category: options.category ?? 'other',\n navigationType: options.navigationType ?? this._pageContext.getNavigationType(),\n trigger: options.trigger\n };\n\n this._registerIdleCallback();\n return rootActivity;\n }\n\n stopRootActivity(): void {\n this._finishCurrentRootActivity('manual');\n }\n\n restartRootActivity(options: RootActivityOptions = {}): RootActivity {\n this.stopRootActivity();\n return this.startRootActivity(options);\n }\n\n hasActiveRootActivity(): boolean {\n return this._currentRootActivity !== null;\n }\n\n getCurrentRootActivity(): RootActivity | null {\n return this._currentRootActivity;\n }\n\n private _onIdleDetected(): void {\n if (this._currentRootActivity) {\n this._log('[o11y Monitor] Idle detected, finalizing rootActivity');\n this._finishCurrentRootActivity('idle');\n }\n }\n\n private _registerIdleCallback(): void {\n if (this._idleCallbackRegistered) {\n return;\n }\n\n this._idleCallbackRegistered = true;\n this._idleDetector.requestIdleDetectedCallback(() => {\n this._idleCallbackRegistered = false;\n this._onIdleDetected();\n });\n }\n\n private _finishCurrentRootActivity(reason: RootActivityStopReason): void {\n if (!this._currentRootActivity) {\n return;\n }\n\n const activity = this._currentRootActivity;\n const metadata = this._currentRootMetadata;\n\n try {\n if (reason === 'idle') {\n this._emitPageviewIfNeeded(metadata);\n }\n const scenarioPayload = this._buildScenarioTrackerPayload(metadata);\n activity.stop(scenarioTrackerSchema, scenarioPayload);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('[o11y Monitor] Failed to stop rootActivity', error);\n } finally {\n this._currentRootActivity = null;\n this._currentRootMetadata = null;\n this._idleCallbackRegistered = false;\n }\n }\n\n private _emitPageviewIfNeeded(metadata: ActiveRootActivityMetadata | null): void {\n if (!metadata || metadata.category !== 'page') {\n return;\n }\n\n const { schema, payload } = this._pageContext.buildPageviewPayload();\n this._instrApp.log(schema, payload);\n }\n\n private _buildScenarioTrackerPayload(\n metadata: ActiveRootActivityMetadata | null\n ): Record<string, unknown> {\n return {\n stSequence: this._scenarioSequence++,\n pageUrl: this._pageContext.getCurrentUrl(),\n pageLocation: this._pageContext.getCurrentPathname(),\n pageEntityType: 'page',\n target: metadata?.trigger?.target ?? metadata?.name ?? '',\n xpath: metadata?.trigger?.xpath ?? '',\n scope:\n metadata?.trigger?.scope ??\n metadata?.trigger?.componentName ??\n metadata?.name ??\n '',\n isInAiltn: false,\n isInO11y: true,\n startHeap: 0,\n endHeap: 0,\n uiThreadDelay: 0,\n hasEptDeviation: false,\n eptDeviationReason: ''\n };\n }\n}\n","import type { RootActivityManager } from './RootActivityManager';\nimport type { Log, NavigationType } from './types';\nimport { NO_OP_LOG } from './types';\nimport type { PageContext } from './PageContext';\n\nfunction normalizeUrlForCompare(url: string): string {\n try {\n const u = new URL(url);\n const pathname =\n u.pathname.length > 1 && u.pathname.endsWith('/')\n ? u.pathname.slice(0, -1)\n : u.pathname;\n const search = u.search === '?' ? '' : u.search;\n return `${u.origin}${pathname}${search}${u.hash}`;\n } catch {\n return url;\n }\n}\n\nexport class HistoryMonitor {\n private _originalPushState: typeof history.pushState;\n private _originalReplaceState: typeof history.replaceState;\n private _wrappedPushState?: typeof history.pushState;\n private _wrappedReplaceState?: typeof history.replaceState;\n private _isActive = false;\n\n constructor(\n private readonly _pageContext: PageContext,\n private readonly _rootActivityManager: RootActivityManager,\n private readonly _log: Log = NO_OP_LOG\n ) {\n this._originalPushState = history.pushState;\n this._originalReplaceState = history.replaceState;\n }\n\n activate(): void {\n if (this._isActive) {\n this._log('[o11y Monitor] History monitoring already active');\n return;\n }\n\n this._isActive = true;\n\n this._originalPushState = history.pushState;\n this._originalReplaceState = history.replaceState;\n\n const pushOriginal = this._originalPushState;\n const replaceOriginal = this._originalReplaceState;\n const onChange = this._onHistoryChange.bind(this);\n\n this._wrappedPushState = function (...args) {\n const result = pushOriginal.apply(this, args);\n onChange('push');\n return result;\n };\n history.pushState = this._wrappedPushState;\n\n this._wrappedReplaceState = function (...args) {\n const result = replaceOriginal.apply(this, args);\n onChange('replace');\n return result;\n };\n history.replaceState = this._wrappedReplaceState;\n\n window.addEventListener('popstate', this._handlePopState);\n\n this._log('[o11y Monitor] History monitoring activated');\n }\n\n deactivate(): void {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n\n if (history.pushState === this._wrappedPushState && this._originalPushState) {\n history.pushState = this._originalPushState;\n }\n if (history.replaceState === this._wrappedReplaceState && this._originalReplaceState) {\n history.replaceState = this._originalReplaceState;\n }\n\n window.removeEventListener('popstate', this._handlePopState);\n\n this._log('[o11y Monitor] History monitoring deactivated');\n }\n\n private _handlePopState = (): void => {\n this._onHistoryChange('pop');\n };\n\n private _onHistoryChange(navigationType: NavigationType): void {\n const previousUrl = this._pageContext.getCurrentUrl();\n const newUrl = window.location.href;\n\n if (normalizeUrlForCompare(previousUrl) === normalizeUrlForCompare(newUrl)) {\n return;\n }\n\n this._pageContext.captureNavigation(navigationType);\n\n this._rootActivityManager.restartRootActivity({\n category: 'page',\n navigationType\n });\n\n this._log(`[o11y Monitor] Route changed (${navigationType}): ${window.location.pathname}`);\n }\n\n logInitialPageview(): void {\n this._pageContext.syncWithCurrentLocation('initial');\n this._log('[o11y Monitor] Page context initialized for initial load');\n }\n}\n","import type { ActivityTriggerMetadata } from './types';\nimport type { Log } from './types';\nimport { NO_OP_LOG } from './types';\nimport type { RootActivityManager } from './RootActivityManager';\n\nexport class ClickMonitor {\n private _isActive = false;\n\n constructor(\n private readonly _rootActivityManager: RootActivityManager,\n private readonly _log: Log = NO_OP_LOG\n ) {}\n\n activate(): void {\n if (this._isActive) {\n this._log('[o11y Monitor] Click monitoring already active');\n return;\n }\n\n this._isActive = true;\n document.addEventListener('click', this._handleClick, true);\n this._log('[o11y Monitor] Click monitoring activated');\n }\n\n deactivate(): void {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n document.removeEventListener('click', this._handleClick, true);\n this._log('[o11y Monitor] Click monitoring deactivated');\n }\n\n private _handleClick = (event: MouseEvent): void => {\n const target = event.target;\n if (!(target instanceof HTMLElement)) {\n return;\n }\n\n if (this._rootActivityManager.hasActiveRootActivity()) {\n return;\n }\n\n if (this._isInteractableElement(target)) {\n const elementDesc = this._getElementDescription(target);\n const trigger: ActivityTriggerMetadata = {\n target: elementDesc,\n xpath: this._getXPath(target),\n scope: this._getComponentScope(target),\n componentName: this._getComponentName(target)\n };\n this._rootActivityManager.startRootActivity({\n category: 'interaction',\n trigger\n });\n this._log(`[o11y Monitor] Started rootActivity for click on: ${elementDesc}`);\n }\n };\n\n private _isInteractableElement(element: HTMLElement): boolean {\n if (!element) {\n return false;\n }\n\n const tagName = element.tagName.toLowerCase();\n const interactableTags = ['button', 'a', 'input', 'select', 'textarea', 'label'];\n\n if (interactableTags.includes(tagName)) {\n return true;\n }\n\n if (element.onclick || element.getAttribute('onclick')) {\n return true;\n }\n\n const role = element.getAttribute('role');\n if (role && ['button', 'link', 'menuitem', 'tab'].includes(role)) {\n return true;\n }\n\n if (\n element.hasAttribute('data-testid') ||\n element.hasAttribute('data-cy') ||\n element.hasAttribute('data-test')\n ) {\n return true;\n }\n\n let parent = element.parentElement;\n let depth = 0;\n while (parent && depth < 3) {\n if (interactableTags.includes(parent.tagName.toLowerCase())) {\n return true;\n }\n parent = parent.parentElement;\n depth++;\n }\n\n return false;\n }\n\n private _getElementDescription(element: HTMLElement): string {\n const tagName = element.tagName.toLowerCase();\n const id = element.id ? `#${element.id}` : '';\n const classStr =\n typeof element.className === 'string'\n ? element.className\n : element.getAttribute('class') ?? '';\n const className = classStr ? `.${classStr.split(' ').join('.')}` : '';\n const text = element.textContent?.trim().substring(0, 20) || '';\n\n return `${tagName}${id}${className}${text ? ` \"${text}\"` : ''}`;\n }\n\n private _getXPath(element: HTMLElement): string {\n if (element.id) {\n return `//*[@id=\"${element.id}\"]`;\n }\n\n const MAX_DEPTH = 10;\n const segments: string[] = [];\n let current: HTMLElement | null = element;\n let depth = 0;\n while (current && current.nodeType === Node.ELEMENT_NODE && depth < MAX_DEPTH) {\n const tag = current.tagName.toLowerCase();\n let index = 1;\n let sibling = current.previousElementSibling;\n while (sibling) {\n if (sibling.tagName === current.tagName) {\n index++;\n }\n sibling = sibling.previousElementSibling;\n }\n segments.unshift(`${tag}[${index}]`);\n current = current.parentElement;\n depth++;\n }\n\n const truncated = current !== null;\n return `${truncated ? '...' : ''}/${segments.join('/')}`;\n }\n\n private _getComponentScope(element: HTMLElement): string | undefined {\n const scopeElement =\n element.closest('[data-component], [data-testid], [data-test], [data-cy]') ||\n element.closest('[data-react-component], [data-component-name]');\n if (!scopeElement) {\n return undefined;\n }\n\n return (\n scopeElement.getAttribute('data-component') ||\n scopeElement.getAttribute('data-component-name') ||\n scopeElement.getAttribute('data-react-component') ||\n scopeElement.getAttribute('data-testid') ||\n scopeElement.getAttribute('data-test') ||\n scopeElement.getAttribute('data-cy') ||\n scopeElement.tagName.toLowerCase()\n );\n }\n\n private _getComponentName(element: HTMLElement): string | undefined {\n return (\n element.getAttribute('data-component') ||\n element.getAttribute('data-component-name') ||\n element.getAttribute('data-react-component') ||\n element.getAttribute('data-testid') ||\n element.getAttribute('data-test') ||\n element.getAttribute('data-cy') ||\n element.getAttribute('aria-label') ||\n element.tagName.toLowerCase()\n );\n }\n}\n","import type { Log } from './types';\nimport { NO_OP_LOG } from './types';\nimport type { InstrumentedAppMethods } from '../interfaces/InstrumentedAppMethods';\n\n/**\n * Stable path of the telemetry upload endpoint\n * (`/services/data/vXX.0/connect/proxy/ui-telemetry`). Errors whose message,\n * stack or resource URL point here are dropped: logging a failed telemetry\n * request would schedule another upload, which could fail again, forming a\n * feedback loop. Mirrors the `skipUrls` guard used for networkInstrumentation.\n */\nconst TELEMETRY_URL_MARKER = '/connect/proxy/ui-telemetry';\n\n/**\n * Cap on the number of distinct runtime errors and unhandled rejections logged\n * per page load. A misbehaving dependency can emit many different errors;\n * without a cap each one becomes an upload. 25 is enough to characterize a\n * broken page without turning the monitor into the problem.\n */\nconst MAX_LOGGED_ERRORS = 25;\n\n/**\n * Separate, smaller cap for resource load failures. Failed images are common\n * and low value; a page with a few dozen of them must not use up the budget\n * that uncaught exceptions and rejections need.\n */\nconst MAX_LOGGED_RESOURCE_ERRORS = 10;\n\n/** Message browsers report for errors thrown by cross-origin scripts. */\nconst CROSS_ORIGIN_SCRIPT_ERROR = 'Script error.';\n\n/** Cap on the stringified form of a non-Error rejection reason. */\nconst MAX_REASON_LENGTH = 200;\n\n/**\n * Captures uncaught JS errors, unhandled promise rejections and failed resource\n * (script/stylesheet/image) loads and forwards them to `instrApp.error()`.\n * Runtime errors and rejections keep their stack traces; resource load failures\n * (which do not bubble, hence the capture-phase listener) are reported as a\n * `ResourceLoadError` naming the tag and the query-stripped URL.\n *\n * Each distinct `name: message` is logged once per page load, so a repeating\n * error (a render loop, a retried request) costs one slot of the cap instead\n * of all of them.\n *\n * Handlers never throw: a failure inside the monitor is reported through `log`\n * and swallowed so the page is never affected.\n */\nexport class ErrorMonitor {\n private _isActive = false;\n private _loggedCount = 0;\n private _loggedResourceCount = 0;\n private readonly _seen = new Set<string>();\n\n constructor(\n private readonly _instrApp: Pick<InstrumentedAppMethods, 'error'>,\n private readonly _log: Log = NO_OP_LOG\n ) {}\n\n activate(): void {\n if (this._isActive) {\n this._log('[o11y Monitor] Error monitoring already active');\n return;\n }\n\n this._isActive = true;\n // Capture phase: resource-load `error` events fire on the element and do\n // not bubble, so a bubble-phase listener never sees them.\n window.addEventListener('error', this._handleError, true);\n window.addEventListener('unhandledrejection', this._handleRejection);\n this._log('[o11y Monitor] Error monitoring activated');\n }\n\n deactivate(): void {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n window.removeEventListener('error', this._handleError, true);\n window.removeEventListener('unhandledrejection', this._handleRejection);\n this._log('[o11y Monitor] Error monitoring deactivated');\n }\n\n private _handleError = (event: ErrorEvent): void => {\n try {\n const target = event.target;\n if (target && target !== window) {\n // Element `error` events are load failures. Only tracked resources\n // are logged; iframe/video/audio/etc. failures are not runtime\n // errors and must not use up the error budget as \"Unknown error\".\n if (this._isResourceElement(target)) {\n const url = this._resourceUrl(target);\n if (this._pointsAtTelemetry(url)) {\n return;\n }\n const resourceError = new Error(`${this._tagName(target)} ${url}`.trim());\n resourceError.name = 'ResourceLoadError';\n this._logResourceError(resourceError);\n }\n return;\n }\n\n // Cross-origin script errors are masked by the browser: no error object,\n // no filename, message \"Script error.\". Nothing actionable to log.\n if (!event.error && !event.filename && event.message === CROSS_ORIGIN_SCRIPT_ERROR) {\n return;\n }\n\n const error =\n event.error instanceof Error\n ? event.error\n : new Error(event.message || 'Unknown error');\n if (this._pointsAtTelemetry(error.stack) || this._pointsAtTelemetry(event.filename)) {\n return;\n }\n this._logError(error);\n } catch (handlerError) {\n this._log('[o11y Monitor] Error handler failed:', handlerError);\n }\n };\n\n private _handleRejection = (event: PromiseRejectionEvent): void => {\n try {\n const reason = event.reason;\n let error: Error;\n if (reason instanceof Error) {\n error = reason;\n } else {\n error = new Error(String(reason).substring(0, MAX_REASON_LENGTH));\n error.name = 'UnhandledRejection';\n }\n if (this._pointsAtTelemetry(error.stack) || this._pointsAtTelemetry(error.message)) {\n return;\n }\n this._logError(error);\n } catch (handlerError) {\n this._log('[o11y Monitor] Rejection handler failed:', handlerError);\n }\n };\n\n private _logError(error: Error): void {\n if (this._loggedCount >= MAX_LOGGED_ERRORS || !this._firstSighting(error)) {\n return;\n }\n this._loggedCount++;\n this._send(error);\n }\n\n private _logResourceError(error: Error): void {\n if (\n this._loggedResourceCount >= MAX_LOGGED_RESOURCE_ERRORS ||\n !this._firstSighting(error)\n ) {\n return;\n }\n this._loggedResourceCount++;\n this._send(error);\n }\n\n /**\n * True the first time a `name: message` pair is seen. Also bounds any\n * feedback loop the URL marker can't catch: a failed upload surfaces as a\n * bare `TypeError: Failed to fetch` with no URL, and repeats of it are\n * dropped here after the first.\n */\n private _firstSighting(error: Error): boolean {\n const key = `${error.name}: ${error.message}`;\n if (this._seen.has(key)) {\n return false;\n }\n this._seen.add(key);\n return true;\n }\n\n private _send(error: Error): void {\n try {\n this._instrApp.error(error);\n this._log(`[o11y Monitor] Logged error: ${error.name}: ${error.message}`);\n } catch (logError) {\n // instrApp.error() throwing (e.g. collector not ready) must not break the page.\n this._log('[o11y Monitor] Failed to log error:', logError);\n }\n }\n\n private _isResourceElement(target: EventTarget): boolean {\n if (!(target instanceof HTMLElement)) {\n return false;\n }\n const tag = target.tagName.toLowerCase();\n if (tag === 'script' || tag === 'img') {\n return true;\n }\n // rel is a case-insensitive, space-separated token list\n // (e.g. \"StyleSheet\", \"alternate stylesheet\").\n return (\n tag === 'link' &&\n (target.getAttribute('rel') || '').toLowerCase().split(/\\s+/).includes('stylesheet')\n );\n }\n\n private _tagName(target: EventTarget): string {\n return target instanceof HTMLElement ? target.tagName.toLowerCase() : 'resource';\n }\n\n /**\n * Resolve the failed resource's URL (src for script/img, href for link) and\n * reduce it to origin + path, dropping the query string and fragment which\n * can carry session tokens. Non-http(s) URLs (data:, blob:) are reduced to\n * their scheme, since their \"path\" is the inline payload itself.\n */\n private _resourceUrl(target: EventTarget): string {\n const raw =\n (target instanceof HTMLScriptElement && target.src) ||\n (target instanceof HTMLImageElement && target.src) ||\n (target instanceof HTMLLinkElement && target.href) ||\n '';\n return this._stripUrl(raw);\n }\n\n private _stripUrl(raw: string): string {\n if (!raw) {\n return '';\n }\n try {\n const url = new URL(raw);\n if (url.protocol !== 'http:' && url.protocol !== 'https:') {\n return url.protocol;\n }\n return `${url.origin}${url.pathname}`;\n } catch {\n // Not a parseable absolute URL; strip query/fragment textually.\n return raw.split('?')[0].split('#')[0].substring(0, MAX_REASON_LENGTH);\n }\n }\n\n private _pointsAtTelemetry(value: string | null | undefined): boolean {\n return typeof value === 'string' && value.includes(TELEMETRY_URL_MARKER);\n }\n}\n"],"names":[],"mappings":";;AAGA,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,eAAe,GAAG,UAAU,CAAC;AACnC,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,mBAAmB,GAAG,MAAM,CAAC;MAOtB,WAAW,CAAA;AAQpB,IAAA,WAAA,CACqB,QAAgB,EAChB,aAAA,GAAwB,EAAE,EAC1B,WAAmB,gBAAgB,EAAA;QAFnC,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAQ;QAChB,IAAa,CAAA,aAAA,GAAb,aAAa,CAAa;QAC1B,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAA2B;QAVhD,IAAa,CAAA,aAAA,GAAG,CAAC,CAAC;QAGlB,IAAY,CAAA,YAAA,GAAkB,IAAI,CAAC;QACnC,IAAiB,CAAA,iBAAA,GAAkB,IAAI,CAAC;QACxC,IAAe,CAAA,eAAA,GAAmB,SAAS,CAAC;QAOhD,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;KACpD;IAED,uBAAuB,CAAC,iBAAiC,SAAS,EAAA;QAC9D,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;QACxC,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC;AACjD,QAAA,IAAI,CAAC,eAAe,GAAG,cAAc,CAAC;AACtC,QAAA,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;AACzB,QAAA,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;AAC9B,QAAA,IAAI,CAAC,aA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,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,EAAE;gBACvD,OAAO,GAAG,CAAC,QAAQ,CAAC;AACvB,aAAA;YACD,OAAO,CAAA,EAAG,GAAG,CAAC,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAA,CAAE,CAAC;AACzC,SAAA;QAAC,OAAM,EAAA,EAAA;YAEJ,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAC1E,SAAA;KACJ;AAEO,IAAA,kBAAkB,CAAC,KAAgC,EAAA;QACvD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC;KAC5E;AACJ;;;;"}
@@ -1,5 +1,5 @@
1
- import type { Log } from '../telemetry-uploader/TelemetryUploader';
2
- import type { Environment } from '../interfaces';
1
+ import type { Log } from '../telemetry_uploader/TelemetryUploader';
2
+ import type { Environment, InstrumentedAppMethods } from '../interfaces';
3
3
  export interface OrchestratorConfig {
4
4
  endpoint: string;
5
5
  environment: Environment;
@@ -10,6 +10,15 @@ export interface OrchestratorConfig {
10
10
  isRootActivityInProgress?: () => boolean;
11
11
  log?: Log;
12
12
  onUploadError?: (error: unknown) => void;
13
+ activateGenericMonitors?: boolean;
14
+ drainAppQueue?: boolean;
15
+ drainFirstPartyQueue?: boolean;
16
+ namespace?: string;
17
+ isProduction?: boolean;
18
+ enableClickTracking?: boolean;
19
+ enableHistoryTracking?: boolean;
20
+ enableErrorTracking?: boolean;
13
21
  }
14
22
  export declare function initialize(config: OrchestratorConfig): void;
15
23
  export declare function isInitialized(): boolean;
24
+ export declare function getInstrumentedApp(): InstrumentedAppMethods | undefined;
@@ -1,3 +1,3 @@
1
- export { initialize, isInitialized } from './orchestrator/initialize';
1
+ export { initialize, isInitialized, getInstrumentedApp } from './orchestrator/initialize';
2
2
  export type { OrchestratorConfig } from './orchestrator/initialize';
3
3
  export type { TenantClass } from './queue/types';
@@ -5,7 +5,7 @@ export interface QueueEventV1 {
5
5
  args: unknown[];
6
6
  }
7
7
  export type QueueEvent = QueueEventV1;
8
- export type QueueVerb = 'log' | 'error' | 'incrementCounter' | 'trackValue' | 'bucketValue';
8
+ export type QueueVerb = 'log' | 'logPdpEvent' | 'error' | 'incrementCounter' | 'trackValue' | 'bucketValue';
9
9
  export type { TenantClass } from '../interfaces/TenantClass';
10
10
  export declare const MAX_NAME_LENGTH = 256;
11
11
  export declare const MAX_ARGS_LENGTH = 10;
@@ -0,0 +1,2 @@
1
+ export { TelemetryUploader } from './telemetry_uploader/TelemetryUploader';
2
+ export type { TelemetryUploaderOptions, UploadResult, Log } from './telemetry_uploader/TelemetryUploader';
@@ -7,6 +7,7 @@ import { DomEventApiOptions } from './DomEventApiOptions';
7
7
  import { Schema } from './Schema';
8
8
  export interface Instrumentation {
9
9
  log(userSchemaOrText: Schema | string, userData?: SchematizedData, options?: ApiOptions): void;
10
+ logPdpEvent(pdpEventData: SchematizedData, options?: ApiOptions): void;
10
11
  error(error: unknown, userSchemaOrText?: Schema | string, userData?: SchematizedData, options?: ApiOptions): void;
11
12
  startActivity(name: string, options?: ActivityStartApiOptions): Activity;
12
13
  domEvent(event: Event, handledBy: HTMLElement | LightningElement, userSchemaOrText?: Schema | string, userData?: SchematizedData, options?: DomEventApiOptions): void;
@@ -25,6 +25,7 @@ export declare class InstrumentationImpl implements Instrumentation, MetricsRepo
25
25
  private _getEffectiveRootId;
26
26
  get internalInstrumentationContext(): InstrumentationContext;
27
27
  log(userSchemaOrText: Schema | string, userData?: SchematizedData, options?: ApiOptions): void;
28
+ logPdpEvent(pdpEventData: SchematizedData, options?: ApiOptions): void;
28
29
  protected _logInternal(loggerName: string, schema: Schema, data: SchematizedData, timestamp: number, rootId?: string): number;
29
30
  error(error: unknown, userSchemaOrText?: Schema | string, userData?: SchematizedData, options?: ApiOptions): void;
30
31
  protected _errorInternal(err: unknown, userSchemaOrText?: Schema | string, userData?: SchematizedData, activityId?: string, rootActivityId?: string): number;
@@ -0,0 +1,24 @@
1
+ import type { Log } from './types';
2
+ import type { InstrumentedAppMethods } from '../interfaces/InstrumentedAppMethods';
3
+ export declare class ErrorMonitor {
4
+ private readonly _instrApp;
5
+ private readonly _log;
6
+ private _isActive;
7
+ private _loggedCount;
8
+ private _loggedResourceCount;
9
+ private readonly _seen;
10
+ constructor(_instrApp: Pick<InstrumentedAppMethods, 'error'>, _log?: Log);
11
+ activate(): void;
12
+ deactivate(): void;
13
+ private _handleError;
14
+ private _handleRejection;
15
+ private _logError;
16
+ private _logResourceError;
17
+ private _firstSighting;
18
+ private _send;
19
+ private _isResourceElement;
20
+ private _tagName;
21
+ private _resourceUrl;
22
+ private _stripUrl;
23
+ private _pointsAtTelemetry;
24
+ }
@@ -2,5 +2,6 @@ export { PageContext } from './PageContext';
2
2
  export { RootActivityManager } from './RootActivityManager';
3
3
  export { HistoryMonitor } from './HistoryMonitor';
4
4
  export { ClickMonitor } from './ClickMonitor';
5
+ export { ErrorMonitor } from './ErrorMonitor';
5
6
  export type { NavigationType, Log, ActivityTriggerMetadata, RootActivityCategory, RootActivityOptions } from './types';
6
7
  export { NO_OP_LOG } from './types';
@@ -1,5 +1,5 @@
1
- import type { Log } from '../telemetry-uploader/TelemetryUploader';
2
- import type { Environment } from '../interfaces';
1
+ import type { Log } from '../telemetry_uploader/TelemetryUploader';
2
+ import type { Environment, InstrumentedAppMethods } from '../interfaces';
3
3
  export interface OrchestratorConfig {
4
4
  endpoint: string;
5
5
  environment: Environment;
@@ -10,6 +10,15 @@ export interface OrchestratorConfig {
10
10
  isRootActivityInProgress?: () => boolean;
11
11
  log?: Log;
12
12
  onUploadError?: (error: unknown) => void;
13
+ activateGenericMonitors?: boolean;
14
+ drainAppQueue?: boolean;
15
+ drainFirstPartyQueue?: boolean;
16
+ namespace?: string;
17
+ isProduction?: boolean;
18
+ enableClickTracking?: boolean;
19
+ enableHistoryTracking?: boolean;
20
+ enableErrorTracking?: boolean;
13
21
  }
14
22
  export declare function initialize(config: OrchestratorConfig): void;
15
23
  export declare function isInitialized(): boolean;
24
+ export declare function getInstrumentedApp(): InstrumentedAppMethods | undefined;
@@ -1,3 +1,3 @@
1
- export { initialize, isInitialized } from './orchestrator/initialize';
1
+ export { initialize, isInitialized, getInstrumentedApp } from './orchestrator/initialize';
2
2
  export type { OrchestratorConfig } from './orchestrator/initialize';
3
3
  export type { TenantClass } from './queue/types';