@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/record.d.ts CHANGED
@@ -1189,6 +1189,55 @@ declare type ObserveOptions = CommonOptions & {
1189
1189
  * @default 2000
1190
1190
  */
1191
1191
  flagExposureDedupeMaxSize?: number;
1192
+ /**
1193
+ * Query parameters to read from the page URL and add as attributes to all
1194
+ * telemetry, as if passed to `LDObserve.setAttributes`.
1195
+ *
1196
+ * When the SDK initializes, each listed parameter present in
1197
+ * `location.search` becomes an attribute named after the parameter (e.g.
1198
+ * `utm_campaign`) on every span (including document load, page view and
1199
+ * fetch/XHR spans), log, error and metric for the rest of the page load,
1200
+ * including after SPA navigation drops it from the URL.
1201
+ *
1202
+ * Last touch: when an SPA navigation lands on a URL with any listed
1203
+ * parameter, the captured values are replaced by that URL's values, and
1204
+ * previously captured keys missing from it are removed, so the set always
1205
+ * reflects one landing. A navigation without listed parameters keeps the
1206
+ * current values. Spans already started keep the values they had.
1207
+ *
1208
+ * Values are kept in memory only; nothing is written to storage or
1209
+ * cookies, so a later full page load captures again from its own URL.
1210
+ *
1211
+ * Only the listed keys are captured, so other query parameters (which may
1212
+ * hold personal data such as emails or tokens) are never recorded this
1213
+ * way. The default list contains UTM parameters only. A name ending in `*`
1214
+ * matches every parameter with that prefix (e.g. `'utm_*'`).
1215
+ *
1216
+ * Keys set with `setAttributes` win: capture never replaces or removes a
1217
+ * key the app set itself. `removeAttributes` removes a captured value
1218
+ * (a later landing with that parameter captures it again). Keys in the
1219
+ * namespaces the SDK sets itself (`highlight.*`, `launchdarkly.*`,
1220
+ * `session.*`, `context.contextKeys.*`) are ignored.
1221
+ *
1222
+ * A custom list replaces the default. Set to `false` or `[]` to turn
1223
+ * capture off.
1224
+ * @default ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content']
1225
+ * @example captureQueryParams: ['utm_source', 'utm_campaign', 'gclid']
1226
+ */
1227
+ captureQueryParams?: string[] | false;
1228
+ /**
1229
+ * Specifies whether to record the page that linked to this one. When the
1230
+ * SDK initializes and `document.referrer` is a different origin, it is
1231
+ * added as the `landing.referrer` attribute to all telemetry for the rest
1232
+ * of the page load, as if passed to `LDObserve.setAttributes`.
1233
+ *
1234
+ * Only the origin and path are kept: the query string, fragment and any
1235
+ * credentials are stripped so tokens or personal data in the referrer URL
1236
+ * are not recorded. An empty or same-origin referrer sets nothing, and
1237
+ * the value is not updated on SPA navigation.
1238
+ * @default true
1239
+ */
1240
+ captureReferrer?: boolean;
1192
1241
  };
1193
1242
 
1194
1243
  declare type OtelInstrumentatonOptions = {
package/dist/record.js CHANGED
@@ -1,5 +1,5 @@
1
- import "./common-1QcQF8EE.js";
2
- import { R as i } from "./record-Bgkzgi9x.js";
1
+ import "./common-C6gSg2Rq.js";
2
+ import { R as i } from "./record-BpTfYU5r.js";
3
3
  import "./LDRecord.js";
4
4
  import "./buffer-CwCRPuMA.js";
5
5
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@launchdarkly/o11y",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "Shared browser foundation for @launchdarkly/observability and @launchdarkly/session-replay. Capture frontend metrics, errors, logs, traces, and session replays.",
5
5
  "keywords": [
6
6
  "launchdarkly",