@launchdarkly/o11y 1.5.0 → 1.6.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/index.d.ts CHANGED
@@ -1925,6 +1925,55 @@ export declare type ObserveOptions = CommonOptions & {
1925
1925
  * @default 2000
1926
1926
  */
1927
1927
  flagExposureDedupeMaxSize?: number;
1928
+ /**
1929
+ * Query parameters to read from the page URL and add as attributes to all
1930
+ * telemetry, as if passed to `LDObserve.setAttributes`.
1931
+ *
1932
+ * When the SDK initializes, each listed parameter present in
1933
+ * `location.search` becomes an attribute named after the parameter (e.g.
1934
+ * `utm_campaign`) on every span (including document load, page view and
1935
+ * fetch/XHR spans), log, error and metric for the rest of the page load,
1936
+ * including after SPA navigation drops it from the URL.
1937
+ *
1938
+ * Last touch: when an SPA navigation lands on a URL with any listed
1939
+ * parameter, the captured values are replaced by that URL's values, and
1940
+ * previously captured keys missing from it are removed, so the set always
1941
+ * reflects one landing. A navigation without listed parameters keeps the
1942
+ * current values. Spans already started keep the values they had.
1943
+ *
1944
+ * Values are kept in memory only; nothing is written to storage or
1945
+ * cookies, so a later full page load captures again from its own URL.
1946
+ *
1947
+ * Only the listed keys are captured, so other query parameters (which may
1948
+ * hold personal data such as emails or tokens) are never recorded this
1949
+ * way. The default list contains UTM parameters only. A name ending in `*`
1950
+ * matches every parameter with that prefix (e.g. `'utm_*'`).
1951
+ *
1952
+ * Keys set with `setAttributes` win: capture never replaces or removes a
1953
+ * key the app set itself. `removeAttributes` removes a captured value
1954
+ * (a later landing with that parameter captures it again). Keys in the
1955
+ * namespaces the SDK sets itself (`highlight.*`, `launchdarkly.*`,
1956
+ * `session.*`, `context.contextKeys.*`) are ignored.
1957
+ *
1958
+ * A custom list replaces the default. Set to `false` or `[]` to turn
1959
+ * capture off.
1960
+ * @default ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content']
1961
+ * @example captureQueryParams: ['utm_source', 'utm_campaign', 'gclid']
1962
+ */
1963
+ captureQueryParams?: string[] | false;
1964
+ /**
1965
+ * Specifies whether to record the page that linked to this one. When the
1966
+ * SDK initializes and `document.referrer` is a different origin, it is
1967
+ * added as the `landing.referrer` attribute to all telemetry for the rest
1968
+ * of the page load, as if passed to `LDObserve.setAttributes`.
1969
+ *
1970
+ * Only the origin and path are kept: the query string, fragment and any
1971
+ * credentials are stripped so tokens or personal data in the referrer URL
1972
+ * are not recorded. An empty or same-origin referrer sets nothing, and
1973
+ * the value is not updated on SPA navigation.
1974
+ * @default true
1975
+ */
1976
+ captureReferrer?: boolean;
1928
1977
  };
1929
1978
 
1930
1979
  declare interface OnHighlightReadyOptions {
package/dist/index.js CHANGED
@@ -40,11 +40,11 @@ var _ = (s, e, t) => new Promise((i, n) => {
40
40
  }, l = (d) => d.done ? i(d.value) : Promise.resolve(d.value).then(o, r);
41
41
  l((t = t.apply(s, e)).next());
42
42
  });
43
- import { W as Xe, M as L, r as J, I as Re, a as De, S as Ze, C as et, F as tt, b as st, P as it, c as Ie, g as nt, p as rt, E as ot, d as at, e as ct, f as lt, h as dt, s as ht, i as gt } from "./record-Bgkzgi9x.js";
44
- import { R as us } from "./record-Bgkzgi9x.js";
45
- import { s as K, G as T, g as F, S as E, r as Ce, a as Q, b as ut, c as ft, d as Y, e as X, f as W, F as Le, V as mt, P as pt, h as wt, H as Z, M as St, i as yt, L as Be, j as Me, k as bt, p as kt, l as Ee, m as Ne, n as vt, o as _t, q as Rt, t as Dt, u as It, v as Ct, w as Lt, x as Et, y as Nt } from "./common-1QcQF8EE.js";
46
- import { X as Tt, F as Ot, A as Pt, C as Ht, E as Ut, s as Fe, D as Wt, a as zt, m as Te, d as $e, b as Oe, c as Pe, r as Ve, e as Bt, p as Mt, f as Ft, g as $t, M as D, h as N, W as Vt, N as xt, P as At, J as Kt, i as x, j as A, k as qt, l as Gt, n as jt, o as He } from "./observe-TWCqC5wb.js";
47
- import { O as ms } from "./observe-TWCqC5wb.js";
43
+ import { W as Xe, M as L, r as J, I as Re, a as De, S as Ze, C as et, F as tt, b as st, P as it, c as Ie, g as nt, p as rt, E as ot, d as at, e as ct, f as lt, h as dt, s as ht, i as gt } from "./record-BpTfYU5r.js";
44
+ import { R as us } from "./record-BpTfYU5r.js";
45
+ import { s as K, G as T, g as F, S as E, r as Ce, a as Q, b as ut, c as ft, d as Y, e as X, f as W, F as Le, V as mt, P as pt, h as wt, H as Z, M as St, i as yt, L as Be, j as Me, k as bt, p as kt, l as Ee, m as Ne, n as vt, o as _t, q as Rt, t as Dt, u as It, v as Ct, w as Lt, x as Et, y as Nt } from "./common-C6gSg2Rq.js";
46
+ import { X as Tt, F as Ot, A as Pt, C as Ht, E as Ut, s as Fe, D as Wt, a as zt, m as Te, d as $e, b as Oe, c as Pe, r as Ve, e as Bt, p as Mt, f as Ft, g as $t, M as D, h as N, W as Vt, N as xt, P as At, J as Kt, i as x, j as A, k as qt, l as Gt, n as jt, o as He } from "./observe-CL-A2YiL.js";
47
+ import { O as ms } from "./observe-CL-A2YiL.js";
48
48
  import { L as Jt, s as Qt, a as O } from "./buffer-CwCRPuMA.js";
49
49
  import { g as Ue } from "./LDObserve-o8Ro1UV8.js";
50
50
  import { L as ws } from "./LDObserve-o8Ro1UV8.js";