@grafana/faro-web-tracing 2.3.1 → 2.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.
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getSamplingDecision = getSamplingDecision;
4
- var sdk_trace_web_1 = require("@opentelemetry/sdk-trace-web");
5
- function getSamplingDecision(sessionMeta) {
4
+ const sdk_trace_web_1 = require("@opentelemetry/sdk-trace-web");
5
+ function getSamplingDecision(sessionMeta = {}) {
6
6
  var _a;
7
- if (sessionMeta === void 0) { sessionMeta = {}; }
8
- var isSessionSampled = ((_a = sessionMeta.attributes) === null || _a === void 0 ? void 0 : _a['isSampled']) === 'true';
9
- var samplingDecision = isSessionSampled ? sdk_trace_web_1.SamplingDecision.RECORD_AND_SAMPLED : sdk_trace_web_1.SamplingDecision.NOT_RECORD;
7
+ const isSessionSampled = ((_a = sessionMeta.attributes) === null || _a === void 0 ? void 0 : _a['isSampled']) === 'true';
8
+ const samplingDecision = isSessionSampled ? sdk_trace_web_1.SamplingDecision.RECORD_AND_SAMPLED : sdk_trace_web_1.SamplingDecision.NOT_RECORD;
10
9
  return samplingDecision;
11
10
  }
12
11
  //# sourceMappingURL=sampler.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sampler.js","sourceRoot":"","sources":["../../src/sampler.ts"],"names":[],"mappings":";;AAIA,kDAKC;AATD,8DAAgE;AAIhE,SAAgB,mBAAmB,CAAC,WAA6B;;IAA7B,4BAAA,EAAA,gBAA6B;IAC/D,IAAM,gBAAgB,GAAG,CAAA,MAAA,WAAW,CAAC,UAAU,0CAAG,WAAW,CAAC,MAAK,MAAM,CAAC;IAC1E,IAAM,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,gCAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC,gCAAgB,CAAC,UAAU,CAAC;IAE9G,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["import { SamplingDecision } from '@opentelemetry/sdk-trace-web';\n\nimport type { MetaSession } from '@grafana/faro-web-sdk';\n\nexport function getSamplingDecision(sessionMeta: MetaSession = {}): SamplingDecision {\n const isSessionSampled = sessionMeta.attributes?.['isSampled'] === 'true';\n const samplingDecision = isSessionSampled ? SamplingDecision.RECORD_AND_SAMPLED : SamplingDecision.NOT_RECORD;\n\n return samplingDecision;\n}\n"]}
1
+ {"version":3,"file":"sampler.js","sourceRoot":"","sources":["../../src/sampler.ts"],"names":[],"mappings":";;AAIA,kDAKC;AATD,gEAAgE;AAIhE,SAAgB,mBAAmB,CAAC,cAA2B,EAAE;;IAC/D,MAAM,gBAAgB,GAAG,CAAA,MAAA,WAAW,CAAC,UAAU,0CAAG,WAAW,CAAC,MAAK,MAAM,CAAC;IAC1E,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,CAAC,CAAC,gCAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC,gCAAgB,CAAC,UAAU,CAAC;IAE9G,OAAO,gBAAgB,CAAC;AAC1B,CAAC","sourcesContent":["import { SamplingDecision } from '@opentelemetry/sdk-trace-web';\n\nimport type { MetaSession } from '@grafana/faro-web-sdk';\n\nexport function getSamplingDecision(sessionMeta: MetaSession = {}): SamplingDecision {\n const isSessionSampled = sessionMeta.attributes?.['isSampled'] === 'true';\n const samplingDecision = isSessionSampled ? SamplingDecision.RECORD_AND_SAMPLED : SamplingDecision.NOT_RECORD;\n\n return samplingDecision;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/faro-web-tracing",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Faro web tracing implementation.",
5
5
  "keywords": [
6
6
  "observability",
@@ -55,14 +55,14 @@
55
55
  "quality:circular-deps": "madge --circular ."
56
56
  },
57
57
  "dependencies": {
58
- "@grafana/faro-web-sdk": "^2.3.1",
58
+ "@grafana/faro-web-sdk": "^2.4.0",
59
59
  "@opentelemetry/api": "^1.9.0",
60
60
  "@opentelemetry/core": "^2.0.0",
61
- "@opentelemetry/exporter-trace-otlp-http": "^0.213.0",
62
- "@opentelemetry/instrumentation": "^0.213.0",
63
- "@opentelemetry/instrumentation-fetch": "^0.213.0",
64
- "@opentelemetry/instrumentation-xml-http-request": "^0.213.0",
65
- "@opentelemetry/otlp-transformer": "^0.213.0",
61
+ "@opentelemetry/exporter-trace-otlp-http": "^0.215.0",
62
+ "@opentelemetry/instrumentation": "^0.215.0",
63
+ "@opentelemetry/instrumentation-fetch": "^0.215.0",
64
+ "@opentelemetry/instrumentation-xml-http-request": "^0.215.0",
65
+ "@opentelemetry/otlp-transformer": "^0.215.0",
66
66
  "@opentelemetry/resources": "^2.0.0",
67
67
  "@opentelemetry/sdk-trace-web": "^2.0.0",
68
68
  "@opentelemetry/semantic-conventions": "^1.32.0"
@@ -70,5 +70,5 @@
70
70
  "publishConfig": {
71
71
  "access": "public"
72
72
  },
73
- "gitHead": "ad85e008b4e2e50398bf0bb12cdcad03dd996101"
73
+ "gitHead": "0dcca81629cfc20cb18c6a7306209dceccdc75c8"
74
74
  }