@vtex/api 6.45.20-beta → 6.45.21-beta

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/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [6.45.21-beta] - 2023-09-04
11
+
12
+ ## [6.45.20] - 2023-08-30
13
+ ### Changed
14
+ - Remove sampling decision from runtime
15
+ - Only create tracing spans when they come from router
16
+
10
17
  ## [6.45.20-beta] - 2023-08-30
11
18
 
12
19
  ## [6.45.19] - 2023-07-12
@@ -1771,9 +1778,11 @@ instead
1771
1778
  - `HttpClient` now adds `'Accept-Encoding': 'gzip'` header by default.
1772
1779
 
1773
1780
 
1774
- [Unreleased]: https://github.com/vtex/node-vtex-api/compare/v6.45.20-beta...HEAD
1781
+ [Unreleased]: https://github.com/vtex/node-vtex-api/compare/v6.45.21-beta...HEAD
1775
1782
  [6.45.15]: https://github.com/vtex/node-vtex-api/compare/v6.45.14...v6.45.15
1776
1783
  [6.45.14]: https://github.com/vtex/node-vtex-api/compare/v6.45.13...v6.45.14
1777
1784
  [6.45.13]: https://github.com/vtex/node-vtex-api/compare/v6.45.12...v6.45.13
1778
1785
 
1779
- [6.45.20-beta]: https://github.com/vtex/node-vtex-api/compare/v6.45.19...v6.45.20-beta
1786
+ [6.45.21-beta]: https://github.com/vtex/node-vtex-api/compare/v6.45.20...v6.45.21-beta
1787
+ [6.45.20]: https://github.com/vtex/node-vtex-api/compare/v6.45.20-beta...v6.45.20
1788
+ [6.45.20-beta]: https://github.com/vtex/node-vtex-api/compare/v6.45.19...v6.45.20-beta
@@ -118,6 +118,10 @@ exports.traceUserLandRemainingPipelineMiddleware = () => {
118
118
  };
119
119
  };
120
120
  function shouldTrace(ctx, rootSpan) {
121
- // Should trace if path isnt blacklisted and tracing decision came from the edge
122
- return !PATHS_BLACKLISTED_FOR_TRACING.includes(ctx.request.path) && rootSpan != null;
121
+ var _a, _b, _c;
122
+ /** Should trace if path isnt blacklisted and sampling decision came from the edge
123
+ * ((rootSpan as any).isSampled. returns whether or not this span context was sampled
124
+ * There is a cast to bypass opentracing typescript
125
+ */
126
+ return !PATHS_BLACKLISTED_FOR_TRACING.includes(ctx.request.path) && ((_c = (_b = (_a = rootSpan).isSampled) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : false);
123
127
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/api",
3
- "version": "6.45.20-beta",
3
+ "version": "6.45.21-beta",
4
4
  "description": "VTEX I/O API client",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",