@squide/firefly 12.0.4 → 13.0.1

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 (33) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/dist/honeycomb/activeSpan.d.ts +12 -0
  3. package/dist/honeycomb/activeSpan.js +105 -0
  4. package/dist/honeycomb/activeSpan.js.map +1 -0
  5. package/dist/honeycomb/canRegisterHoneycombInstrumentation.d.ts +1 -0
  6. package/dist/honeycomb/canRegisterHoneycombInstrumentation.js +11 -0
  7. package/dist/honeycomb/canRegisterHoneycombInstrumentation.js.map +1 -0
  8. package/dist/honeycomb/createTraceContextId.d.ts +1 -0
  9. package/dist/honeycomb/createTraceContextId.js +16 -0
  10. package/dist/honeycomb/createTraceContextId.js.map +1 -0
  11. package/dist/honeycomb/initializeHoneycomb.d.ts +2 -0
  12. package/dist/honeycomb/initializeHoneycomb.js +25 -0
  13. package/dist/honeycomb/initializeHoneycomb.js.map +1 -0
  14. package/dist/honeycomb/registerHoneycombInstrumentation.d.ts +3 -0
  15. package/dist/honeycomb/registerHoneycombInstrumentation.js +405 -0
  16. package/dist/honeycomb/registerHoneycombInstrumentation.js.map +1 -0
  17. package/dist/honeycomb/tracer.d.ts +1 -0
  18. package/dist/honeycomb/tracer.js +14 -0
  19. package/dist/honeycomb/tracer.js.map +1 -0
  20. package/dist/honeycomb/utils.d.ts +23 -0
  21. package/dist/honeycomb/utils.js +49 -0
  22. package/dist/honeycomb/utils.js.map +1 -0
  23. package/dist/initializeFirefly.js +12 -2
  24. package/dist/initializeFirefly.js.map +1 -1
  25. package/package.json +3 -1
  26. package/src/honeycomb/activeSpan.ts +131 -0
  27. package/src/honeycomb/canRegisterHoneycombInstrumentation.ts +5 -0
  28. package/src/honeycomb/createTraceContextId.ts +12 -0
  29. package/src/honeycomb/initializeHoneycomb.ts +22 -0
  30. package/src/honeycomb/registerHoneycombInstrumentation.ts +470 -0
  31. package/src/honeycomb/tracer.ts +6 -0
  32. package/src/honeycomb/utils.ts +64 -0
  33. package/src/initializeFirefly.ts +12 -2
@@ -0,0 +1,405 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__ from "@squide/core";
2
+ import * as __WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__ from "@squide/module-federation";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js_9236b353__ from "../AppRouterReducer.js";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__initializeFirefly_js_30865401__ from "../initializeFirefly.js";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__useProtectedDataQueries_js_5ede0a53__ from "../useProtectedDataQueries.js";
6
+ import * as __WEBPACK_EXTERNAL_MODULE__usePublicDataQueries_js_1f22e760__ from "../usePublicDataQueries.js";
7
+ import * as __WEBPACK_EXTERNAL_MODULE__activeSpan_js_fe031e6b__ from "./activeSpan.js";
8
+ import * as __WEBPACK_EXTERNAL_MODULE__tracer_js_f37593cd__ from "./tracer.js";
9
+ import * as __WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__ from "./utils.js";
10
+
11
+ ;// CONCATENATED MODULE: external "@squide/core"
12
+
13
+ ;// CONCATENATED MODULE: external "@squide/module-federation"
14
+
15
+ ;// CONCATENATED MODULE: external "../AppRouterReducer.js"
16
+
17
+ ;// CONCATENATED MODULE: external "../initializeFirefly.js"
18
+
19
+ ;// CONCATENATED MODULE: external "../useProtectedDataQueries.js"
20
+
21
+ ;// CONCATENATED MODULE: external "../usePublicDataQueries.js"
22
+
23
+ ;// CONCATENATED MODULE: external "./activeSpan.js"
24
+
25
+ ;// CONCATENATED MODULE: external "./tracer.js"
26
+
27
+ ;// CONCATENATED MODULE: external "./utils.js"
28
+
29
+ ;// CONCATENATED MODULE: ./src/honeycomb/registerHoneycombInstrumentation.ts
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ function reduceDataFetchEvents(runtime, onDataFetchingStarted, onDataReady, onPublicDataFetchStarted, onPublicDataReady, onProtectedDataFetchStarted, onProtectedDataReady) {
40
+ let dataFetchState = "none";
41
+ // TODO: Validate if this handler should use { once: true }.
42
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__usePublicDataQueries_js_1f22e760__.PublicDataFetchStartedEvent, ()=>{
43
+ if (dataFetchState === "none") {
44
+ dataFetchState = "fetching-data";
45
+ onDataFetchingStarted();
46
+ }
47
+ onPublicDataFetchStarted();
48
+ });
49
+ // TODO: Validate if this handler should use { once: true }.
50
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js_9236b353__.PublicDataReadyEvent, ()=>{
51
+ onPublicDataReady();
52
+ if (dataFetchState === "fetching-data") {
53
+ dataFetchState = "public-data-ready";
54
+ } else if (dataFetchState === "protected-data-ready") {
55
+ dataFetchState = "data-ready";
56
+ onDataReady();
57
+ }
58
+ });
59
+ // TODO: Validate if this handler should use { once: true }.
60
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__useProtectedDataQueries_js_5ede0a53__.ProtectedDataFetchStartedEvent, ()=>{
61
+ if (dataFetchState === "none") {
62
+ dataFetchState = "fetching-data";
63
+ onDataFetchingStarted();
64
+ }
65
+ onProtectedDataFetchStarted();
66
+ });
67
+ // TODO: Validate if this handler should use { once: true }.
68
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js_9236b353__.ProtectedDataReadyEvent, ()=>{
69
+ onProtectedDataReady();
70
+ if (dataFetchState === "fetching-data") {
71
+ dataFetchState = "protected-data-ready";
72
+ } else if (dataFetchState === "public-data-ready") {
73
+ dataFetchState = "data-ready";
74
+ onDataReady();
75
+ }
76
+ });
77
+ }
78
+ function registerTrackingListeners(runtime) {
79
+ let bootstrappingSpan;
80
+ let localModuleRegistrationSpan;
81
+ let localModuleDeferredRegistrationSpan;
82
+ let remoteModuleRegistrationSpan;
83
+ let remoteModuleDeferredRegistrationSpan;
84
+ let dataFetchSpan;
85
+ let deferredRegistrationsUpdateSpan;
86
+ let localModuleDeferredRegistrationsUpdateSpan;
87
+ let remoteModuleDeferredRegistrationsUpdateSpan;
88
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__initializeFirefly_js_30865401__.ApplicationBootstrappingStartedEvent, ()=>{
89
+ bootstrappingSpan = (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.startSpan)((options, context)=>(0,__WEBPACK_EXTERNAL_MODULE__tracer_js_f37593cd__.getTracer)().startSpan("squide-bootstrapping", options, context));
90
+ }, {
91
+ once: true
92
+ });
93
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js_9236b353__.ApplicationBoostrappedEvent, ()=>{
94
+ if (bootstrappingSpan) {
95
+ bootstrappingSpan.end();
96
+ }
97
+ }, {
98
+ once: true
99
+ });
100
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js_9236b353__.MswReadyEvent, ()=>{
101
+ if (bootstrappingSpan) {
102
+ bootstrappingSpan.addEvent("msw-ready");
103
+ }
104
+ }, {
105
+ once: true
106
+ });
107
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.LocalModulesRegistrationStartedEvent, (payload)=>{
108
+ const attributes = {
109
+ "app.squide.module_count": payload.moduleCount
110
+ };
111
+ if (bootstrappingSpan) {
112
+ bootstrappingSpan.addEvent("local-module-registration-started", attributes);
113
+ }
114
+ localModuleRegistrationSpan = (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.startChildSpan)(bootstrappingSpan, (options, context)=>{
115
+ return (0,__WEBPACK_EXTERNAL_MODULE__tracer_js_f37593cd__.getTracer)().startSpan("local-module-registration", {
116
+ ...options,
117
+ attributes
118
+ }, context);
119
+ });
120
+ }, {
121
+ once: true
122
+ });
123
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.LocalModulesRegistrationCompletedEvent, (payload)=>{
124
+ if (bootstrappingSpan) {
125
+ bootstrappingSpan.addEvent("local-module-registration-completed", {
126
+ "app.squide.module_count": payload.moduleCount
127
+ });
128
+ }
129
+ if (localModuleRegistrationSpan) {
130
+ localModuleRegistrationSpan.end();
131
+ }
132
+ }, {
133
+ once: true
134
+ });
135
+ // Can occur multiple times.
136
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.LocalModuleRegistrationFailedEvent, (payload)=>{
137
+ const registrationError = payload;
138
+ if (localModuleRegistrationSpan) {
139
+ (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.traceError)(localModuleRegistrationSpan, registrationError);
140
+ }
141
+ });
142
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.LocalModulesDeferredRegistrationStartedEvent, (payload)=>{
143
+ const attributes = {
144
+ "app.squide.registration_count": payload.registrationCount
145
+ };
146
+ if (bootstrappingSpan) {
147
+ bootstrappingSpan.addEvent("local-module-deferred-registration-started", attributes);
148
+ }
149
+ localModuleDeferredRegistrationSpan = (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.startChildSpan)(bootstrappingSpan, (options, context)=>{
150
+ return (0,__WEBPACK_EXTERNAL_MODULE__tracer_js_f37593cd__.getTracer)().startSpan("local-module-deferred-registration", {
151
+ ...options,
152
+ attributes
153
+ }, context);
154
+ });
155
+ }, {
156
+ once: true
157
+ });
158
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.LocalModulesDeferredRegistrationCompletedEvent, (payload)=>{
159
+ if (bootstrappingSpan) {
160
+ bootstrappingSpan.addEvent("local-module-deferred-registration-completed", {
161
+ "app.squide.registration_count": payload.registrationCount
162
+ });
163
+ }
164
+ if (localModuleDeferredRegistrationSpan) {
165
+ localModuleDeferredRegistrationSpan.end();
166
+ }
167
+ }, {
168
+ once: true
169
+ });
170
+ // Can occur multiple times.
171
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.LocalModuleDeferredRegistrationFailedEvent, (payload)=>{
172
+ const registrationError = payload;
173
+ if (localModuleDeferredRegistrationSpan) {
174
+ (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.traceError)(localModuleRegistrationSpan, registrationError);
175
+ }
176
+ });
177
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__.RemoteModulesRegistrationStartedEvent, (payload)=>{
178
+ const attributes = {
179
+ "app.squide.remote_count": payload.remoteCount
180
+ };
181
+ if (bootstrappingSpan) {
182
+ bootstrappingSpan.addEvent("remote-module-registration-started", attributes);
183
+ }
184
+ remoteModuleRegistrationSpan = (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.startChildSpan)(bootstrappingSpan, (options, context)=>{
185
+ return (0,__WEBPACK_EXTERNAL_MODULE__tracer_js_f37593cd__.getTracer)().startSpan("remote-module-registration", {
186
+ ...options,
187
+ attributes
188
+ }, context);
189
+ });
190
+ }, {
191
+ once: true
192
+ });
193
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__.RemoteModulesRegistrationCompletedEvent, (payload)=>{
194
+ if (bootstrappingSpan) {
195
+ bootstrappingSpan.addEvent("remote-module-registration-completed", {
196
+ "app.squide.remote_count": payload.remoteCount
197
+ });
198
+ }
199
+ if (remoteModuleRegistrationSpan) {
200
+ remoteModuleRegistrationSpan.end();
201
+ }
202
+ }, {
203
+ once: true
204
+ });
205
+ // Can occur multiple times.
206
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__.RemoteModuleRegistrationFailedEvent, (payload)=>{
207
+ const registrationError = payload;
208
+ if (remoteModuleRegistrationSpan) {
209
+ (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.traceError)(remoteModuleRegistrationSpan, registrationError);
210
+ }
211
+ });
212
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__.RemoteModulesDeferredRegistrationStartedEvent, (payload)=>{
213
+ const attributes = {
214
+ "app.squide.registration_count": payload.registrationCount
215
+ };
216
+ if (bootstrappingSpan) {
217
+ bootstrappingSpan.addEvent("remote-module-deferred-registration-started", attributes);
218
+ }
219
+ remoteModuleDeferredRegistrationSpan = (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.startChildSpan)(bootstrappingSpan, (options, context)=>{
220
+ return (0,__WEBPACK_EXTERNAL_MODULE__tracer_js_f37593cd__.getTracer)().startSpan("remote-module-deferred-registration", {
221
+ ...options,
222
+ attributes
223
+ }, context);
224
+ });
225
+ }, {
226
+ once: true
227
+ });
228
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__.RemoteModulesDeferredRegistrationCompletedEvent, (payload)=>{
229
+ if (bootstrappingSpan) {
230
+ bootstrappingSpan.addEvent("remote-module-deferred-registration-completed", {
231
+ "app.squide.registration_count": payload.registrationCount
232
+ });
233
+ }
234
+ if (remoteModuleDeferredRegistrationSpan) {
235
+ remoteModuleDeferredRegistrationSpan.end();
236
+ }
237
+ }, {
238
+ once: true
239
+ });
240
+ // Can occur multiple times.
241
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__.RemoteModuleDeferredRegistrationFailedEvent, (payload)=>{
242
+ const registrationError = payload;
243
+ if (remoteModuleDeferredRegistrationSpan) {
244
+ (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.traceError)(remoteModuleDeferredRegistrationSpan, registrationError);
245
+ }
246
+ });
247
+ const handleFetchDataStarted = ()=>{
248
+ dataFetchSpan = (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.startActiveChildSpan)(bootstrappingSpan, (options, context)=>{
249
+ const name = "data-fetch";
250
+ const span = (0,__WEBPACK_EXTERNAL_MODULE__tracer_js_f37593cd__.getTracer)().startSpan(name, options, context);
251
+ return {
252
+ name,
253
+ span
254
+ };
255
+ });
256
+ };
257
+ const handleDataReady = ()=>{
258
+ if (dataFetchSpan) {
259
+ (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.endActiveSpan)(dataFetchSpan);
260
+ }
261
+ };
262
+ const handlePublicDataFetchStarted = ()=>{
263
+ if (dataFetchSpan) {
264
+ dataFetchSpan.instance.addEvent("public-data-fetch-started");
265
+ }
266
+ };
267
+ const handlePublicDataReady = ()=>{
268
+ if (dataFetchSpan) {
269
+ dataFetchSpan.instance.addEvent("public-data-ready");
270
+ }
271
+ };
272
+ const handleProtectedDataFetchStarted = ()=>{
273
+ if (dataFetchSpan) {
274
+ dataFetchSpan.instance.addEvent("protected-data-fetch-started");
275
+ }
276
+ };
277
+ const handleProtectedDataReady = ()=>{
278
+ if (dataFetchSpan) {
279
+ dataFetchSpan.instance.addEvent("protected-data-ready");
280
+ }
281
+ };
282
+ reduceDataFetchEvents(runtime, handleFetchDataStarted, handleDataReady, handlePublicDataFetchStarted, handlePublicDataReady, handleProtectedDataFetchStarted, handleProtectedDataReady);
283
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js_9236b353__.ModulesRegisteredEvent, ()=>{
284
+ if (bootstrappingSpan) {
285
+ bootstrappingSpan.addEvent("modules-registered");
286
+ }
287
+ }, {
288
+ once: true
289
+ });
290
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__AppRouterReducer_js_9236b353__.ModulesReadyEvent, ()=>{
291
+ if (bootstrappingSpan) {
292
+ bootstrappingSpan.addEvent("modules-ready");
293
+ }
294
+ }, {
295
+ once: true
296
+ });
297
+ // Can occur multiple times.
298
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__.DeferredRegistrationsUpdateStartedEvent, ()=>{
299
+ deferredRegistrationsUpdateSpan = (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.startSpan)((options, context)=>(0,__WEBPACK_EXTERNAL_MODULE__tracer_js_f37593cd__.getTracer)().startSpan("squide-deferred-registrations-update", options, context));
300
+ });
301
+ // Can occur multiple times.
302
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__.DeferredRegistrationsUpdateCompletedEvent, ()=>{
303
+ if (deferredRegistrationsUpdateSpan) {
304
+ deferredRegistrationsUpdateSpan.end();
305
+ }
306
+ });
307
+ // Can occur multiple times.
308
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.LocalModulesDeferredRegistrationsUpdateStartedEvent, (payload)=>{
309
+ const attributes = {
310
+ "app.squide.registration_count": payload.registrationCount
311
+ };
312
+ if (deferredRegistrationsUpdateSpan) {
313
+ deferredRegistrationsUpdateSpan.addEvent("local-module-deferred-registrations-update-started", attributes);
314
+ }
315
+ localModuleDeferredRegistrationsUpdateSpan = (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.startActiveChildSpan)(deferredRegistrationsUpdateSpan, (options, context)=>{
316
+ const name = "local-module-deferred-registrations-update";
317
+ const span = (0,__WEBPACK_EXTERNAL_MODULE__tracer_js_f37593cd__.getTracer)().startSpan(name, {
318
+ attributes,
319
+ ...options
320
+ }, context);
321
+ return {
322
+ name,
323
+ span
324
+ };
325
+ });
326
+ });
327
+ // Can occur multiple times.
328
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.LocalModulesDeferredRegistrationsUpdateCompletedEvent, (payload)=>{
329
+ if (deferredRegistrationsUpdateSpan) {
330
+ deferredRegistrationsUpdateSpan.addEvent("local-module-deferred-registrations-update-completed", {
331
+ "app.squide.registration_count": payload.registrationCount
332
+ });
333
+ }
334
+ if (localModuleDeferredRegistrationsUpdateSpan) {
335
+ (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.endActiveSpan)(localModuleDeferredRegistrationsUpdateSpan);
336
+ }
337
+ });
338
+ // Can occur multiple times.
339
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__.LocalModuleDeferredRegistrationUpdateFailedEvent, (payload)=>{
340
+ const registrationError = payload;
341
+ if (localModuleDeferredRegistrationsUpdateSpan) {
342
+ (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.traceError)(localModuleDeferredRegistrationsUpdateSpan.instance, registrationError);
343
+ }
344
+ });
345
+ // Can occur multiple times.
346
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__.RemoteModulesDeferredRegistrationsUpdateStartedEvent, (payload)=>{
347
+ const attributes = {
348
+ "app.squide.registration_count": payload.registrationCount
349
+ };
350
+ if (deferredRegistrationsUpdateSpan) {
351
+ deferredRegistrationsUpdateSpan.addEvent("remote-module-deferred-registrations-update-started", attributes);
352
+ }
353
+ remoteModuleDeferredRegistrationsUpdateSpan = (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.startActiveChildSpan)(deferredRegistrationsUpdateSpan, (options, context)=>{
354
+ const name = "remote-module-deferred-registrations-update";
355
+ const span = (0,__WEBPACK_EXTERNAL_MODULE__tracer_js_f37593cd__.getTracer)().startSpan(name, {
356
+ attributes,
357
+ ...options
358
+ }, context);
359
+ return {
360
+ name,
361
+ span
362
+ };
363
+ });
364
+ });
365
+ // Can occur multiple times.
366
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__.RemoteModulesDeferredRegistrationsUpdateCompletedEvent, (payload)=>{
367
+ if (deferredRegistrationsUpdateSpan) {
368
+ deferredRegistrationsUpdateSpan.addEvent("remote-module-deferred-registrations-update-completed", {
369
+ "app.squide.registration_count": payload.registrationCount
370
+ });
371
+ }
372
+ if (remoteModuleDeferredRegistrationsUpdateSpan) {
373
+ (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.endActiveSpan)(remoteModuleDeferredRegistrationsUpdateSpan);
374
+ }
375
+ });
376
+ // Can occur multiple times.
377
+ runtime.eventBus.addListener(__WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__.RemoteModuleDeferredRegistrationUpdateFailedEvent, (payload)=>{
378
+ const registrationError = payload;
379
+ if (remoteModuleDeferredRegistrationsUpdateSpan) {
380
+ (0,__WEBPACK_EXTERNAL_MODULE__utils_js_d88b7fe1__.traceError)(remoteModuleDeferredRegistrationsUpdateSpan.instance, registrationError);
381
+ }
382
+ });
383
+ }
384
+ function getRegisterFetchRequestHookFunction() {
385
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
386
+ // @ts-ignore
387
+ return globalThis.__WLP_HONEYCOMB_REGISTER_DYNAMIC_FETCH_REQUEST_HOOK;
388
+ }
389
+ function registerHoneycombInstrumentation(runtime) {
390
+ const registerFetchRequestHookFunction = getRegisterFetchRequestHookFunction();
391
+ if (registerFetchRequestHookFunction) {
392
+ (0,__WEBPACK_EXTERNAL_MODULE__activeSpan_js_fe031e6b__.registerActiveSpanStack)();
393
+ const activeSpanOverrideFunction = (0,__WEBPACK_EXTERNAL_MODULE__activeSpan_js_fe031e6b__.createOverrideFetchRequestSpanWithActiveSpanContext)(runtime.logger);
394
+ // Dynamically registering this request hook function to nest the HTTP requests
395
+ // of squide bootstrapping under the appropriate Honeycomb span.
396
+ registerFetchRequestHookFunction(activeSpanOverrideFunction);
397
+ } else {
398
+ runtime.logger.warning("[squide] Cannot register Honeycomb fetch request hook because \"globalThis.__WLP_HONEYCOMB_REGISTER_DYNAMIC_FETCH_REQUEST_HOOK\" is not available. Honeycomb instrumentation is still functional but in degraded mode.");
399
+ }
400
+ registerTrackingListeners(runtime);
401
+ }
402
+
403
+ export { reduceDataFetchEvents, registerHoneycombInstrumentation };
404
+
405
+ //# sourceMappingURL=registerHoneycombInstrumentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"honeycomb/registerHoneycombInstrumentation.js","sources":["webpack://@squide/firefly/./src/honeycomb/registerHoneycombInstrumentation.ts"],"sourcesContent":["import type { Span } from \"@opentelemetry/api\";\nimport {\n LocalModuleDeferredRegistrationFailedEvent,\n LocalModuleDeferredRegistrationUpdateFailedEvent,\n LocalModuleRegistrationFailedEvent,\n LocalModulesDeferredRegistrationCompletedEvent,\n type LocalModulesDeferredRegistrationCompletedEventPayload,\n LocalModulesDeferredRegistrationStartedEvent,\n type LocalModulesDeferredRegistrationStartedEventPayload,\n LocalModulesDeferredRegistrationsUpdateCompletedEvent,\n type LocalModulesDeferredRegistrationsUpdateCompletedEventPayload,\n LocalModulesDeferredRegistrationsUpdateStartedEvent,\n type LocalModulesDeferredRegistrationsUpdateStartedEventPayload,\n LocalModulesRegistrationCompletedEvent,\n type LocalModulesRegistrationCompletedEventPayload,\n LocalModulesRegistrationStartedEvent,\n type LocalModulesRegistrationStartedEventPayload,\n type ModuleRegistrationError\n} from \"@squide/core\";\nimport {\n DeferredRegistrationsUpdateCompletedEvent,\n DeferredRegistrationsUpdateStartedEvent,\n RemoteModuleDeferredRegistrationFailedEvent,\n RemoteModuleDeferredRegistrationUpdateFailedEvent,\n type RemoteModuleRegistrationError,\n RemoteModuleRegistrationFailedEvent,\n RemoteModulesDeferredRegistrationCompletedEvent,\n type RemoteModulesDeferredRegistrationCompletedEventPayload,\n RemoteModulesDeferredRegistrationStartedEvent,\n type RemoteModulesDeferredRegistrationStartedEventPayload,\n RemoteModulesDeferredRegistrationsUpdateCompletedEvent,\n type RemoteModulesDeferredRegistrationsUpdateCompletedEventPayload,\n RemoteModulesDeferredRegistrationsUpdateStartedEvent,\n type RemoteModulesDeferredRegistrationsUpdateStartedEventPayload,\n RemoteModulesRegistrationCompletedEvent,\n type RemoteModulesRegistrationCompletedEventPayload,\n RemoteModulesRegistrationStartedEvent,\n type RemoteModulesRegistrationStartedEventPayload\n} from \"@squide/module-federation\";\nimport { ApplicationBoostrappedEvent, ModulesReadyEvent, ModulesRegisteredEvent, MswReadyEvent, ProtectedDataReadyEvent, PublicDataReadyEvent } from \"../AppRouterReducer.ts\";\nimport type { FireflyRuntime } from \"../FireflyRuntime.tsx\";\nimport { ApplicationBootstrappingStartedEvent } from \"../initializeFirefly.ts\";\nimport { ProtectedDataFetchStartedEvent } from \"../useProtectedDataQueries.ts\";\nimport { PublicDataFetchStartedEvent } from \"../usePublicDataQueries.ts\";\nimport { type ActiveSpan, createOverrideFetchRequestSpanWithActiveSpanContext, registerActiveSpanStack } from \"./activeSpan.ts\";\nimport { getTracer } from \"./tracer.ts\";\nimport { endActiveSpan, startActiveChildSpan, startChildSpan, startSpan, traceError } from \"./utils.ts\";\n\n// TIPS:\n// To query those traces in Honeycomb, use the following query filter: \"root.name = squide-bootstrapping\".\n\ntype DataFetchState = \"none\" | \"fetching-data\" | \"public-data-ready\" | \"protected-data-ready\" | \"data-ready\";\n\nexport function reduceDataFetchEvents(\n runtime: FireflyRuntime,\n onDataFetchingStarted: () => void,\n onDataReady: () => void,\n onPublicDataFetchStarted: () => void,\n onPublicDataReady: () => void,\n onProtectedDataFetchStarted: () => void,\n onProtectedDataReady: () => void\n) {\n let dataFetchState: DataFetchState = \"none\";\n\n // TODO: Validate if this handler should use { once: true }.\n runtime.eventBus.addListener(PublicDataFetchStartedEvent, () => {\n if (dataFetchState === \"none\") {\n dataFetchState = \"fetching-data\";\n onDataFetchingStarted();\n }\n\n onPublicDataFetchStarted();\n });\n\n // TODO: Validate if this handler should use { once: true }.\n runtime.eventBus.addListener(PublicDataReadyEvent, () => {\n onPublicDataReady();\n\n if (dataFetchState === \"fetching-data\") {\n dataFetchState = \"public-data-ready\";\n } else if (dataFetchState === \"protected-data-ready\") {\n dataFetchState = \"data-ready\";\n onDataReady();\n }\n });\n\n // TODO: Validate if this handler should use { once: true }.\n runtime.eventBus.addListener(ProtectedDataFetchStartedEvent, () => {\n if (dataFetchState === \"none\") {\n dataFetchState = \"fetching-data\";\n onDataFetchingStarted();\n }\n\n onProtectedDataFetchStarted();\n });\n\n // TODO: Validate if this handler should use { once: true }.\n runtime.eventBus.addListener(ProtectedDataReadyEvent, () => {\n onProtectedDataReady();\n\n if (dataFetchState === \"fetching-data\") {\n dataFetchState = \"protected-data-ready\";\n } else if (dataFetchState === \"public-data-ready\") {\n dataFetchState = \"data-ready\";\n onDataReady();\n }\n });\n}\n\nfunction registerTrackingListeners(runtime: FireflyRuntime) {\n let bootstrappingSpan: Span;\n let localModuleRegistrationSpan: Span;\n let localModuleDeferredRegistrationSpan: Span;\n let remoteModuleRegistrationSpan: Span;\n let remoteModuleDeferredRegistrationSpan: Span;\n let dataFetchSpan: ActiveSpan;\n let deferredRegistrationsUpdateSpan: Span;\n let localModuleDeferredRegistrationsUpdateSpan: ActiveSpan;\n let remoteModuleDeferredRegistrationsUpdateSpan: ActiveSpan;\n\n runtime.eventBus.addListener(ApplicationBootstrappingStartedEvent, () => {\n bootstrappingSpan = startSpan((options, context) => getTracer().startSpan(\"squide-bootstrapping\", options, context));\n }, { once: true });\n\n runtime.eventBus.addListener(ApplicationBoostrappedEvent, () => {\n if (bootstrappingSpan) {\n bootstrappingSpan.end();\n }\n }, { once: true });\n\n runtime.eventBus.addListener(MswReadyEvent, () => {\n if (bootstrappingSpan) {\n bootstrappingSpan.addEvent(\"msw-ready\");\n }\n }, { once: true });\n\n runtime.eventBus.addListener(LocalModulesRegistrationStartedEvent, (payload: unknown) => {\n const attributes = {\n \"app.squide.module_count\": (payload as LocalModulesRegistrationStartedEventPayload).moduleCount\n };\n\n if (bootstrappingSpan) {\n bootstrappingSpan.addEvent(\"local-module-registration-started\", attributes);\n }\n\n localModuleRegistrationSpan = startChildSpan(bootstrappingSpan, (options, context) => {\n return getTracer().startSpan(\"local-module-registration\", { ...options, attributes }, context);\n });\n }, { once: true });\n\n runtime.eventBus.addListener(LocalModulesRegistrationCompletedEvent, (payload: unknown) => {\n if (bootstrappingSpan) {\n bootstrappingSpan.addEvent(\"local-module-registration-completed\", {\n \"app.squide.module_count\": (payload as LocalModulesRegistrationCompletedEventPayload).moduleCount\n });\n }\n\n if (localModuleRegistrationSpan) {\n localModuleRegistrationSpan.end();\n }\n }, { once: true });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(LocalModuleRegistrationFailedEvent, (payload: unknown) => {\n const registrationError = payload as ModuleRegistrationError;\n\n if (localModuleRegistrationSpan) {\n traceError(localModuleRegistrationSpan, registrationError);\n }\n });\n\n runtime.eventBus.addListener(LocalModulesDeferredRegistrationStartedEvent, (payload: unknown) => {\n const attributes = {\n \"app.squide.registration_count\": (payload as LocalModulesDeferredRegistrationStartedEventPayload).registrationCount\n };\n\n if (bootstrappingSpan) {\n bootstrappingSpan.addEvent(\"local-module-deferred-registration-started\", attributes);\n }\n\n localModuleDeferredRegistrationSpan = startChildSpan(bootstrappingSpan, (options, context) => {\n return getTracer().startSpan(\"local-module-deferred-registration\", { ...options, attributes }, context);\n });\n }, { once: true });\n\n runtime.eventBus.addListener(LocalModulesDeferredRegistrationCompletedEvent, (payload: unknown) => {\n if (bootstrappingSpan) {\n bootstrappingSpan.addEvent(\"local-module-deferred-registration-completed\", {\n \"app.squide.registration_count\": (payload as LocalModulesDeferredRegistrationCompletedEventPayload).registrationCount\n });\n }\n\n if (localModuleDeferredRegistrationSpan) {\n localModuleDeferredRegistrationSpan.end();\n }\n }, { once: true });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(LocalModuleDeferredRegistrationFailedEvent, (payload: unknown) => {\n const registrationError = payload as ModuleRegistrationError;\n\n if (localModuleDeferredRegistrationSpan) {\n traceError(localModuleRegistrationSpan, registrationError);\n }\n });\n\n runtime.eventBus.addListener(RemoteModulesRegistrationStartedEvent, (payload: unknown) => {\n const attributes = {\n \"app.squide.remote_count\": (payload as RemoteModulesRegistrationStartedEventPayload).remoteCount\n };\n\n if (bootstrappingSpan) {\n bootstrappingSpan.addEvent(\"remote-module-registration-started\", attributes);\n }\n\n remoteModuleRegistrationSpan = startChildSpan(bootstrappingSpan, (options, context) => {\n return getTracer().startSpan(\"remote-module-registration\", { ...options, attributes }, context);\n });\n }, { once: true });\n\n runtime.eventBus.addListener(RemoteModulesRegistrationCompletedEvent, (payload: unknown) => {\n if (bootstrappingSpan) {\n bootstrappingSpan.addEvent(\"remote-module-registration-completed\", {\n \"app.squide.remote_count\": (payload as RemoteModulesRegistrationCompletedEventPayload).remoteCount\n });\n }\n\n if (remoteModuleRegistrationSpan) {\n remoteModuleRegistrationSpan.end();\n }\n }, { once: true });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(RemoteModuleRegistrationFailedEvent, (payload: unknown) => {\n const registrationError = payload as RemoteModuleRegistrationError;\n\n if (remoteModuleRegistrationSpan) {\n traceError(remoteModuleRegistrationSpan, registrationError);\n }\n });\n\n runtime.eventBus.addListener(RemoteModulesDeferredRegistrationStartedEvent, (payload: unknown) => {\n const attributes = {\n \"app.squide.registration_count\": (payload as RemoteModulesDeferredRegistrationStartedEventPayload).registrationCount\n };\n\n if (bootstrappingSpan) {\n bootstrappingSpan.addEvent(\"remote-module-deferred-registration-started\", attributes);\n }\n\n remoteModuleDeferredRegistrationSpan = startChildSpan(bootstrappingSpan, (options, context) => {\n return getTracer().startSpan(\"remote-module-deferred-registration\", { ...options, attributes }, context);\n });\n }, { once: true });\n\n runtime.eventBus.addListener(RemoteModulesDeferredRegistrationCompletedEvent, (payload: unknown) => {\n if (bootstrappingSpan) {\n bootstrappingSpan.addEvent(\"remote-module-deferred-registration-completed\", {\n \"app.squide.registration_count\": (payload as RemoteModulesDeferredRegistrationCompletedEventPayload).registrationCount\n });\n }\n\n if (remoteModuleDeferredRegistrationSpan) {\n remoteModuleDeferredRegistrationSpan.end();\n }\n }, { once: true });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(RemoteModuleDeferredRegistrationFailedEvent, (payload: unknown) => {\n const registrationError = payload as RemoteModuleRegistrationError;\n\n if (remoteModuleDeferredRegistrationSpan) {\n traceError(remoteModuleDeferredRegistrationSpan, registrationError);\n }\n });\n\n const handleFetchDataStarted = () => {\n dataFetchSpan = startActiveChildSpan(bootstrappingSpan, (options, context) => {\n const name = \"data-fetch\";\n const span = getTracer().startSpan(name, options, context);\n\n return {\n name,\n span\n };\n });\n };\n\n const handleDataReady = () => {\n if (dataFetchSpan) {\n endActiveSpan(dataFetchSpan);\n }\n };\n\n const handlePublicDataFetchStarted = () => {\n if (dataFetchSpan) {\n dataFetchSpan.instance.addEvent(\"public-data-fetch-started\");\n }\n };\n\n const handlePublicDataReady = () => {\n if (dataFetchSpan) {\n dataFetchSpan.instance.addEvent(\"public-data-ready\");\n }\n };\n\n const handleProtectedDataFetchStarted = () => {\n if (dataFetchSpan) {\n dataFetchSpan.instance.addEvent(\"protected-data-fetch-started\");\n }\n };\n\n const handleProtectedDataReady = () => {\n if (dataFetchSpan) {\n dataFetchSpan.instance.addEvent(\"protected-data-ready\");\n }\n };\n\n reduceDataFetchEvents(\n runtime,\n handleFetchDataStarted,\n handleDataReady,\n handlePublicDataFetchStarted,\n handlePublicDataReady,\n handleProtectedDataFetchStarted,\n handleProtectedDataReady\n );\n\n runtime.eventBus.addListener(ModulesRegisteredEvent, () => {\n if (bootstrappingSpan) {\n bootstrappingSpan.addEvent(\"modules-registered\");\n }\n }, { once: true });\n\n runtime.eventBus.addListener(ModulesReadyEvent, () => {\n if (bootstrappingSpan) {\n bootstrappingSpan.addEvent(\"modules-ready\");\n }\n }, { once: true });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(DeferredRegistrationsUpdateStartedEvent, () => {\n deferredRegistrationsUpdateSpan = startSpan((options, context) => getTracer().startSpan(\"squide-deferred-registrations-update\", options, context));\n });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(DeferredRegistrationsUpdateCompletedEvent, () => {\n if (deferredRegistrationsUpdateSpan) {\n deferredRegistrationsUpdateSpan.end();\n }\n });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(LocalModulesDeferredRegistrationsUpdateStartedEvent, (payload: unknown) => {\n const attributes = {\n \"app.squide.registration_count\": (payload as LocalModulesDeferredRegistrationsUpdateStartedEventPayload).registrationCount\n };\n\n if (deferredRegistrationsUpdateSpan) {\n deferredRegistrationsUpdateSpan.addEvent(\"local-module-deferred-registrations-update-started\", attributes);\n }\n\n localModuleDeferredRegistrationsUpdateSpan = startActiveChildSpan(deferredRegistrationsUpdateSpan, (options, context) => {\n const name = \"local-module-deferred-registrations-update\";\n\n const span = getTracer().startSpan(name, {\n attributes,\n ...options\n }, context);\n\n return {\n name,\n span\n };\n });\n });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(LocalModulesDeferredRegistrationsUpdateCompletedEvent, (payload: unknown) => {\n if (deferredRegistrationsUpdateSpan) {\n deferredRegistrationsUpdateSpan.addEvent(\"local-module-deferred-registrations-update-completed\", {\n \"app.squide.registration_count\": (payload as LocalModulesDeferredRegistrationsUpdateCompletedEventPayload).registrationCount\n });\n }\n\n if (localModuleDeferredRegistrationsUpdateSpan) {\n endActiveSpan(localModuleDeferredRegistrationsUpdateSpan);\n }\n });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(LocalModuleDeferredRegistrationUpdateFailedEvent, (payload: unknown) => {\n const registrationError = payload as ModuleRegistrationError;\n\n if (localModuleDeferredRegistrationsUpdateSpan) {\n traceError(localModuleDeferredRegistrationsUpdateSpan.instance, registrationError);\n }\n });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(RemoteModulesDeferredRegistrationsUpdateStartedEvent, (payload: unknown) => {\n const attributes = {\n \"app.squide.registration_count\": (payload as RemoteModulesDeferredRegistrationsUpdateStartedEventPayload).registrationCount\n };\n\n if (deferredRegistrationsUpdateSpan) {\n deferredRegistrationsUpdateSpan.addEvent(\"remote-module-deferred-registrations-update-started\", attributes);\n }\n\n remoteModuleDeferredRegistrationsUpdateSpan = startActiveChildSpan(deferredRegistrationsUpdateSpan, (options, context) => {\n const name = \"remote-module-deferred-registrations-update\";\n\n const span = getTracer().startSpan(name, {\n attributes,\n ...options\n }, context);\n\n return {\n name,\n span\n };\n });\n });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(RemoteModulesDeferredRegistrationsUpdateCompletedEvent, (payload: unknown) => {\n if (deferredRegistrationsUpdateSpan) {\n deferredRegistrationsUpdateSpan.addEvent(\"remote-module-deferred-registrations-update-completed\", {\n \"app.squide.registration_count\": (payload as RemoteModulesDeferredRegistrationsUpdateCompletedEventPayload).registrationCount\n });\n }\n\n if (remoteModuleDeferredRegistrationsUpdateSpan) {\n endActiveSpan(remoteModuleDeferredRegistrationsUpdateSpan);\n }\n });\n\n // Can occur multiple times.\n runtime.eventBus.addListener(RemoteModuleDeferredRegistrationUpdateFailedEvent, (payload: unknown) => {\n const registrationError = payload as RemoteModuleRegistrationError;\n\n if (remoteModuleDeferredRegistrationsUpdateSpan) {\n traceError(remoteModuleDeferredRegistrationsUpdateSpan.instance, registrationError);\n }\n });\n}\n\nfunction getRegisterFetchRequestHookFunction() {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return globalThis.__WLP_HONEYCOMB_REGISTER_DYNAMIC_FETCH_REQUEST_HOOK;\n}\n\nexport function registerHoneycombInstrumentation(runtime: FireflyRuntime) {\n const registerFetchRequestHookFunction = getRegisterFetchRequestHookFunction();\n\n if (registerFetchRequestHookFunction) {\n registerActiveSpanStack();\n\n const activeSpanOverrideFunction = createOverrideFetchRequestSpanWithActiveSpanContext(runtime.logger);\n\n // Dynamically registering this request hook function to nest the HTTP requests\n // of squide bootstrapping under the appropriate Honeycomb span.\n registerFetchRequestHookFunction(activeSpanOverrideFunction);\n } else {\n runtime.logger.warning(\"[squide] Cannot register Honeycomb fetch request hook because \\\"globalThis.__WLP_HONEYCOMB_REGISTER_DYNAMIC_FETCH_REQUEST_HOOK\\\" is not available. Honeycomb instrumentation is still functional but in degraded mode.\");\n }\n\n registerTrackingListeners(runtime);\n}\n"],"names":["LocalModuleDeferredRegistrationFailedEvent","LocalModuleDeferredRegistrationUpdateFailedEvent","LocalModuleRegistrationFailedEvent","LocalModulesDeferredRegistrationCompletedEvent","LocalModulesDeferredRegistrationStartedEvent","LocalModulesDeferredRegistrationsUpdateCompletedEvent","LocalModulesDeferredRegistrationsUpdateStartedEvent","LocalModulesRegistrationCompletedEvent","LocalModulesRegistrationStartedEvent","DeferredRegistrationsUpdateCompletedEvent","DeferredRegistrationsUpdateStartedEvent","RemoteModuleDeferredRegistrationFailedEvent","RemoteModuleDeferredRegistrationUpdateFailedEvent","RemoteModuleRegistrationFailedEvent","RemoteModulesDeferredRegistrationCompletedEvent","RemoteModulesDeferredRegistrationStartedEvent","RemoteModulesDeferredRegistrationsUpdateCompletedEvent","RemoteModulesDeferredRegistrationsUpdateStartedEvent","RemoteModulesRegistrationCompletedEvent","RemoteModulesRegistrationStartedEvent","ApplicationBoostrappedEvent","ModulesReadyEvent","ModulesRegisteredEvent","MswReadyEvent","ProtectedDataReadyEvent","PublicDataReadyEvent","ApplicationBootstrappingStartedEvent","ProtectedDataFetchStartedEvent","PublicDataFetchStartedEvent","createOverrideFetchRequestSpanWithActiveSpanContext","registerActiveSpanStack","getTracer","endActiveSpan","startActiveChildSpan","startChildSpan","startSpan","traceError","reduceDataFetchEvents","runtime","onDataFetchingStarted","onDataReady","onPublicDataFetchStarted","onPublicDataReady","onProtectedDataFetchStarted","onProtectedDataReady","dataFetchState","registerTrackingListeners","bootstrappingSpan","localModuleRegistrationSpan","localModuleDeferredRegistrationSpan","remoteModuleRegistrationSpan","remoteModuleDeferredRegistrationSpan","dataFetchSpan","deferredRegistrationsUpdateSpan","localModuleDeferredRegistrationsUpdateSpan","remoteModuleDeferredRegistrationsUpdateSpan","options","context","payload","attributes","registrationError","handleFetchDataStarted","name","span","handleDataReady","handlePublicDataFetchStarted","handlePublicDataReady","handleProtectedDataFetchStarted","handleProtectedDataReady","getRegisterFetchRequestHookFunction","globalThis","registerHoneycombInstrumentation","registerFetchRequestHookFunction","activeSpanOverrideFunction"],"mappings":";;;;;;;;;;;;;;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AAgC,QAAQ,CAAC,yDAAyD;gBAC9F,iCAAkCK,QAA0E,iBAAiB;YACjI;QACJ;QAEA,IAAIH,6CAA6C;YAC7CvB,gEAAaA,CAACuB;QAClB;IACJ;IAEA,4BAA4B;IAC5BjB,QAAQ,QAAQ,CAAC,WAAW,CAAC1B,gHAAiDA,EAAE,CAAC8C;QAC7E,MAAME,oBAAoBF;QAE1B,IAAIH,6CAA6C;YAC7CnB,6DAAUA,CAACmB,4CAA4C,QAAQ,EAAEK;QACrE;IACJ;AACJ;AAEA,SAASS;IACL,6DAA6D;IAC7D,aAAa;IACb,OAAOC,WAAW,mDAAmD;AACzE;AAEO,SAASC,iCAAiCjC,OAAuB;IACpE,MAAMkC,mCAAmCH;IAEzC,IAAIG,kCAAkC;QAClC1C,+EAAuBA;QAEvB,MAAM2C,6BAA6B5C,2GAAmDA,CAACS,QAAQ,MAAM;QAErG,+EAA+E;QAC/E,gEAAgE;QAChEkC,iCAAiCC;IACrC,OAAO;QACHnC,QAAQ,MAAM,CAAC,OAAO,CAAC;IAC3B;IAEAQ,0BAA0BR;AAC9B"}
@@ -0,0 +1 @@
1
+ export declare function getTracer(): import("@opentelemetry/api").Tracer;
@@ -0,0 +1,14 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opentelemetry/api";
2
+
3
+ ;// CONCATENATED MODULE: external "@opentelemetry/api"
4
+
5
+ ;// CONCATENATED MODULE: ./src/honeycomb/tracer.ts
6
+
7
+ function getTracer() {
8
+ // The tracer name is used as the "library.name" attribute.
9
+ return __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.trace.getTracer("@squide/honeycomb");
10
+ }
11
+
12
+ export { getTracer };
13
+
14
+ //# sourceMappingURL=tracer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"honeycomb/tracer.js","sources":["webpack://@squide/firefly/./src/honeycomb/tracer.ts"],"sourcesContent":["import { trace } from \"@opentelemetry/api\";\n\nexport function getTracer() {\n // The tracer name is used as the \"library.name\" attribute.\n return trace.getTracer(\"@squide/honeycomb\");\n}\n"],"names":["trace","getTracer"],"mappings":";;;;;AAA2C;AAEpC,SAASC;IACZ,2DAA2D;IAC3D,OAAOD,uEAAe,CAAC;AAC3B"}
@@ -0,0 +1,23 @@
1
+ import { type Context, type Exception, type Span, type SpanOptions, type TimeInput } from "@opentelemetry/api";
2
+ import { type ActiveSpan } from "./activeSpan.ts";
3
+ export type StartSpanFactory = (options?: SpanOptions, context?: Context) => Span;
4
+ export declare function startSpan(factory: StartSpanFactory): Span;
5
+ export type StartChildSpanFactory = (options?: SpanOptions, context?: Context) => Span;
6
+ export declare function startChildSpan(parent: Span, factory: StartChildSpanFactory): Span;
7
+ export interface StartActiveSpanFactoryReturn {
8
+ name: string;
9
+ span: Span;
10
+ }
11
+ export type StartActiveSpanFactory = (options?: SpanOptions, context?: Context) => StartActiveSpanFactoryReturn;
12
+ export declare function startActiveSpan(factory: StartActiveSpanFactory): ActiveSpan;
13
+ export interface StartActiveChildSpanFactoryReturn {
14
+ name: string;
15
+ span: Span;
16
+ }
17
+ export type StartActiveChildSpanFactory = (options?: SpanOptions, context?: Context) => StartActiveChildSpanFactoryReturn;
18
+ export declare function startActiveChildSpan(parent: Span, factory: StartActiveChildSpanFactory): ActiveSpan;
19
+ export declare function endActiveSpan(span: ActiveSpan): void;
20
+ export interface TraceErrorOptions {
21
+ time?: TimeInput;
22
+ }
23
+ export declare function traceError(span: Span, error: Exception, options?: TraceErrorOptions): void;
@@ -0,0 +1,49 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__ from "@opentelemetry/api";
2
+ import * as __WEBPACK_EXTERNAL_MODULE__activeSpan_js_fe031e6b__ from "./activeSpan.js";
3
+
4
+ ;// CONCATENATED MODULE: external "@opentelemetry/api"
5
+
6
+ ;// CONCATENATED MODULE: external "./activeSpan.js"
7
+
8
+ ;// CONCATENATED MODULE: ./src/honeycomb/utils.ts
9
+
10
+
11
+ function startSpan(factory) {
12
+ return factory({
13
+ kind: __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.SpanKind.CLIENT
14
+ });
15
+ }
16
+ function startChildSpan(parent, factory) {
17
+ const context = __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.trace.setSpan(__WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.context.active(), parent);
18
+ return factory({
19
+ kind: __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.SpanKind.CLIENT
20
+ }, context);
21
+ }
22
+ function startActiveSpan(factory) {
23
+ const { name, span } = factory({
24
+ kind: __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.SpanKind.CLIENT
25
+ });
26
+ return (0,__WEBPACK_EXTERNAL_MODULE__activeSpan_js_fe031e6b__.setActiveSpan)(name, span);
27
+ }
28
+ function startActiveChildSpan(parent, factory) {
29
+ const context = __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.trace.setSpan(__WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.context.active(), parent);
30
+ const { name, span } = factory({
31
+ kind: __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.SpanKind.CLIENT
32
+ }, context);
33
+ return (0,__WEBPACK_EXTERNAL_MODULE__activeSpan_js_fe031e6b__.setActiveSpan)(name, span);
34
+ }
35
+ function endActiveSpan(span) {
36
+ span.instance.end();
37
+ (0,__WEBPACK_EXTERNAL_MODULE__activeSpan_js_fe031e6b__.popActiveSpan)(span);
38
+ }
39
+ function traceError(span, error, options = {}) {
40
+ const { time } = options;
41
+ span.recordException(error, time);
42
+ span.setStatus({
43
+ code: __WEBPACK_EXTERNAL_MODULE__opentelemetry_api_87359e78__.SpanStatusCode.ERROR
44
+ });
45
+ }
46
+
47
+ export { endActiveSpan, startActiveChildSpan, startActiveSpan, startChildSpan, startSpan, traceError };
48
+
49
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"honeycomb/utils.js","sources":["webpack://@squide/firefly/./src/honeycomb/utils.ts"],"sourcesContent":["import { type Context, type Exception, context as otelContext, trace as otelTrace, type Span, SpanKind, type SpanOptions, SpanStatusCode, type TimeInput } from \"@opentelemetry/api\";\nimport { type ActiveSpan, popActiveSpan, setActiveSpan } from \"./activeSpan.ts\";\n\nexport type StartSpanFactory = (options?: SpanOptions, context?: Context) => Span;\n\nexport function startSpan(factory: StartSpanFactory) {\n return factory({ kind: SpanKind.CLIENT });\n}\n\nexport type StartChildSpanFactory = (options?: SpanOptions, context?: Context) => Span;\n\nexport function startChildSpan(parent: Span, factory: StartChildSpanFactory) {\n const context = otelTrace.setSpan(otelContext.active(), parent);\n\n return factory({ kind: SpanKind.CLIENT }, context);\n}\n\nexport interface StartActiveSpanFactoryReturn {\n name: string;\n span: Span;\n}\n\nexport type StartActiveSpanFactory = (options?: SpanOptions, context?: Context) => StartActiveSpanFactoryReturn;\n\nexport function startActiveSpan(factory: StartActiveSpanFactory) {\n const { name, span } = factory({ kind: SpanKind.CLIENT });\n\n return setActiveSpan(name, span);\n}\n\nexport interface StartActiveChildSpanFactoryReturn {\n name: string;\n span: Span;\n}\n\nexport type StartActiveChildSpanFactory = (options?: SpanOptions, context?: Context) => StartActiveChildSpanFactoryReturn;\n\nexport function startActiveChildSpan(parent: Span, factory: StartActiveChildSpanFactory) {\n const context = otelTrace.setSpan(otelContext.active(), parent);\n\n const { name, span } = factory({ kind: SpanKind.CLIENT }, context);\n\n return setActiveSpan(name, span);\n}\n\nexport function endActiveSpan(span: ActiveSpan) {\n span.instance.end();\n\n popActiveSpan(span);\n}\n\nexport interface TraceErrorOptions {\n time?: TimeInput;\n}\n\nexport function traceError(span: Span, error: Exception, options: TraceErrorOptions = {}) {\n const { time } = options;\n\n span.recordException(error, time);\n\n span.setStatus({\n code: SpanStatusCode.ERROR\n });\n}\n"],"names":["context","otelContext","trace","otelTrace","SpanKind","SpanStatusCode","popActiveSpan","setActiveSpan","startSpan","factory","startChildSpan","parent","startActiveSpan","name","span","startActiveChildSpan","endActiveSpan","traceError","error","options","time"],"mappings":";;;;;;;;AAAqL;AACrG;AAIzE,SAASQ,UAAUC,OAAyB;IAC/C,OAAOA,QAAQ;QAAE,MAAML,uEAAe;IAAC;AAC3C;AAIO,SAASM,eAAeC,MAAY,EAAEF,OAA8B;IACvE,MAAMT,UAAUG,qEAAiB,CAACF,sEAAkB,IAAIU;IAExD,OAAOF,QAAQ;QAAE,MAAML,uEAAe;IAAC,GAAGJ;AAC9C;AASO,SAASY,gBAAgBH,OAA+B;IAC3D,MAAM,EAAEI,IAAI,EAAEC,IAAI,EAAE,GAAGL,QAAQ;QAAE,MAAML,uEAAe;IAAC;IAEvD,OAAOG,qEAAaA,CAACM,MAAMC;AAC/B;AASO,SAASC,qBAAqBJ,MAAY,EAAEF,OAAoC;IACnF,MAAMT,UAAUG,qEAAiB,CAACF,sEAAkB,IAAIU;IAExD,MAAM,EAAEE,IAAI,EAAEC,IAAI,EAAE,GAAGL,QAAQ;QAAE,MAAML,uEAAe;IAAC,GAAGJ;IAE1D,OAAOO,qEAAaA,CAACM,MAAMC;AAC/B;AAEO,SAASE,cAAcF,IAAgB;IAC1CA,KAAK,QAAQ,CAAC,GAAG;IAEjBR,qEAAaA,CAACQ;AAClB;AAMO,SAASG,WAAWH,IAAU,EAAEI,KAAgB,EAAEC,UAA6B,CAAC,CAAC;IACpF,MAAM,EAAEC,IAAI,EAAE,GAAGD;IAEjBL,KAAK,eAAe,CAACI,OAAOE;IAE5BN,KAAK,SAAS,CAAC;QACX,MAAMT,4EAAoB;IAC9B;AACJ"}
@@ -2,6 +2,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__squide_core_7a405b8f__ from "@squide/core
2
2
  import * as __WEBPACK_EXTERNAL_MODULE__squide_module_federation_054d2ec6__ from "@squide/module-federation";
3
3
  import * as __WEBPACK_EXTERNAL_MODULE__squide_msw_9f7e76df__ from "@squide/msw";
4
4
  import * as __WEBPACK_EXTERNAL_MODULE__FireflyRuntime_js_318ddfd4__ from "./FireflyRuntime.js";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__honeycomb_initializeHoneycomb_js_8415d7e6__ from "./honeycomb/initializeHoneycomb.js";
5
6
 
6
7
  ;// CONCATENATED MODULE: external "@squide/core"
7
8
 
@@ -11,11 +12,14 @@ import * as __WEBPACK_EXTERNAL_MODULE__FireflyRuntime_js_318ddfd4__ from "./Fire
11
12
 
12
13
  ;// CONCATENATED MODULE: external "./FireflyRuntime.js"
13
14
 
15
+ ;// CONCATENATED MODULE: external "./honeycomb/initializeHoneycomb.js"
16
+
14
17
  ;// CONCATENATED MODULE: ./src/initializeFirefly.ts
15
18
 
16
19
 
17
20
 
18
21
 
22
+
19
23
  const ApplicationBootstrappingStartedEvent = "squide-app-bootstrapping-started";
20
24
  function propagateRegistrationErrors(results, onError) {
21
25
  if (results) {
@@ -55,7 +59,7 @@ function bootstrap(runtime, options = {}) {
55
59
  }
56
60
  let hasExecuted = false;
57
61
  function initializeFirefly(options = {}) {
58
- const { mode, useMsw, loggers, plugins } = options;
62
+ const { mode, useMsw, loggers, plugins, onError } = options;
59
63
  if (hasExecuted) {
60
64
  throw new Error("[squide] A squide application can only be initialized once. Did you call the \"initializeSquide\" function twice?");
61
65
  }
@@ -66,7 +70,13 @@ function initializeFirefly(options = {}) {
66
70
  loggers,
67
71
  plugins
68
72
  });
69
- bootstrap(runtime, options);
73
+ (0,__WEBPACK_EXTERNAL_MODULE__honeycomb_initializeHoneycomb_js_8415d7e6__.initializeHoneycomb)(runtime).catch((error)=>{
74
+ if (onError) {
75
+ onError(error);
76
+ }
77
+ }).finally(()=>{
78
+ bootstrap(runtime, options);
79
+ });
70
80
  return runtime;
71
81
  }
72
82
  function __resetHasExecuteGuard() {