@ogcio/o11y-sdk-react 0.11.1 → 0.11.3

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 (44) hide show
  1. package/dist/sdk-core/lib/utils/data-structures.js +1 -0
  2. package/dist/sdk-core/lib/utils/data-structures.js.map +1 -1
  3. package/dist/sdk-core/lib/utils/geo-context.d.ts +29 -0
  4. package/dist/sdk-core/lib/utils/geo-context.d.ts.map +1 -0
  5. package/dist/sdk-core/lib/utils/geo-context.js +53 -0
  6. package/dist/sdk-core/lib/utils/geo-context.js.map +1 -0
  7. package/dist/sdk-core/lib/utils/geohash.d.ts +12 -0
  8. package/dist/sdk-core/lib/utils/geohash.d.ts.map +1 -0
  9. package/dist/sdk-core/lib/utils/geohash.js +53 -0
  10. package/dist/sdk-core/lib/utils/geohash.js.map +1 -0
  11. package/dist/sdk-core/lib/utils/index.d.ts +3 -0
  12. package/dist/sdk-core/lib/utils/index.d.ts.map +1 -1
  13. package/dist/sdk-core/lib/utils/index.js +2 -0
  14. package/dist/sdk-core/lib/utils/index.js.map +1 -1
  15. package/dist/sdk-react/index.d.ts +3 -1
  16. package/dist/sdk-react/index.d.ts.map +1 -1
  17. package/dist/sdk-react/index.js +2 -1
  18. package/dist/sdk-react/index.js.map +1 -1
  19. package/dist/sdk-react/lib/hooks/useFaro.d.ts +1 -1
  20. package/dist/sdk-react/lib/hooks/useFaro.d.ts.map +1 -1
  21. package/dist/sdk-react/lib/index.js +1 -0
  22. package/dist/sdk-react/lib/index.js.map +1 -1
  23. package/dist/sdk-react/lib/internals/hooks.js +1 -1
  24. package/dist/sdk-react/lib/internals/hooks.js.map +1 -1
  25. package/dist/sdk-react/lib/internals/redaction/redactors/index.d.ts.map +1 -1
  26. package/dist/sdk-react/lib/internals/redaction/redactors/index.js +5 -6
  27. package/dist/sdk-react/lib/internals/redaction/redactors/index.js.map +1 -1
  28. package/dist/sdk-react/lib/traces.js +1 -0
  29. package/dist/sdk-react/lib/traces.js.map +1 -1
  30. package/dist/sdk-react/lib/utils.d.ts +1 -1
  31. package/dist/sdk-react/lib/utils.d.ts.map +1 -1
  32. package/package.json +4 -4
  33. package/dist/sdk-react/lib/internals/redaction/redactors/email.d.ts +0 -6
  34. package/dist/sdk-react/lib/internals/redaction/redactors/email.d.ts.map +0 -1
  35. package/dist/sdk-react/lib/internals/redaction/redactors/email.js +0 -22
  36. package/dist/sdk-react/lib/internals/redaction/redactors/email.js.map +0 -1
  37. package/dist/sdk-react/lib/internals/redaction/redactors/ip.d.ts +0 -6
  38. package/dist/sdk-react/lib/internals/redaction/redactors/ip.d.ts.map +0 -1
  39. package/dist/sdk-react/lib/internals/redaction/redactors/ip.js +0 -23
  40. package/dist/sdk-react/lib/internals/redaction/redactors/ip.js.map +0 -1
  41. package/dist/sdk-react/lib/internals/redaction/redactors/ppsn.d.ts +0 -8
  42. package/dist/sdk-react/lib/internals/redaction/redactors/ppsn.d.ts.map +0 -1
  43. package/dist/sdk-react/lib/internals/redaction/redactors/ppsn.js +0 -21
  44. package/dist/sdk-react/lib/internals/redaction/redactors/ppsn.js.map +0 -1
@@ -1,4 +1,5 @@
1
1
  import { _containsEncodedComponents } from "./string-decoding.js";
2
+ import { BasicRedactor } from "../redaction/index.js";
2
3
  const decoder = new TextDecoder();
3
4
  const encoder = new TextEncoder();
4
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"data-structures.js","sourceRoot":"","sources":["../../../../../sdk-core/lib/utils/data-structures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAIlE,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAClC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAElC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,eAAe,CAC7B,KAAa,EACb,MAAS,EACT,SAA0B;IAE1B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B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CAAC;IACxB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { Context } from "@opentelemetry/api";
2
+ export declare const geoBaggageKeys: readonly ["geo.country", "geo.city", "geo.hash"];
3
+ type GeoKey = (typeof geoBaggageKeys)[number];
4
+ export type GeoAttributes = Partial<Record<GeoKey, string>>;
5
+ export type GeoInput = {
6
+ lat?: number;
7
+ lon?: number;
8
+ country?: string;
9
+ city?: string;
10
+ };
11
+ /**
12
+ * Returns geo attributes from the given OTel context's baggage.
13
+ * Use this in span and log processors where the context is passed explicitly.
14
+ */
15
+ export declare function getGeoAttributesFromContext(ctx: Context): GeoAttributes;
16
+ /**
17
+ * Returns geo attributes for the current request context.
18
+ * Reads from OTel Baggage on the active context, set by GeoBaggagePropagator.
19
+ * Use this to manually enrich custom spans, logs, or metrics when geo-enrichment is enabled.
20
+ */
21
+ export declare function getGeoAttributes(): GeoAttributes;
22
+ /**
23
+ * Builds geo attributes from any combination of geo inputs.
24
+ * A geohash is computed automatically when both `lat` and `lon` are provided.
25
+ * Use this to create geo attributes to attach to signals when auto-enrichment is not enabled.
26
+ */
27
+ export declare function createGeoAttributesFrom(input: GeoInput): GeoAttributes;
28
+ export {};
29
+ //# sourceMappingURL=geo-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo-context.d.ts","sourceRoot":"","sources":["../../../../../sdk-core/lib/utils/geo-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAGlD,eAAO,MAAM,cAAc,kDAAmD,CAAC;AAE/E,KAAK,MAAM,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAC9C,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAE5D,MAAM,MAAM,QAAQ,GAAG;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAcF;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,GAAG,EAAE,OAAO,GAAG,aAAa,CAEvE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,aAAa,CAEhD;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,QAAQ,GAAG,aAAa,CAgBtE"}
@@ -0,0 +1,53 @@
1
+ import { context, propagation } from "@opentelemetry/api";
2
+ import { encodeGeohash } from "./geohash.js";
3
+ export const geoBaggageKeys = ["geo.country", "geo.city", "geo.hash"];
4
+ function fromBaggage(baggage) {
5
+ if (!baggage)
6
+ return {};
7
+ const attrs = {};
8
+ for (const key of geoBaggageKeys) {
9
+ const value = baggage.getEntry(key)?.value;
10
+ if (value)
11
+ attrs[key] = value;
12
+ }
13
+ return attrs;
14
+ }
15
+ /**
16
+ * Returns geo attributes from the given OTel context's baggage.
17
+ * Use this in span and log processors where the context is passed explicitly.
18
+ */
19
+ export function getGeoAttributesFromContext(ctx) {
20
+ return fromBaggage(propagation.getBaggage(ctx));
21
+ }
22
+ /**
23
+ * Returns geo attributes for the current request context.
24
+ * Reads from OTel Baggage on the active context, set by GeoBaggagePropagator.
25
+ * Use this to manually enrich custom spans, logs, or metrics when geo-enrichment is enabled.
26
+ */
27
+ export function getGeoAttributes() {
28
+ return fromBaggage(propagation.getBaggage(context.active()));
29
+ }
30
+ /**
31
+ * Builds geo attributes from any combination of geo inputs.
32
+ * A geohash is computed automatically when both `lat` and `lon` are provided.
33
+ * Use this to create geo attributes to attach to signals when auto-enrichment is not enabled.
34
+ */
35
+ export function createGeoAttributesFrom(input) {
36
+ const attrs = {};
37
+ if (input.country)
38
+ attrs["geo.country"] = input.country;
39
+ if (input.city)
40
+ attrs["geo.city"] = input.city;
41
+ if (input.lat !== undefined &&
42
+ input.lon !== undefined &&
43
+ input.lat >= -90 &&
44
+ input.lat <= 90 &&
45
+ input.lon >= -180 &&
46
+ input.lon <= 180) {
47
+ const hash = encodeGeohash(input.lat, input.lon, 4);
48
+ if (hash)
49
+ attrs["geo.hash"] = hash;
50
+ }
51
+ return attrs;
52
+ }
53
+ //# sourceMappingURL=geo-context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo-context.js","sourceRoot":"","sources":["../../../../../sdk-core/lib/utils/geo-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,aAAa,EAAE,UAAU,EAAE,UAAU,CAAU,CAAC;AAY/E,SAAS,WAAW,CAClB,OAAkD;IAElD,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,MAAM,KAAK,GAAkB,EAAE,CAAC;IAChC,KAAK,MAAM,GAAG,IAAI,cAAc,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC;QAC3C,IAAI,KAAK;YAAE,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAChC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,2BAA2B,CAAC,GAAY;IACtD,OAAO,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAAe;IACrD,MAAM,KAAK,GAAkB,EAAE,CAAC;IAChC,IAAI,KAAK,CAAC,OAAO;QAAE,KAAK,CAAC,aAAa,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC;IACxD,IAAI,KAAK,CAAC,IAAI;QAAE,KAAK,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;IAC/C,IACE,KAAK,CAAC,GAAG,KAAK,SAAS;QACvB,KAAK,CAAC,GAAG,KAAK,SAAS;QACvB,KAAK,CAAC,GAAG,IAAI,CAAC,EAAE;QAChB,KAAK,CAAC,GAAG,IAAI,EAAE;QACf,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG;QACjB,KAAK,CAAC,GAAG,IAAI,GAAG,EAChB,CAAC;QACD,MAAM,IAAI,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACpD,IAAI,IAAI;YAAE,KAAK,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC;IACrC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Encode latitude and longitude into a geohash string.
3
+ * Alternates between longitude and latitude bits, bisects the coordinate range, accumulates 5 bits into an index into the BASE32 lookup table, and repeats until the desired precision is reached.
4
+ * See https://en.wikipedia.org/wiki/Geohash for algorithm details.
5
+ *
6
+ * @param lat Latitude (-90 to 90)
7
+ * @param lon Longitude (-180 to 180)
8
+ * @param precision Number of characters in the geohash (default: 4)
9
+ * @returns Geohash string of the given precision, or undefined if inputs are invalid
10
+ */
11
+ export declare function encodeGeohash(lat: number, lon: number, precision?: number): string | undefined;
12
+ //# sourceMappingURL=geohash.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geohash.d.ts","sourceRoot":"","sources":["../../../../../sdk-core/lib/utils/geohash.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,SAAS,GAAE,MAAU,GACpB,MAAM,GAAG,SAAS,CA0CpB"}
@@ -0,0 +1,53 @@
1
+ const BASE32 = "0123456789bcdefghjkmnpqrstuvwxyz";
2
+ /**
3
+ * Encode latitude and longitude into a geohash string.
4
+ * Alternates between longitude and latitude bits, bisects the coordinate range, accumulates 5 bits into an index into the BASE32 lookup table, and repeats until the desired precision is reached.
5
+ * See https://en.wikipedia.org/wiki/Geohash for algorithm details.
6
+ *
7
+ * @param lat Latitude (-90 to 90)
8
+ * @param lon Longitude (-180 to 180)
9
+ * @param precision Number of characters in the geohash (default: 4)
10
+ * @returns Geohash string of the given precision, or undefined if inputs are invalid
11
+ */
12
+ export function encodeGeohash(lat, lon, precision = 4) {
13
+ if (!Number.isFinite(lat) || !Number.isFinite(lon))
14
+ return undefined;
15
+ if (!Number.isInteger(precision) || precision < 1 || precision > 8)
16
+ return undefined;
17
+ if (lat < -90 || lat > 90 || lon < -180 || lon > 180)
18
+ return undefined;
19
+ let latMin = -90;
20
+ let latMax = 90;
21
+ let lonMin = -180;
22
+ let lonMax = 180;
23
+ let hash = "";
24
+ let bit = 0;
25
+ let ch = 0;
26
+ let isLon = true;
27
+ while (hash.length < precision) {
28
+ const mid = isLon ? (lonMin + lonMax) / 2 : (latMin + latMax) / 2;
29
+ const value = isLon ? lon : lat;
30
+ if (value >= mid) {
31
+ ch |= 1 << (4 - bit);
32
+ if (isLon)
33
+ lonMin = mid;
34
+ else
35
+ latMin = mid;
36
+ }
37
+ else {
38
+ if (isLon)
39
+ lonMax = mid;
40
+ else
41
+ latMax = mid;
42
+ }
43
+ isLon = !isLon;
44
+ bit++;
45
+ if (bit === 5) {
46
+ hash += BASE32[ch];
47
+ bit = 0;
48
+ ch = 0;
49
+ }
50
+ }
51
+ return hash;
52
+ }
53
+ //# sourceMappingURL=geohash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geohash.js","sourceRoot":"","sources":["../../../../../sdk-core/lib/utils/geohash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,CAAC,CAAC;YACrB,IAAI,KAAK;gBAAE,MAAM,GAAG,GAAG,CAAC;;gBACnB,MAAM,GAAG,GAAG,CAAC;QACpB,CAAC;aAAM,CAAC;YACN,IAAI,KAAK;gBAAE,MAAM,GAAG,GAAG,CAAC;;gBACnB,MAAM,GAAG,GAAG,CAAC;QACpB,CAAC;QAED,KAAK,GAAG,CAAC,KAAK,CAAC;QACf,GAAG,EAAE,CAAC;QAEN,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC;YACd,IAAI,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC;YACnB,GAAG,GAAG,CAAC,CAAC;YACR,EAAE,GAAG,CAAC,CAAC;QACT,CAAC;IACH,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,4 +1,7 @@
1
1
  export { _cleanStringPII, _recursiveObjectClean } from "./data-structures.js";
2
+ export { encodeGeohash } from "./geohash.js";
3
+ export { getGeoAttributes, getGeoAttributesFromContext, createGeoAttributesFrom, } from "./geo-context.js";
4
+ export type { GeoAttributes, GeoInput, geoBaggageKeys } from "./geo-context.js";
2
5
  export { _containsEncodedComponents } from "./string-decoding.js";
3
6
  export { selfContainedSpanHandlerGenerator } from "./traces.js";
4
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../sdk-core/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../sdk-core/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export { _cleanStringPII, _recursiveObjectClean } from "./data-structures.js";
2
+ export { encodeGeohash } from "./geohash.js";
3
+ export { getGeoAttributes, getGeoAttributesFromContext, createGeoAttributesFrom, } from "./geo-context.js";
2
4
  export { _containsEncodedComponents } from "./string-decoding.js";
3
5
  export { selfContainedSpanHandlerGenerator } from "./traces.js";
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../sdk-core/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../sdk-core/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC"}
@@ -2,8 +2,10 @@ import buildFaroInstrumentation from "./lib/instrumentation.faro.js";
2
2
  export * from "./lib/index.js";
3
3
  export * from "./lib/utils.js";
4
4
  export * from "./lib/traces.js";
5
+ export * from "../sdk-core/index.js";
5
6
  export { buildFaroInstrumentation as instrumentFaro };
6
7
  export type { Span, SpanStatus } from "@opentelemetry/api";
7
- export { SpanKind, SpanStatusCode, TraceFlags, Exception, } from "@opentelemetry/api";
8
+ export type { Exception } from "@opentelemetry/api";
9
+ export { SpanKind, SpanStatusCode, TraceFlags } from "@opentelemetry/api";
8
10
  export { withFaroErrorBoundary, withFaroProfiler, type Faro, } from "@grafana/faro-react";
9
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AAErE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,wBAAwB,IAAI,cAAc,EAAE,CAAC;AAEtD,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE3D,OAAO,EACL,QAAQ,EACR,cAAc,EACd,UAAU,EACV,SAAS,GACV,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,IAAI,GACV,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AAErE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AAErC,OAAO,EAAE,wBAAwB,IAAI,cAAc,EAAE,CAAC;AAEtD,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE3D,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1E,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,IAAI,GACV,MAAM,qBAAqB,CAAC"}
@@ -2,7 +2,8 @@ import buildFaroInstrumentation from "./lib/instrumentation.faro.js";
2
2
  export * from "./lib/index.js";
3
3
  export * from "./lib/utils.js";
4
4
  export * from "./lib/traces.js";
5
+ export * from "../sdk-core/index.js";
5
6
  export { buildFaroInstrumentation as instrumentFaro };
6
- export { SpanKind, SpanStatusCode, TraceFlags, } from "@opentelemetry/api";
7
+ export { SpanKind, SpanStatusCode, TraceFlags } from "@opentelemetry/api";
7
8
  export { withFaroErrorBoundary, withFaroProfiler, } from "@grafana/faro-react";
8
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AAErE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,wBAAwB,IAAI,cAAc,EAAE,CAAC;AAItD,OAAO,EACL,QAAQ,EACR,cAAc,EACd,UAAU,GAEX,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,qBAAqB,EACrB,gBAAgB,GAEjB,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AAErE,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AAErC,OAAO,EAAE,wBAAwB,IAAI,cAAc,EAAE,CAAC;AAKtD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE1E,OAAO,EACL,qBAAqB,EACrB,gBAAgB,GAEjB,MAAM,qBAAqB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { FaroSDKConfig } from "../../index.js";
1
+ import { type FaroSDKConfig } from "../../index.js";
2
2
  export declare const useFaro: ({ config }: {
3
3
  config: FaroSDKConfig;
4
4
  }) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useFaro.d.ts","sourceRoot":"","sources":["../../../../lib/hooks/useFaro.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAId,MAAM,gBAAgB,CAAC;AAGxB,eAAO,MAAM,OAAO,GAAI,YAAY;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,SAQ5D,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAMlD,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,WAAW,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,EACvC,UAAU;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,KAChC,KAAK,CAAC,EAMR,CAAC"}
1
+ {"version":3,"file":"useFaro.d.ts","sourceRoot":"","sources":["../../../../lib/hooks/useFaro.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAInB,MAAM,gBAAgB,CAAC;AAGxB,eAAO,MAAM,OAAO,GAAI,YAAY;IAAE,MAAM,EAAE,aAAa,CAAA;CAAE,SAQ5D,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAMlD,CAAC;AAEF,eAAO,MAAM,QAAQ,GACnB,WAAW,KAAK,CAAC,aAAa,CAAC,OAAO,CAAC,EACvC,UAAU;IAAE,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,KAChC,KAAK,CAAC,EAMR,CAAC"}
@@ -1,2 +1,3 @@
1
+ import { BasicRedactor } from "../../sdk-core/lib/redaction/basic-redactor.js";
1
2
  export * from "./hooks/index.js";
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":"AAqFA,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC;AAqF/E,cAAc,kBAAkB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { _recursiveObjectClean, } from "../../../sdk-core/index.js";
1
+ import { _recursiveObjectClean, BasicRedactor, } from "../../../sdk-core/index.js";
2
2
  export const _beforeSend = (redactors) => (item) => {
3
3
  if (redactors.length === 0) {
4
4
  return item;
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../lib/internals/hooks.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,GAEtB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,MAAM,WAAW,GACtB,CAAC,SAA0B,EAAE,EAAE,CAC/B,CAAoC,IAAO,EAAY,EAAE;IACvD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,qBAAqB,CAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAClE,CAAC,CAAC"}
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../../lib/internals/hooks.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,aAAa,GACd,MAAM,4BAA4B,CAAC;AAEpC,MAAM,CAAC,MAAM,WAAW,GACtB,CAAC,SAA0B,EAAE,EAAE,CAC/B,CAAoC,IAAO,EAAY,EAAE;IACvD,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,qBAAqB,CAAQ,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAClE,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../lib/internals/redaction/redactors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGvD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAGjE,MAAM,MAAM,YAAY,GAAG,MAAM,IAAI,CACnC,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,EACvC,QAAQ,CACT,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,CAIzD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../lib/internals/redaction/redactors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACL,aAAa,EAId,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,YAAY,GAAG,MAAM,IAAI,CACnC,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,EACvC,QAAQ,CACT,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,YAAY,EAAE,aAAa,CAIzD,CAAC"}
@@ -1,9 +1,8 @@
1
- import { EmailRedactorWithMetrics } from "./email.js";
2
- import { IpRedactorWithMetrics } from "./ip.js";
3
- import { PpsnRedactorWithMetrics } from "./ppsn.js";
1
+ import {} from "../../../index.js";
2
+ import { BasicRedactor, EmailRedactor, IpRedactor, PpsnRedactor, } from "../../../../../sdk-core/index.js";
4
3
  export const redactors = {
5
- email: new EmailRedactorWithMetrics(),
6
- ip: new IpRedactorWithMetrics(),
7
- ppsn: new PpsnRedactorWithMetrics(),
4
+ email: new EmailRedactor(),
5
+ ip: new IpRedactor(),
6
+ ppsn: new PpsnRedactor(),
8
7
  };
9
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../lib/internals/redaction/redactors/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEhD,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAOpD,MAAM,CAAC,MAAM,SAAS,GAAwC;IAC5D,KAAK,EAAE,IAAI,wBAAwB,EAAE;IACrC,EAAE,EAAE,IAAI,qBAAqB,EAAE;IAC/B,IAAI,EAAE,IAAI,uBAAuB,EAAE;CACpC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../lib/internals/redaction/redactors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,MAAM,mBAAmB,CAAC;AACvD,OAAO,EACL,aAAa,EACb,aAAa,EACb,UAAU,EACV,YAAY,GACb,MAAM,kCAAkC,CAAC;AAO1C,MAAM,CAAC,MAAM,SAAS,GAAwC;IAC5D,KAAK,EAAE,IAAI,aAAa,EAAE;IAC1B,EAAE,EAAE,IAAI,UAAU,EAAE;IACpB,IAAI,EAAE,IAAI,YAAY,EAAE;CACzB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { faro } from "@grafana/faro-react";
2
+ import {} from "@opentelemetry/api";
2
3
  import { selfContainedSpanHandlerGenerator } from "../../sdk-core/lib/utils/traces.js";
3
4
  /**
4
5
  * Wraps a callable `fn` in an OpenTelemetry span with the given name and options.
@@ -1 +1 @@
1
- {"version":3,"file":"traces.js","sourceRoot":"","sources":["../../../lib/traces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AAevF;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAI,EAC1B,SAAS,EACT,QAAQ,EACR,WAAW,GAAG,EAAE,EAChB,EAAE,GACgB;IAClB,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CACV,+GAA+G,CAChH,CAAC;QACF,OAAO,EAAE,CAAC,EAAU,CAAC,CAAC;IACxB,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IAChC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,CAAC,IAAI,CACV,2EAA2E,CAC5E,CAAC;QACF,OAAO,EAAE,CAAC,EAAU,CAAC,CAAC;IACxB,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CACjC,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,IAAI,gBAAgB,CAC5D,CAAC;IACF,OAAO,MAAM,CAAC,eAAe,CAC3B,QAAQ,EACR,WAAW,EACX,iCAAiC,CAAI,EAAE,CAAC,CACzC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"traces.js","sourceRoot":"","sources":["../../../lib/traces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAA+B,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AAevF;;;;;;;GAOG;AACH,MAAM,UAAU,QAAQ,CAAI,EAC1B,SAAS,EACT,QAAQ,EACR,WAAW,GAAG,EAAE,EAChB,EAAE,GACgB;IAClB,IAAI,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC;QACf,OAAO,CAAC,IAAI,CACV,+GAA+G,CAChH,CAAC;QACF,OAAO,EAAE,CAAC,EAAU,CAAC,CAAC;IACxB,CAAC;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;IAChC,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,CAAC,IAAI,CACV,2EAA2E,CAC5E,CAAC;QACF,OAAO,EAAE,CAAC,EAAU,CAAC,CAAC;IACxB,CAAC;IACD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CACjC,SAAS,IAAI,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,IAAI,gBAAgB,CAC5D,CAAC;IACF,OAAO,MAAM,CAAC,eAAe,CAC3B,QAAQ,EACR,WAAW,EACX,iCAAiC,CAAI,EAAE,CAAC,CACzC,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Faro } from "@grafana/faro-react";
1
+ import type { Faro } from "@grafana/faro-react";
2
2
  /**
3
3
  * Retrieves the current session ID from a provided Faro instance.
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE3C;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAE3D"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAEhD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,SAAS,CAE3D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ogcio/o11y-sdk-react",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
4
4
  "description": "Opentelemetry standard instrumentation SDK for React based project",
5
5
  "main": "dist/sdk-react/index.js",
6
6
  "types": "dist/sdk-react/index.d.ts",
@@ -36,14 +36,14 @@
36
36
  "@grafana/faro-core": "2.6.3",
37
37
  "@opentelemetry/sdk-trace-base": "2.7.1",
38
38
  "@testing-library/react": "16.3.2",
39
- "@types/node": "25.6.2",
39
+ "@types/node": "25.7.0",
40
40
  "@types/react": "19.2.14",
41
- "@vitest/coverage-v8": "4.1.5",
41
+ "@vitest/coverage-v8": "4.1.6",
42
42
  "happy-dom": "20.9.0",
43
43
  "react": "19.2.6",
44
44
  "react-dom": "19.2.6",
45
45
  "typescript": "6.0.3",
46
- "vitest": "4.1.5"
46
+ "vitest": "4.1.6"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": "^18.0.0 || ^19.0.0",
@@ -1,6 +0,0 @@
1
- import { EmailRedactor, type StringKind } from "../../../../../sdk-core/index.js";
2
- import type { TransportItemType } from "@grafana/faro-core";
3
- export declare class EmailRedactorWithMetrics extends EmailRedactor {
4
- protected exportMetrics(context: ReturnType<typeof this.redact>["context"], source: TransportItemType, kind: StringKind): void;
5
- }
6
- //# sourceMappingURL=email.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../../../../lib/internals/redaction/redactors/email.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,KAAK,UAAU,EAChB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,qBAAa,wBAAyB,SAAQ,aAAa;IACzD,SAAS,CAAC,aAAa,CACrB,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EAClD,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,UAAU,GACf,IAAI;CAoBR"}
@@ -1,22 +0,0 @@
1
- import { faro } from "@grafana/faro-web-sdk";
2
- import { EmailRedactor, } from "../../../../../sdk-core/index.js";
3
- export class EmailRedactorWithMetrics extends EmailRedactor {
4
- exportMetrics(context, source, kind) {
5
- for (const [domain, domainCount] of Object.entries(context.domains)) {
6
- faro.api.pushMeasurement({
7
- type: "faro_o11y_pii_redaction",
8
- values: {
9
- redacted: domainCount,
10
- },
11
- }, {
12
- context: {
13
- pii_type: "email",
14
- redaction_source: source,
15
- pii_email_domain: domain,
16
- pii_format: kind,
17
- },
18
- });
19
- }
20
- }
21
- }
22
- //# sourceMappingURL=email.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"email.js","sourceRoot":"","sources":["../../../../../../lib/internals/redaction/redactors/email.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EACL,aAAa,GAEd,MAAM,kCAAkC,CAAC;AAG1C,MAAM,OAAO,wBAAyB,SAAQ,aAAa;IAC/C,aAAa,CACrB,OAAkD,EAClD,MAAyB,EACzB,IAAgB;QAEhB,KAAK,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;YACpE,IAAI,CAAC,GAAG,CAAC,eAAe,CACtB;gBACE,IAAI,EAAE,yBAAyB;gBAC/B,MAAM,EAAE;oBACN,QAAQ,EAAE,WAAW;iBACtB;aACF,EACD;gBACE,OAAO,EAAE;oBACP,QAAQ,EAAE,OAAO;oBACjB,gBAAgB,EAAE,MAAM;oBACxB,gBAAgB,EAAE,MAAM;oBACxB,UAAU,EAAE,IAAI;iBACjB;aACF,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
@@ -1,6 +0,0 @@
1
- import { IpRedactor, type StringKind } from "../../../../../sdk-core/index.js";
2
- import type { TransportItemType } from "@grafana/faro-core";
3
- export declare class IpRedactorWithMetrics extends IpRedactor {
4
- protected exportMetrics(context: ReturnType<typeof this.redact>["context"], source: TransportItemType, kind: StringKind): void;
5
- }
6
- //# sourceMappingURL=ip.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ip.d.ts","sourceRoot":"","sources":["../../../../../../lib/internals/redaction/redactors/ip.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,qBAAa,qBAAsB,SAAQ,UAAU;IACnD,SAAS,CAAC,aAAa,CACrB,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,EAClD,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,UAAU,GACf,IAAI;CAqBR"}
@@ -1,23 +0,0 @@
1
- import { faro } from "@grafana/faro-web-sdk";
2
- import { IpRedactor } from "../../../../../sdk-core/index.js";
3
- export class IpRedactorWithMetrics extends IpRedactor {
4
- exportMetrics(context, source, kind) {
5
- Object.entries(context.counters).forEach(([type, counter]) => {
6
- if (counter > 0) {
7
- faro.api.pushMeasurement({
8
- type: "faro_o11y_pii_redaction",
9
- values: {
10
- redacted: counter,
11
- },
12
- }, {
13
- context: {
14
- pii_type: type,
15
- redaction_source: source,
16
- pii_format: kind,
17
- },
18
- });
19
- }
20
- });
21
- }
22
- }
23
- //# sourceMappingURL=ip.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ip.js","sourceRoot":"","sources":["../../../../../../lib/internals/redaction/redactors/ip.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAmB,MAAM,kCAAkC,CAAC;AAG/E,MAAM,OAAO,qBAAsB,SAAQ,UAAU;IACzC,aAAa,CACrB,OAAkD,EAClD,MAAyB,EACzB,IAAgB;QAEhB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,EAAE;YAC3D,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;gBAChB,IAAI,CAAC,GAAG,CAAC,eAAe,CACtB;oBACE,IAAI,EAAE,yBAAyB;oBAC/B,MAAM,EAAE;wBACN,QAAQ,EAAE,OAAO;qBAClB;iBACF,EACD;oBACE,OAAO,EAAE;wBACP,QAAQ,EAAE,IAAI;wBACd,gBAAgB,EAAE,MAAM;wBACxB,UAAU,EAAE,IAAI;qBACjB;iBACF,CACF,CAAC;YACJ,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,8 +0,0 @@
1
- import { PpsnRedactor, type StringKind } from "../../../../../sdk-core/index.js";
2
- import type { TransportItemType } from "@grafana/faro-core";
3
- export declare class PpsnRedactorWithMetrics extends PpsnRedactor {
4
- protected exportMetrics(context: {
5
- redactedCounter: number;
6
- }, source: TransportItemType, kind: StringKind): void;
7
- }
8
- //# sourceMappingURL=ppsn.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ppsn.d.ts","sourceRoot":"","sources":["../../../../../../lib/internals/redaction/redactors/ppsn.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,KAAK,UAAU,EAChB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAE5D,qBAAa,uBAAwB,SAAQ,YAAY;IACvD,SAAS,CAAC,aAAa,CACrB,OAAO,EAAE;QAAE,eAAe,EAAE,MAAM,CAAA;KAAE,EACpC,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,UAAU,GACf,IAAI;CAmBR"}
@@ -1,21 +0,0 @@
1
- import { faro } from "@grafana/faro-web-sdk";
2
- import { PpsnRedactor, } from "../../../../../sdk-core/index.js";
3
- export class PpsnRedactorWithMetrics extends PpsnRedactor {
4
- exportMetrics(context, source, kind) {
5
- if (context.redactedCounter > 0) {
6
- faro.api.pushMeasurement({
7
- type: "faro_o11y_pii_redaction",
8
- values: {
9
- redacted: context.redactedCounter,
10
- },
11
- }, {
12
- context: {
13
- pii_type: "ppsn",
14
- redaction_source: source,
15
- pii_format: kind,
16
- },
17
- });
18
- }
19
- }
20
- }
21
- //# sourceMappingURL=ppsn.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ppsn.js","sourceRoot":"","sources":["../../../../../../lib/internals/redaction/redactors/ppsn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EACL,YAAY,GAEb,MAAM,kCAAkC,CAAC;AAG1C,MAAM,OAAO,uBAAwB,SAAQ,YAAY;IAC7C,aAAa,CACrB,OAAoC,EACpC,MAAyB,EACzB,IAAgB;QAEhB,IAAI,OAAO,CAAC,eAAe,GAAG,CAAC,EAAE,CAAC;YAChC,IAAI,CAAC,GAAG,CAAC,eAAe,CACtB;gBACE,IAAI,EAAE,yBAAyB;gBAC/B,MAAM,EAAE;oBACN,QAAQ,EAAE,OAAO,CAAC,eAAe;iBAClC;aACF,EACD;gBACE,OAAO,EAAE;oBACP,QAAQ,EAAE,MAAM;oBAChB,gBAAgB,EAAE,MAAM;oBACxB,UAAU,EAAE,IAAI;iBACjB;aACF,CACF,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}