@grafana/faro-core 1.14.0 → 1.14.2

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 (233) hide show
  1. package/dist/bundle/faro-core.iife.js +1 -1
  2. package/dist/bundle/types/api/ItemBuffer.d.ts +7 -0
  3. package/dist/bundle/types/api/apiTestHelpers.d.ts +11 -0
  4. package/dist/bundle/types/api/const.d.ts +3 -0
  5. package/dist/bundle/types/api/events/initialize.d.ts +13 -2
  6. package/dist/bundle/types/api/events/types.d.ts +11 -0
  7. package/dist/bundle/types/api/exceptions/initialize.d.ts +13 -2
  8. package/dist/bundle/types/api/exceptions/types.d.ts +2 -0
  9. package/dist/bundle/types/api/index.d.ts +3 -1
  10. package/dist/bundle/types/api/initialize.d.ts +3 -1
  11. package/dist/bundle/types/api/logs/initialize.d.ts +13 -2
  12. package/dist/bundle/types/api/logs/types.d.ts +3 -1
  13. package/dist/bundle/types/api/measurements/initialize.d.ts +13 -1
  14. package/dist/bundle/types/api/measurements/types.d.ts +2 -0
  15. package/dist/bundle/types/api/meta/initialize.d.ts +14 -2
  16. package/dist/bundle/types/api/types.d.ts +37 -0
  17. package/dist/bundle/types/api/userActionLifecycleHandler.d.ts +13 -0
  18. package/dist/bundle/types/api/utils.d.ts +2 -0
  19. package/dist/bundle/types/config/types.d.ts +21 -12
  20. package/dist/bundle/types/index.d.ts +4 -4
  21. package/dist/bundle/types/testUtils/mockTransport.d.ts +1 -1
  22. package/dist/bundle/types/transports/initialize.d.ts +2 -4
  23. package/dist/bundle/types/transports/types.d.ts +0 -1
  24. package/dist/bundle/types/utils/index.d.ts +2 -0
  25. package/dist/bundle/types/utils/reactive.d.ts +46 -0
  26. package/dist/bundle/types/version.d.ts +1 -1
  27. package/dist/cjs/api/ItemBuffer.js +27 -0
  28. package/dist/cjs/api/ItemBuffer.js.map +1 -0
  29. package/dist/cjs/api/apiTestHelpers.js +36 -0
  30. package/dist/cjs/api/apiTestHelpers.js.map +1 -0
  31. package/dist/cjs/api/const.js +7 -0
  32. package/dist/cjs/api/const.js.map +1 -0
  33. package/dist/cjs/api/events/initialize.js +15 -6
  34. package/dist/cjs/api/events/initialize.js.map +1 -1
  35. package/dist/cjs/api/events/types.js.map +1 -1
  36. package/dist/cjs/api/exceptions/initialize.js +59 -37
  37. package/dist/cjs/api/exceptions/initialize.js.map +1 -1
  38. package/dist/cjs/api/exceptions/types.js.map +1 -1
  39. package/dist/cjs/api/index.js +7 -1
  40. package/dist/cjs/api/index.js.map +1 -1
  41. package/dist/cjs/api/initialize.js +16 -2
  42. package/dist/cjs/api/initialize.js.map +1 -1
  43. package/dist/cjs/api/logs/initialize.js +15 -6
  44. package/dist/cjs/api/logs/initialize.js.map +1 -1
  45. package/dist/cjs/api/logs/types.js.map +1 -1
  46. package/dist/cjs/api/measurements/initialize.js +12 -3
  47. package/dist/cjs/api/measurements/initialize.js.map +1 -1
  48. package/dist/cjs/api/measurements/types.js.map +1 -1
  49. package/dist/cjs/api/meta/initialize.js +2 -1
  50. package/dist/cjs/api/meta/initialize.js.map +1 -1
  51. package/dist/cjs/api/types.js.map +1 -1
  52. package/dist/cjs/api/userActionLifecycleHandler.js +59 -0
  53. package/dist/cjs/api/userActionLifecycleHandler.js.map +1 -0
  54. package/dist/cjs/api/utils.js +11 -0
  55. package/dist/cjs/api/utils.js.map +1 -0
  56. package/dist/cjs/config/types.js.map +1 -1
  57. package/dist/cjs/index.js +8 -2
  58. package/dist/cjs/index.js.map +1 -1
  59. package/dist/cjs/transports/initialize.js +1 -35
  60. package/dist/cjs/transports/initialize.js.map +1 -1
  61. package/dist/cjs/transports/registerInitial.js +0 -1
  62. package/dist/cjs/transports/registerInitial.js.map +1 -1
  63. package/dist/cjs/transports/types.js.map +1 -1
  64. package/dist/cjs/utils/index.js +4 -1
  65. package/dist/cjs/utils/index.js.map +1 -1
  66. package/dist/cjs/utils/reactive.js +104 -0
  67. package/dist/cjs/utils/reactive.js.map +1 -0
  68. package/dist/cjs/version.js +1 -1
  69. package/dist/cjs/version.js.map +1 -1
  70. package/dist/esm/api/ItemBuffer.js +21 -0
  71. package/dist/esm/api/ItemBuffer.js.map +1 -0
  72. package/dist/esm/api/apiTestHelpers.js +33 -0
  73. package/dist/esm/api/apiTestHelpers.js.map +1 -0
  74. package/dist/esm/api/const.js +4 -0
  75. package/dist/esm/api/const.js.map +1 -0
  76. package/dist/esm/api/events/initialize.js +15 -7
  77. package/dist/esm/api/events/initialize.js.map +1 -1
  78. package/dist/esm/api/events/types.js.map +1 -1
  79. package/dist/esm/api/exceptions/initialize.js +56 -35
  80. package/dist/esm/api/exceptions/initialize.js.map +1 -1
  81. package/dist/esm/api/exceptions/types.js.map +1 -1
  82. package/dist/esm/api/index.js +2 -0
  83. package/dist/esm/api/index.js.map +1 -1
  84. package/dist/esm/api/initialize.js +15 -1
  85. package/dist/esm/api/initialize.js.map +1 -1
  86. package/dist/esm/api/logs/initialize.js +12 -4
  87. package/dist/esm/api/logs/initialize.js.map +1 -1
  88. package/dist/esm/api/logs/types.js.map +1 -1
  89. package/dist/esm/api/measurements/initialize.js +12 -4
  90. package/dist/esm/api/measurements/initialize.js.map +1 -1
  91. package/dist/esm/api/measurements/types.js.map +1 -1
  92. package/dist/esm/api/meta/initialize.js +1 -1
  93. package/dist/esm/api/meta/initialize.js.map +1 -1
  94. package/dist/esm/api/types.js.map +1 -1
  95. package/dist/esm/api/userActionLifecycleHandler.js +43 -0
  96. package/dist/esm/api/userActionLifecycleHandler.js.map +1 -0
  97. package/dist/esm/api/utils.js +7 -0
  98. package/dist/esm/api/utils.js.map +1 -0
  99. package/dist/esm/config/types.js.map +1 -1
  100. package/dist/esm/index.js +2 -2
  101. package/dist/esm/index.js.map +1 -1
  102. package/dist/esm/transports/initialize.js +0 -28
  103. package/dist/esm/transports/initialize.js.map +1 -1
  104. package/dist/esm/transports/registerInitial.js +0 -1
  105. package/dist/esm/transports/registerInitial.js.map +1 -1
  106. package/dist/esm/transports/types.js.map +1 -1
  107. package/dist/esm/utils/index.js +1 -0
  108. package/dist/esm/utils/index.js.map +1 -1
  109. package/dist/esm/utils/reactive.js +93 -0
  110. package/dist/esm/utils/reactive.js.map +1 -0
  111. package/dist/esm/version.js +1 -1
  112. package/dist/esm/version.js.map +1 -1
  113. package/dist/spec/core/src/api/ItemBuffer.js +27 -0
  114. package/dist/spec/core/src/api/ItemBuffer.js.map +1 -0
  115. package/dist/spec/core/src/api/apiTestHelpers.js +36 -0
  116. package/dist/spec/core/src/api/apiTestHelpers.js.map +1 -0
  117. package/dist/spec/core/src/api/const.js +7 -0
  118. package/dist/spec/core/src/api/const.js.map +1 -0
  119. package/dist/spec/core/src/api/events/initialize.js +15 -6
  120. package/dist/spec/core/src/api/events/initialize.js.map +1 -1
  121. package/dist/spec/core/src/api/events/initialize.test.js +57 -0
  122. package/dist/spec/core/src/api/events/initialize.test.js.map +1 -1
  123. package/dist/spec/core/src/api/events/types.js.map +1 -1
  124. package/dist/spec/core/src/api/exceptions/initialize.js +59 -37
  125. package/dist/spec/core/src/api/exceptions/initialize.js.map +1 -1
  126. package/dist/spec/core/src/api/exceptions/initialize.test.js +83 -3
  127. package/dist/spec/core/src/api/exceptions/initialize.test.js.map +1 -1
  128. package/dist/spec/core/src/api/exceptions/types.js.map +1 -1
  129. package/dist/spec/core/src/api/index.js +7 -1
  130. package/dist/spec/core/src/api/index.js.map +1 -1
  131. package/dist/spec/core/src/api/initialize.js +16 -2
  132. package/dist/spec/core/src/api/initialize.js.map +1 -1
  133. package/dist/spec/core/src/api/initialize.test.js +73 -0
  134. package/dist/spec/core/src/api/initialize.test.js.map +1 -0
  135. package/dist/spec/core/src/api/itemBuffer.test.js +36 -0
  136. package/dist/spec/core/src/api/itemBuffer.test.js.map +1 -0
  137. package/dist/spec/core/src/api/logs/initialize.js +15 -6
  138. package/dist/spec/core/src/api/logs/initialize.js.map +1 -1
  139. package/dist/spec/core/src/api/logs/initialize.test.js +98 -0
  140. package/dist/spec/core/src/api/logs/initialize.test.js.map +1 -1
  141. package/dist/spec/core/src/api/logs/types.js.map +1 -1
  142. package/dist/spec/core/src/api/measurements/initialize.js +12 -3
  143. package/dist/spec/core/src/api/measurements/initialize.js.map +1 -1
  144. package/dist/spec/core/src/api/measurements/initialize.test.js +105 -0
  145. package/dist/spec/core/src/api/measurements/initialize.test.js.map +1 -1
  146. package/dist/spec/core/src/api/measurements/types.js.map +1 -1
  147. package/dist/spec/core/src/api/meta/initialize.js +2 -1
  148. package/dist/spec/core/src/api/meta/initialize.js.map +1 -1
  149. package/dist/spec/core/src/api/meta/initilialize.test.js +1 -3
  150. package/dist/spec/core/src/api/meta/initilialize.test.js.map +1 -1
  151. package/dist/spec/core/src/api/types.js.map +1 -1
  152. package/dist/spec/core/src/api/userActionLifecycleHandler.js +59 -0
  153. package/dist/spec/core/src/api/userActionLifecycleHandler.js.map +1 -0
  154. package/dist/spec/core/src/api/userActionLifecycleHandler.test.js +152 -0
  155. package/dist/spec/core/src/api/userActionLifecycleHandler.test.js.map +1 -0
  156. package/dist/spec/core/src/api/utils.js +11 -0
  157. package/dist/spec/core/src/api/utils.js.map +1 -0
  158. package/dist/spec/core/src/api/utils.test.js +20 -0
  159. package/dist/spec/core/src/api/utils.test.js.map +1 -0
  160. package/dist/spec/core/src/config/types.js.map +1 -1
  161. package/dist/spec/core/src/index.js +8 -2
  162. package/dist/spec/core/src/index.js.map +1 -1
  163. package/dist/spec/core/src/transports/initialize.js +1 -35
  164. package/dist/spec/core/src/transports/initialize.js.map +1 -1
  165. package/dist/spec/core/src/transports/registerInitial.js +0 -1
  166. package/dist/spec/core/src/transports/registerInitial.js.map +1 -1
  167. package/dist/spec/core/src/transports/transports.test.js +0 -16
  168. package/dist/spec/core/src/transports/transports.test.js.map +1 -1
  169. package/dist/spec/core/src/transports/types.js.map +1 -1
  170. package/dist/spec/core/src/utils/index.js +4 -1
  171. package/dist/spec/core/src/utils/index.js.map +1 -1
  172. package/dist/spec/core/src/utils/reactive.js +104 -0
  173. package/dist/spec/core/src/utils/reactive.js.map +1 -0
  174. package/dist/spec/core/src/utils/reactive.test.js +104 -0
  175. package/dist/spec/core/src/utils/reactive.test.js.map +1 -0
  176. package/dist/spec/core/src/version.js +1 -1
  177. package/dist/spec/core/src/version.js.map +1 -1
  178. package/dist/types/api/ItemBuffer.d.ts +7 -0
  179. package/dist/types/api/apiTestHelpers.d.ts +11 -0
  180. package/dist/types/api/const.d.ts +3 -0
  181. package/dist/types/api/events/initialize.d.ts +13 -2
  182. package/dist/types/api/events/types.d.ts +11 -0
  183. package/dist/types/api/exceptions/initialize.d.ts +13 -2
  184. package/dist/types/api/exceptions/types.d.ts +2 -0
  185. package/dist/types/api/index.d.ts +3 -1
  186. package/dist/types/api/initialize.d.ts +3 -1
  187. package/dist/types/api/logs/initialize.d.ts +13 -2
  188. package/dist/types/api/logs/types.d.ts +3 -1
  189. package/dist/types/api/measurements/initialize.d.ts +13 -1
  190. package/dist/types/api/measurements/types.d.ts +2 -0
  191. package/dist/types/api/meta/initialize.d.ts +14 -2
  192. package/dist/types/api/types.d.ts +37 -0
  193. package/dist/types/api/userActionLifecycleHandler.d.ts +13 -0
  194. package/dist/types/api/utils.d.ts +2 -0
  195. package/dist/types/config/types.d.ts +21 -12
  196. package/dist/types/core/src/api/ItemBuffer.d.ts +7 -0
  197. package/dist/types/core/src/api/apiTestHelpers.d.ts +11 -0
  198. package/dist/types/core/src/api/const.d.ts +3 -0
  199. package/dist/types/core/src/api/events/initialize.d.ts +13 -2
  200. package/dist/types/core/src/api/events/types.d.ts +11 -0
  201. package/dist/types/core/src/api/exceptions/initialize.d.ts +13 -2
  202. package/dist/types/core/src/api/exceptions/types.d.ts +2 -0
  203. package/dist/types/core/src/api/index.d.ts +3 -1
  204. package/dist/types/core/src/api/initialize.d.ts +3 -1
  205. package/dist/types/core/src/api/initialize.test.d.ts +1 -0
  206. package/dist/types/core/src/api/itemBuffer.test.d.ts +1 -0
  207. package/dist/types/core/src/api/logs/initialize.d.ts +13 -2
  208. package/dist/types/core/src/api/logs/types.d.ts +3 -1
  209. package/dist/types/core/src/api/measurements/initialize.d.ts +13 -1
  210. package/dist/types/core/src/api/measurements/types.d.ts +2 -0
  211. package/dist/types/core/src/api/meta/initialize.d.ts +14 -2
  212. package/dist/types/core/src/api/types.d.ts +37 -0
  213. package/dist/types/core/src/api/userActionLifecycleHandler.d.ts +13 -0
  214. package/dist/types/core/src/api/userActionLifecycleHandler.test.d.ts +1 -0
  215. package/dist/types/core/src/api/utils.d.ts +2 -0
  216. package/dist/types/core/src/api/utils.test.d.ts +1 -0
  217. package/dist/types/core/src/config/types.d.ts +21 -12
  218. package/dist/types/core/src/index.d.ts +4 -4
  219. package/dist/types/core/src/testUtils/mockTransport.d.ts +1 -1
  220. package/dist/types/core/src/transports/initialize.d.ts +2 -4
  221. package/dist/types/core/src/transports/types.d.ts +0 -1
  222. package/dist/types/core/src/utils/index.d.ts +2 -0
  223. package/dist/types/core/src/utils/reactive.d.ts +46 -0
  224. package/dist/types/core/src/utils/reactive.test.d.ts +1 -0
  225. package/dist/types/core/src/version.d.ts +1 -1
  226. package/dist/types/index.d.ts +4 -4
  227. package/dist/types/testUtils/mockTransport.d.ts +1 -1
  228. package/dist/types/transports/initialize.d.ts +2 -4
  229. package/dist/types/transports/types.d.ts +0 -1
  230. package/dist/types/utils/index.d.ts +2 -0
  231. package/dist/types/utils/reactive.d.ts +46 -0
  232. package/dist/types/version.d.ts +1 -1
  233. package/package.json +2 -2
@@ -1,5 +1,6 @@
1
1
  import type { SpanContext } from '@opentelemetry/api';
2
2
  import type { TraceContext } from '../traces';
3
+ import type { UserAction } from '../types';
3
4
  export type EventAttributes = Record<string, string>;
4
5
  export interface EventEvent {
5
6
  name: string;
@@ -7,11 +8,21 @@ export interface EventEvent {
7
8
  domain?: string;
8
9
  attributes?: EventAttributes;
9
10
  trace?: TraceContext;
11
+ action?: UserAction;
10
12
  }
11
13
  export interface PushEventOptions {
12
14
  skipDedupe?: boolean;
13
15
  spanContext?: Pick<SpanContext, 'traceId' | 'spanId'>;
14
16
  timestampOverwriteMs?: number;
17
+ /**
18
+ * Allows manual transformation of the payload before adding it to the internal buffer.
19
+ *
20
+ * @param payload - The event payload to be transformed.
21
+ * @returns The transformed event payload.
22
+ *
23
+ * @remarks This should be used sparingly and only in special cases where custom payload processing cannot be deferred to the before-send hook.
24
+ */
25
+ customPayloadTransformer?: (payload: EventEvent) => EventEvent;
15
26
  }
16
27
  export interface EventsAPI {
17
28
  pushEvent: (name: string, attributes?: EventAttributes, domain?: string, options?: PushEventOptions) => void;
@@ -1,8 +1,19 @@
1
1
  import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
- import type { Transports } from '../../transports';
4
+ import type { TransportItem, Transports } from '../../transports';
5
5
  import type { UnpatchedConsole } from '../../unpatchedConsole';
6
+ import type { ItemBuffer } from '../ItemBuffer';
6
7
  import type { TracesAPI } from '../traces';
8
+ import type { ApiMessageBusMessages } from '../types';
7
9
  import type { ExceptionsAPI } from './types';
8
- export declare function initializeExceptionsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): ExceptionsAPI;
10
+ export declare function initializeExceptionsAPI({ internalLogger, config, metas, transports, tracesApi, actionBuffer, getMessage, }: {
11
+ unpatchedConsole: UnpatchedConsole;
12
+ internalLogger: InternalLogger;
13
+ config: Config;
14
+ metas: Metas;
15
+ transports: Transports;
16
+ tracesApi: TracesAPI;
17
+ actionBuffer: ItemBuffer<TransportItem>;
18
+ getMessage: () => ApiMessageBusMessages | undefined;
19
+ }): ExceptionsAPI;
@@ -1,5 +1,6 @@
1
1
  import type { SpanContext } from '@opentelemetry/api';
2
2
  import type { TraceContext } from '../traces';
3
+ import type { UserAction } from '../types';
3
4
  export type StacktraceParser = (err: ExtendedError) => Stacktrace;
4
5
  export interface ExceptionStackFrame {
5
6
  filename: string;
@@ -23,6 +24,7 @@ export interface ExceptionEvent {
23
24
  stacktrace?: Stacktrace;
24
25
  trace?: TraceContext;
25
26
  context?: ExceptionContext;
27
+ action?: UserAction;
26
28
  }
27
29
  export interface PushErrorOptions {
28
30
  skipDedupe?: boolean;
@@ -1,5 +1,5 @@
1
1
  export { initializeAPI } from './initialize';
2
- export type { API, APIEvent } from './types';
2
+ export type { API, APIEvent, ApiMessageBusMessages, UserActionCancelMessage, UserActionEndMessage, UserActionStartMessage, UserAction, } from './types';
3
3
  export type { EventAttributes, EventEvent, EventsAPI, PushEventOptions } from './events';
4
4
  export { defaultExceptionType, defaultErrorArgsSerializer } from './exceptions';
5
5
  export type { ExceptionEvent, ExceptionStackFrame, ExceptionsAPI, ExtendedError, PushErrorOptions, Stacktrace, StacktraceParser, } from './exceptions';
@@ -8,3 +8,5 @@ export type { LogContext, LogEvent, LogArgsSerializer, LogsAPI, PushLogOptions }
8
8
  export type { MeasurementEvent, MeasurementsAPI, PushMeasurementOptions } from './measurements';
9
9
  export type { MetaAPI } from './meta';
10
10
  export type { OTELApi, TraceContext, TraceEvent, TracesAPI } from './traces';
11
+ export { apiMessageBus } from './initialize';
12
+ export { USER_ACTION_CANCEL_MESSAGE_TYPE, USER_ACTION_END_MESSAGE_TYPE, USER_ACTION_START_MESSAGE_TYPE } from './const';
@@ -3,5 +3,7 @@ import type { InternalLogger } from '../internalLogger';
3
3
  import type { Metas } from '../metas';
4
4
  import type { Transports } from '../transports';
5
5
  import type { UnpatchedConsole } from '../unpatchedConsole';
6
- import type { API } from './types';
6
+ import { Observable } from '../utils';
7
+ import type { API, ApiMessageBusMessages } from './types';
8
+ export declare const apiMessageBus: Observable<ApiMessageBusMessages>;
7
9
  export declare function initializeAPI(unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports): API;
@@ -1,8 +1,19 @@
1
1
  import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
- import type { Transports } from '../../transports';
4
+ import { TransportItem, Transports } from '../../transports';
5
5
  import type { UnpatchedConsole } from '../../unpatchedConsole';
6
+ import type { ItemBuffer } from '../ItemBuffer';
6
7
  import type { TracesAPI } from '../traces';
8
+ import type { ApiMessageBusMessages } from '../types';
7
9
  import type { LogsAPI } from './types';
8
- export declare function initializeLogsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): LogsAPI;
10
+ export declare function initializeLogsAPI({ internalLogger, config, metas, transports, tracesApi, actionBuffer, getMessage, }: {
11
+ unpatchedConsole: UnpatchedConsole;
12
+ internalLogger: InternalLogger;
13
+ config: Config;
14
+ metas: Metas;
15
+ transports: Transports;
16
+ tracesApi: TracesAPI;
17
+ actionBuffer: ItemBuffer<TransportItem>;
18
+ getMessage: () => ApiMessageBusMessages | undefined;
19
+ }): LogsAPI;
@@ -1,13 +1,15 @@
1
1
  import type { SpanContext } from '@opentelemetry/api';
2
2
  import type { LogLevel } from '../../utils';
3
3
  import type { TraceContext } from '../traces';
4
+ import type { UserAction } from '../types';
4
5
  export type LogContext = Record<string, string>;
5
6
  export interface LogEvent {
6
- context: LogContext;
7
+ context: LogContext | undefined;
7
8
  level: LogLevel;
8
9
  message: string;
9
10
  timestamp: string;
10
11
  trace?: TraceContext;
12
+ action?: UserAction;
11
13
  }
12
14
  export interface PushLogOptions {
13
15
  context?: LogContext;
@@ -1,8 +1,20 @@
1
1
  import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
+ import { TransportItem } from '../../transports';
4
5
  import type { Transports } from '../../transports';
5
6
  import type { UnpatchedConsole } from '../../unpatchedConsole';
7
+ import type { ItemBuffer } from '../ItemBuffer';
6
8
  import type { TracesAPI } from '../traces';
9
+ import type { ApiMessageBusMessages } from '../types';
7
10
  import type { MeasurementsAPI } from './types';
8
- export declare function initializeMeasurementsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): MeasurementsAPI;
11
+ export declare function initializeMeasurementsAPI({ internalLogger, config, metas, transports, tracesApi, actionBuffer, getMessage, }: {
12
+ unpatchedConsole: UnpatchedConsole;
13
+ internalLogger: InternalLogger;
14
+ config: Config;
15
+ metas: Metas;
16
+ transports: Transports;
17
+ tracesApi: TracesAPI;
18
+ actionBuffer: ItemBuffer<TransportItem>;
19
+ getMessage: () => ApiMessageBusMessages | undefined;
20
+ }): MeasurementsAPI;
@@ -1,5 +1,6 @@
1
1
  import type { SpanContext } from '@opentelemetry/api';
2
2
  import type { TraceContext } from '../traces';
3
+ import type { UserAction } from '../types';
3
4
  export type MeasurementContext = Record<string, string>;
4
5
  export interface MeasurementEvent<V extends {
5
6
  [label: string]: number;
@@ -11,6 +12,7 @@ export interface MeasurementEvent<V extends {
11
12
  timestamp: string;
12
13
  trace?: TraceContext;
13
14
  context?: MeasurementContext;
15
+ action?: UserAction;
14
16
  }
15
17
  export interface PushMeasurementOptions {
16
18
  skipDedupe?: boolean;
@@ -1,7 +1,19 @@
1
1
  import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
- import type { Transports } from '../../transports';
4
+ import type { TransportItem, Transports } from '../../transports';
5
5
  import type { UnpatchedConsole } from '../../unpatchedConsole';
6
+ import type { ItemBuffer } from '../ItemBuffer';
7
+ import type { TracesAPI } from '../traces';
8
+ import type { ApiMessageBusMessages } from '../types';
6
9
  import type { MetaAPI } from './types';
7
- export declare function initializeMetaAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, _config: Config, metas: Metas, _transports: Transports): MetaAPI;
10
+ export declare function initializeMetaAPI({ internalLogger, metas, }: {
11
+ unpatchedConsole: UnpatchedConsole;
12
+ internalLogger: InternalLogger;
13
+ config: Config;
14
+ metas: Metas;
15
+ transports: Transports;
16
+ tracesApi: TracesAPI;
17
+ actionBuffer: ItemBuffer<TransportItem>;
18
+ getMessage: () => ApiMessageBusMessages | undefined;
19
+ }): MetaAPI;
@@ -1,3 +1,4 @@
1
+ import type { USER_ACTION_CANCEL_MESSAGE_TYPE, USER_ACTION_END_MESSAGE_TYPE, USER_ACTION_START_MESSAGE_TYPE } from './const';
1
2
  import type { EventEvent, EventsAPI } from './events';
2
3
  import type { ExceptionEvent, ExceptionsAPI } from './exceptions';
3
4
  import type { LogEvent, LogsAPI } from './logs';
@@ -6,3 +7,39 @@ import type { MetaAPI } from './meta';
6
7
  import type { TraceEvent, TracesAPI } from './traces';
7
8
  export type APIEvent = LogEvent | ExceptionEvent | MeasurementEvent | TraceEvent | EventEvent;
8
9
  export type API = LogsAPI & ExceptionsAPI & MeasurementsAPI & TracesAPI & MetaAPI & EventsAPI;
10
+ export type ApiMessageBusMessages = UserActionStartMessage | UserActionEndMessage | UserActionCancelMessage;
11
+ export type UserActionMessageType = typeof USER_ACTION_START_MESSAGE_TYPE | typeof USER_ACTION_END_MESSAGE_TYPE | typeof USER_ACTION_CANCEL_MESSAGE_TYPE;
12
+ export type UserActionStartMessage = {
13
+ type: typeof USER_ACTION_START_MESSAGE_TYPE;
14
+ name: string;
15
+ startTime: number;
16
+ /**
17
+ * Unique identifier of the parent user action to which this action belongs.
18
+ */
19
+ parentId: string;
20
+ };
21
+ export type UserActionEndMessage = {
22
+ type: typeof USER_ACTION_END_MESSAGE_TYPE;
23
+ name: string;
24
+ startTime: number;
25
+ endTime: number;
26
+ duration: number;
27
+ eventType: string;
28
+ /**
29
+ * Unique identifier for the user action. Will be undefined for messages related to child actions.
30
+ */
31
+ id: string;
32
+ };
33
+ export type UserActionCancelMessage = {
34
+ type: typeof USER_ACTION_CANCEL_MESSAGE_TYPE;
35
+ name: string;
36
+ /**
37
+ * Unique identifier of the parent user action to which this action belongs.
38
+ */
39
+ parentId?: string;
40
+ };
41
+ export type UserAction = {
42
+ name: string;
43
+ id?: string;
44
+ parentId?: string;
45
+ };
@@ -0,0 +1,13 @@
1
+ import type { Config } from '../config';
2
+ import { type TransportItem, type Transports } from '../transports';
3
+ import type { Observable } from '../utils';
4
+ import { ItemBuffer } from './ItemBuffer';
5
+ import type { APIEvent, ApiMessageBusMessages } from './types';
6
+ export declare function createUserActionLifecycleHandler({ apiMessageBus, transports, config, }: {
7
+ apiMessageBus: Observable<ApiMessageBusMessages>;
8
+ transports: Transports;
9
+ config: Config;
10
+ }): {
11
+ actionBuffer: ItemBuffer<TransportItem<APIEvent>>;
12
+ getMessage: () => ApiMessageBusMessages | undefined;
13
+ };
@@ -0,0 +1,2 @@
1
+ import type { Patterns } from '../config/types';
2
+ export declare function shouldIgnoreEvent(patterns: Patterns, msg: string): boolean;
@@ -2,7 +2,7 @@ import type { APIEvent, LogArgsSerializer, StacktraceParser } from '../api';
2
2
  import type { Instrumentation } from '../instrumentations';
3
3
  import type { InternalLoggerLevel } from '../internalLogger';
4
4
  import type { Meta, MetaApp, MetaItem, MetaPage, MetaSession, MetaUser, MetaView } from '../metas';
5
- import type { BatchExecutorOptions, BeforeSendHook, Transport } from '../transports';
5
+ import type { BatchExecutorOptions, BeforeSendHook, Transport, TransportItem } from '../transports';
6
6
  import type { UnpatchedConsole } from '../unpatchedConsole';
7
7
  import type { LogLevel } from '../utils';
8
8
  type SamplingContext = {
@@ -192,18 +192,27 @@ export interface Config<P = APIEvent> {
192
192
  generatePageId?: (location: Location) => string;
193
193
  };
194
194
  /**
195
- * Configuration for the location tracking (Grafana cloud only)
195
+ * Enable or disable geolocation tracking.
196
+ * Geolocation tracking must be enabled in the Grafana Cloud settings first.
197
+ * It cannot be enabled solely on the client side.
198
+ * This option allows control over tracking on the client side to comply with user
199
+ * privacy requirements.
196
200
  */
197
- geoLocationTracking?: {
198
- /**
199
- * Enable or disable geolocation tracking.
200
- * Geolocation tracking must be enabled in the Grafana Cloud settings first.
201
- * It cannot be enabled solely on the client side.
202
- * This option allows control over tracking on the client side to comply with user
203
- * privacy requirements.
204
- */
205
- enabled?: boolean;
206
- };
201
+ trackGeolocation?: boolean;
202
+ /**
203
+ * This is a preview feature.
204
+ * We have tested it thoroughly, but it is possible that it might not work as expected in all cases.
205
+ */
206
+ trackUserActionsPreview?: boolean;
207
+ /**
208
+ * Configure your own attribute name for tracking user actions. Default is 'data-faro-user-action-name'
209
+ */
210
+ trackUserActionsDataAttributeName?: string;
211
+ /**
212
+ * Predicate function to exclude items from user actions.
213
+ * If the function returns true, the item will be excluded from user actions.
214
+ */
215
+ trackUserActionsExcludeItem?: (item: TransportItem<APIEvent>) => boolean;
207
216
  }
208
217
  export type Patterns = Array<string | RegExp>;
209
218
  export {};
@@ -0,0 +1,7 @@
1
+ export declare class ItemBuffer<T> {
2
+ private buffer;
3
+ constructor();
4
+ addItem(item: T): void;
5
+ flushBuffer(cb?: (item: T) => void): void;
6
+ size(): number;
7
+ }
@@ -0,0 +1,11 @@
1
+ import type { Transports } from '../transports';
2
+ import type { TracesAPI } from './traces/types';
3
+ export declare const mockMetas: {
4
+ add: jest.Mock<any, any, any>;
5
+ remove: jest.Mock<any, any, any>;
6
+ addListener: jest.Mock<any, any, any>;
7
+ removeListener: jest.Mock<any, any, any>;
8
+ value: {};
9
+ };
10
+ export declare const mockTransports: Transports;
11
+ export declare const mockTracesApi: TracesAPI;
@@ -0,0 +1,3 @@
1
+ export declare const USER_ACTION_START_MESSAGE_TYPE = "user-action-start";
2
+ export declare const USER_ACTION_END_MESSAGE_TYPE = "user-action-end";
3
+ export declare const USER_ACTION_CANCEL_MESSAGE_TYPE = "user-action-cancel";
@@ -1,8 +1,19 @@
1
1
  import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
- import { Transports } from '../../transports';
4
+ import type { TransportItem, Transports } from '../../transports';
5
5
  import type { UnpatchedConsole } from '../../unpatchedConsole';
6
+ import type { ItemBuffer } from '../ItemBuffer';
6
7
  import type { TracesAPI } from '../traces';
8
+ import type { ApiMessageBusMessages } from '../types';
7
9
  import type { EventsAPI } from './types';
8
- export declare function initializeEventsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): EventsAPI;
10
+ export declare function initializeEventsAPI({ internalLogger, config, metas, transports, tracesApi, actionBuffer, getMessage, }: {
11
+ unpatchedConsole: UnpatchedConsole;
12
+ internalLogger: InternalLogger;
13
+ config: Config;
14
+ metas: Metas;
15
+ transports: Transports;
16
+ tracesApi: TracesAPI;
17
+ actionBuffer: ItemBuffer<TransportItem>;
18
+ getMessage: () => ApiMessageBusMessages | undefined;
19
+ }): EventsAPI;
@@ -1,5 +1,6 @@
1
1
  import type { SpanContext } from '@opentelemetry/api';
2
2
  import type { TraceContext } from '../traces';
3
+ import type { UserAction } from '../types';
3
4
  export type EventAttributes = Record<string, string>;
4
5
  export interface EventEvent {
5
6
  name: string;
@@ -7,11 +8,21 @@ export interface EventEvent {
7
8
  domain?: string;
8
9
  attributes?: EventAttributes;
9
10
  trace?: TraceContext;
11
+ action?: UserAction;
10
12
  }
11
13
  export interface PushEventOptions {
12
14
  skipDedupe?: boolean;
13
15
  spanContext?: Pick<SpanContext, 'traceId' | 'spanId'>;
14
16
  timestampOverwriteMs?: number;
17
+ /**
18
+ * Allows manual transformation of the payload before adding it to the internal buffer.
19
+ *
20
+ * @param payload - The event payload to be transformed.
21
+ * @returns The transformed event payload.
22
+ *
23
+ * @remarks This should be used sparingly and only in special cases where custom payload processing cannot be deferred to the before-send hook.
24
+ */
25
+ customPayloadTransformer?: (payload: EventEvent) => EventEvent;
15
26
  }
16
27
  export interface EventsAPI {
17
28
  pushEvent: (name: string, attributes?: EventAttributes, domain?: string, options?: PushEventOptions) => void;
@@ -1,8 +1,19 @@
1
1
  import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
- import type { Transports } from '../../transports';
4
+ import type { TransportItem, Transports } from '../../transports';
5
5
  import type { UnpatchedConsole } from '../../unpatchedConsole';
6
+ import type { ItemBuffer } from '../ItemBuffer';
6
7
  import type { TracesAPI } from '../traces';
8
+ import type { ApiMessageBusMessages } from '../types';
7
9
  import type { ExceptionsAPI } from './types';
8
- export declare function initializeExceptionsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): ExceptionsAPI;
10
+ export declare function initializeExceptionsAPI({ internalLogger, config, metas, transports, tracesApi, actionBuffer, getMessage, }: {
11
+ unpatchedConsole: UnpatchedConsole;
12
+ internalLogger: InternalLogger;
13
+ config: Config;
14
+ metas: Metas;
15
+ transports: Transports;
16
+ tracesApi: TracesAPI;
17
+ actionBuffer: ItemBuffer<TransportItem>;
18
+ getMessage: () => ApiMessageBusMessages | undefined;
19
+ }): ExceptionsAPI;
@@ -1,5 +1,6 @@
1
1
  import type { SpanContext } from '@opentelemetry/api';
2
2
  import type { TraceContext } from '../traces';
3
+ import type { UserAction } from '../types';
3
4
  export type StacktraceParser = (err: ExtendedError) => Stacktrace;
4
5
  export interface ExceptionStackFrame {
5
6
  filename: string;
@@ -23,6 +24,7 @@ export interface ExceptionEvent {
23
24
  stacktrace?: Stacktrace;
24
25
  trace?: TraceContext;
25
26
  context?: ExceptionContext;
27
+ action?: UserAction;
26
28
  }
27
29
  export interface PushErrorOptions {
28
30
  skipDedupe?: boolean;
@@ -1,5 +1,5 @@
1
1
  export { initializeAPI } from './initialize';
2
- export type { API, APIEvent } from './types';
2
+ export type { API, APIEvent, ApiMessageBusMessages, UserActionCancelMessage, UserActionEndMessage, UserActionStartMessage, UserAction, } from './types';
3
3
  export type { EventAttributes, EventEvent, EventsAPI, PushEventOptions } from './events';
4
4
  export { defaultExceptionType, defaultErrorArgsSerializer } from './exceptions';
5
5
  export type { ExceptionEvent, ExceptionStackFrame, ExceptionsAPI, ExtendedError, PushErrorOptions, Stacktrace, StacktraceParser, } from './exceptions';
@@ -8,3 +8,5 @@ export type { LogContext, LogEvent, LogArgsSerializer, LogsAPI, PushLogOptions }
8
8
  export type { MeasurementEvent, MeasurementsAPI, PushMeasurementOptions } from './measurements';
9
9
  export type { MetaAPI } from './meta';
10
10
  export type { OTELApi, TraceContext, TraceEvent, TracesAPI } from './traces';
11
+ export { apiMessageBus } from './initialize';
12
+ export { USER_ACTION_CANCEL_MESSAGE_TYPE, USER_ACTION_END_MESSAGE_TYPE, USER_ACTION_START_MESSAGE_TYPE } from './const';
@@ -3,5 +3,7 @@ import type { InternalLogger } from '../internalLogger';
3
3
  import type { Metas } from '../metas';
4
4
  import type { Transports } from '../transports';
5
5
  import type { UnpatchedConsole } from '../unpatchedConsole';
6
- import type { API } from './types';
6
+ import { Observable } from '../utils';
7
+ import type { API, ApiMessageBusMessages } from './types';
8
+ export declare const apiMessageBus: Observable<ApiMessageBusMessages>;
7
9
  export declare function initializeAPI(unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports): API;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -1,8 +1,19 @@
1
1
  import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
- import type { Transports } from '../../transports';
4
+ import { TransportItem, Transports } from '../../transports';
5
5
  import type { UnpatchedConsole } from '../../unpatchedConsole';
6
+ import type { ItemBuffer } from '../ItemBuffer';
6
7
  import type { TracesAPI } from '../traces';
8
+ import type { ApiMessageBusMessages } from '../types';
7
9
  import type { LogsAPI } from './types';
8
- export declare function initializeLogsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): LogsAPI;
10
+ export declare function initializeLogsAPI({ internalLogger, config, metas, transports, tracesApi, actionBuffer, getMessage, }: {
11
+ unpatchedConsole: UnpatchedConsole;
12
+ internalLogger: InternalLogger;
13
+ config: Config;
14
+ metas: Metas;
15
+ transports: Transports;
16
+ tracesApi: TracesAPI;
17
+ actionBuffer: ItemBuffer<TransportItem>;
18
+ getMessage: () => ApiMessageBusMessages | undefined;
19
+ }): LogsAPI;
@@ -1,13 +1,15 @@
1
1
  import type { SpanContext } from '@opentelemetry/api';
2
2
  import type { LogLevel } from '../../utils';
3
3
  import type { TraceContext } from '../traces';
4
+ import type { UserAction } from '../types';
4
5
  export type LogContext = Record<string, string>;
5
6
  export interface LogEvent {
6
- context: LogContext;
7
+ context: LogContext | undefined;
7
8
  level: LogLevel;
8
9
  message: string;
9
10
  timestamp: string;
10
11
  trace?: TraceContext;
12
+ action?: UserAction;
11
13
  }
12
14
  export interface PushLogOptions {
13
15
  context?: LogContext;
@@ -1,8 +1,20 @@
1
1
  import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
+ import { TransportItem } from '../../transports';
4
5
  import type { Transports } from '../../transports';
5
6
  import type { UnpatchedConsole } from '../../unpatchedConsole';
7
+ import type { ItemBuffer } from '../ItemBuffer';
6
8
  import type { TracesAPI } from '../traces';
9
+ import type { ApiMessageBusMessages } from '../types';
7
10
  import type { MeasurementsAPI } from './types';
8
- export declare function initializeMeasurementsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): MeasurementsAPI;
11
+ export declare function initializeMeasurementsAPI({ internalLogger, config, metas, transports, tracesApi, actionBuffer, getMessage, }: {
12
+ unpatchedConsole: UnpatchedConsole;
13
+ internalLogger: InternalLogger;
14
+ config: Config;
15
+ metas: Metas;
16
+ transports: Transports;
17
+ tracesApi: TracesAPI;
18
+ actionBuffer: ItemBuffer<TransportItem>;
19
+ getMessage: () => ApiMessageBusMessages | undefined;
20
+ }): MeasurementsAPI;
@@ -1,5 +1,6 @@
1
1
  import type { SpanContext } from '@opentelemetry/api';
2
2
  import type { TraceContext } from '../traces';
3
+ import type { UserAction } from '../types';
3
4
  export type MeasurementContext = Record<string, string>;
4
5
  export interface MeasurementEvent<V extends {
5
6
  [label: string]: number;
@@ -11,6 +12,7 @@ export interface MeasurementEvent<V extends {
11
12
  timestamp: string;
12
13
  trace?: TraceContext;
13
14
  context?: MeasurementContext;
15
+ action?: UserAction;
14
16
  }
15
17
  export interface PushMeasurementOptions {
16
18
  skipDedupe?: boolean;
@@ -1,7 +1,19 @@
1
1
  import type { Config } from '../../config';
2
2
  import type { InternalLogger } from '../../internalLogger';
3
3
  import type { Metas } from '../../metas';
4
- import type { Transports } from '../../transports';
4
+ import type { TransportItem, Transports } from '../../transports';
5
5
  import type { UnpatchedConsole } from '../../unpatchedConsole';
6
+ import type { ItemBuffer } from '../ItemBuffer';
7
+ import type { TracesAPI } from '../traces';
8
+ import type { ApiMessageBusMessages } from '../types';
6
9
  import type { MetaAPI } from './types';
7
- export declare function initializeMetaAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, _config: Config, metas: Metas, _transports: Transports): MetaAPI;
10
+ export declare function initializeMetaAPI({ internalLogger, metas, }: {
11
+ unpatchedConsole: UnpatchedConsole;
12
+ internalLogger: InternalLogger;
13
+ config: Config;
14
+ metas: Metas;
15
+ transports: Transports;
16
+ tracesApi: TracesAPI;
17
+ actionBuffer: ItemBuffer<TransportItem>;
18
+ getMessage: () => ApiMessageBusMessages | undefined;
19
+ }): MetaAPI;
@@ -1,3 +1,4 @@
1
+ import type { USER_ACTION_CANCEL_MESSAGE_TYPE, USER_ACTION_END_MESSAGE_TYPE, USER_ACTION_START_MESSAGE_TYPE } from './const';
1
2
  import type { EventEvent, EventsAPI } from './events';
2
3
  import type { ExceptionEvent, ExceptionsAPI } from './exceptions';
3
4
  import type { LogEvent, LogsAPI } from './logs';
@@ -6,3 +7,39 @@ import type { MetaAPI } from './meta';
6
7
  import type { TraceEvent, TracesAPI } from './traces';
7
8
  export type APIEvent = LogEvent | ExceptionEvent | MeasurementEvent | TraceEvent | EventEvent;
8
9
  export type API = LogsAPI & ExceptionsAPI & MeasurementsAPI & TracesAPI & MetaAPI & EventsAPI;
10
+ export type ApiMessageBusMessages = UserActionStartMessage | UserActionEndMessage | UserActionCancelMessage;
11
+ export type UserActionMessageType = typeof USER_ACTION_START_MESSAGE_TYPE | typeof USER_ACTION_END_MESSAGE_TYPE | typeof USER_ACTION_CANCEL_MESSAGE_TYPE;
12
+ export type UserActionStartMessage = {
13
+ type: typeof USER_ACTION_START_MESSAGE_TYPE;
14
+ name: string;
15
+ startTime: number;
16
+ /**
17
+ * Unique identifier of the parent user action to which this action belongs.
18
+ */
19
+ parentId: string;
20
+ };
21
+ export type UserActionEndMessage = {
22
+ type: typeof USER_ACTION_END_MESSAGE_TYPE;
23
+ name: string;
24
+ startTime: number;
25
+ endTime: number;
26
+ duration: number;
27
+ eventType: string;
28
+ /**
29
+ * Unique identifier for the user action. Will be undefined for messages related to child actions.
30
+ */
31
+ id: string;
32
+ };
33
+ export type UserActionCancelMessage = {
34
+ type: typeof USER_ACTION_CANCEL_MESSAGE_TYPE;
35
+ name: string;
36
+ /**
37
+ * Unique identifier of the parent user action to which this action belongs.
38
+ */
39
+ parentId?: string;
40
+ };
41
+ export type UserAction = {
42
+ name: string;
43
+ id?: string;
44
+ parentId?: string;
45
+ };
@@ -0,0 +1,13 @@
1
+ import type { Config } from '../config';
2
+ import { type TransportItem, type Transports } from '../transports';
3
+ import type { Observable } from '../utils';
4
+ import { ItemBuffer } from './ItemBuffer';
5
+ import type { APIEvent, ApiMessageBusMessages } from './types';
6
+ export declare function createUserActionLifecycleHandler({ apiMessageBus, transports, config, }: {
7
+ apiMessageBus: Observable<ApiMessageBusMessages>;
8
+ transports: Transports;
9
+ config: Config;
10
+ }): {
11
+ actionBuffer: ItemBuffer<TransportItem<APIEvent>>;
12
+ getMessage: () => ApiMessageBusMessages | undefined;
13
+ };
@@ -0,0 +1,2 @@
1
+ import type { Patterns } from '../config/types';
2
+ export declare function shouldIgnoreEvent(patterns: Patterns, msg: string): boolean;
@@ -0,0 +1 @@
1
+ export {};