@launchdarkly/o11y 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/observe.d.ts CHANGED
@@ -57,14 +57,29 @@ declare type CommonOptions = {
57
57
  */
58
58
  storageMode?: 'sessionStorage' | 'localStorage';
59
59
  /**
60
- * By default, session data is stored in the `sessionStorage` of the browser.
60
+ * By default, session data is stored in the `localStorage` of the browser.
61
61
  * Set to `true` to store session data in a cookie instead.
62
62
  * This can help with compliance for cookie-consent regulation.
63
63
  */
64
64
  sessionCookie?: boolean;
65
+ /**
66
+ * Set the `Domain` attribute of the session cookie so the same session can
67
+ * be continued on different subdomains (e.g. `app.example.com` and
68
+ * `checkout.example.com` both see a cookie set for `example.com`).
69
+ * Only applies when `sessionCookie` is set to `true`.
70
+ * By default, the cookie is scoped to the exact host that created it.
71
+ */
72
+ sessionCookieDomain?: string;
65
73
  /**
66
74
  * Specifies if Highlight should not automatically initialize when the class is created.
67
75
  * This should be used with `.start()` and `.stop()` if you want to control when Highlight records.
76
+ *
77
+ * While `start()` has not been called, calls that can be deferred (logs,
78
+ * errors, metrics, `track`) are kept in memory and delivered once
79
+ * `start()` runs. `start()` and `stop()` can safely be called before the
80
+ * SDK has initialized: a start made too early resolves once the SDK is
81
+ * attached. Calls that cannot be deferred (synchronous span callbacks) run
82
+ * their callback on a no-op span while the SDK is not started.
68
83
  * @default false
69
84
  */
70
85
  manualStart?: boolean;
@@ -414,10 +429,15 @@ export declare class Observe extends Plugin_2<ObserveOptions> implements LDPlugi
414
429
  declare interface Observe_2 {
415
430
  /**
416
431
  * Start the observability data capture when running in `manualStart` mode.
432
+ * Can safely be called before the SDK has initialized (e.g. before the
433
+ * plugin registers): the call resolves once the SDK is attached and
434
+ * started, without throwing.
417
435
  */
418
436
  start: () => Promise<void>;
419
437
  /**
420
438
  * Stop the observability data capture.
439
+ * Can safely be called before the SDK has initialized; before `start()`
440
+ * it cancels a pending start instead of throwing.
421
441
  */
422
442
  stop: () => Promise<void>;
423
443
  /**
@@ -571,6 +591,15 @@ declare type ObserveOptions = CommonOptions & {
571
591
  * @example consoleMethodsToRecord: ['log', 'info', 'error']
572
592
  */
573
593
  consoleMethodsToRecord?: ConsoleMethods[];
594
+ /**
595
+ * Specifies whether console output written by the LaunchDarkly SDK's own
596
+ * logger (lines prefixed `[LaunchDarkly]`, e.g. stream connection
597
+ * open/close messages) is recorded as logs. Those lines describe the SDK
598
+ * rather than your application, and the streaming URL they contain embeds
599
+ * the evaluation context, so they are skipped by default.
600
+ * @default false
601
+ */
602
+ recordLaunchDarklySdkLogs?: boolean;
574
603
  /**
575
604
  * Specifies whether to record performance metrics (e.g. FPS, device memory).
576
605
  * @default true
package/dist/observe.js CHANGED
@@ -1,7 +1,7 @@
1
- import "./common-BkAGcE30.js";
2
- import { O as e } from "./observe-xxoYHNEh.js";
3
- import "./LDObserve-CHIjcqIn.js";
4
- import "./buffer-DIFxvF2Q.js";
1
+ import "./common-7gIdCuSo.js";
2
+ import { O as e } from "./observe-DVzqBVcI.js";
3
+ import "./LDObserve-BQr7RYVC.js";
4
+ import "./buffer-CwCRPuMA.js";
5
5
  export {
6
6
  e as Observe
7
7
  };