@vtex/api 6.45.18 → 6.45.20-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
|
@@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [6.45.20-beta] - 2023-08-30
|
|
11
|
+
|
|
12
|
+
## [6.45.19] - 2023-07-12
|
|
13
|
+
### Changed
|
|
14
|
+
- Bump `graphql-upload` version
|
|
15
|
+
|
|
16
|
+
## [6.45.18] - 2023-07-07
|
|
9
17
|
### Fixed
|
|
10
18
|
- Metrics to prometheus
|
|
11
19
|
|
|
@@ -1763,7 +1771,9 @@ instead
|
|
|
1763
1771
|
- `HttpClient` now adds `'Accept-Encoding': 'gzip'` header by default.
|
|
1764
1772
|
|
|
1765
1773
|
|
|
1766
|
-
[Unreleased]: https://github.com/vtex/node-vtex-api/compare/v6.45.
|
|
1774
|
+
[Unreleased]: https://github.com/vtex/node-vtex-api/compare/v6.45.20-beta...HEAD
|
|
1767
1775
|
[6.45.15]: https://github.com/vtex/node-vtex-api/compare/v6.45.14...v6.45.15
|
|
1768
1776
|
[6.45.14]: https://github.com/vtex/node-vtex-api/compare/v6.45.13...v6.45.14
|
|
1769
1777
|
[6.45.13]: https://github.com/vtex/node-vtex-api/compare/v6.45.12...v6.45.13
|
|
1778
|
+
|
|
1779
|
+
[6.45.20-beta]: https://github.com/vtex/node-vtex-api/compare/v6.45.19...v6.45.20-beta
|
|
@@ -30,12 +30,6 @@ class TracerSingleton {
|
|
|
30
30
|
reporter: {
|
|
31
31
|
agentHost: process.env.VTEX_OWN_NODE_IP,
|
|
32
32
|
},
|
|
33
|
-
sampler: {
|
|
34
|
-
host: process.env.VTEX_OWN_NODE_IP,
|
|
35
|
-
param: 0.05,
|
|
36
|
-
refreshIntervalMs: 60 * 1000,
|
|
37
|
-
type: 'remote',
|
|
38
|
-
},
|
|
39
33
|
serviceName,
|
|
40
34
|
};
|
|
41
35
|
const options = {
|
|
@@ -19,12 +19,12 @@ exports.addTracingMiddleware = (tracer) => {
|
|
|
19
19
|
var _a;
|
|
20
20
|
const start = process.hrtime();
|
|
21
21
|
concurrentRequests.inc(1);
|
|
22
|
-
|
|
22
|
+
const rootSpan = tracer.extract(opentracing_1.FORMAT_HTTP_HEADERS, ctx.request.headers);
|
|
23
|
+
if (!shouldTrace(ctx, rootSpan)) {
|
|
23
24
|
await next();
|
|
24
25
|
concurrentRequests.dec(1);
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
|
-
const rootSpan = tracer.extract(opentracing_1.FORMAT_HTTP_HEADERS, ctx.request.headers);
|
|
28
28
|
const currentSpan = tracer.startSpan('unknown-operation', {
|
|
29
29
|
childOf: rootSpan,
|
|
30
30
|
tags: { [Tags_1.OpentracingTags.SPAN_KIND]: Tags_1.OpentracingTags.SPAN_KIND_RPC_SERVER },
|
|
@@ -117,3 +117,7 @@ exports.traceUserLandRemainingPipelineMiddleware = () => {
|
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
119
|
};
|
|
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;
|
|
123
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtex/api",
|
|
3
|
-
"version": "6.45.
|
|
3
|
+
"version": "6.45.20-beta",
|
|
4
4
|
"description": "VTEX I/O API client",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"fs-extra": "^7.0.0",
|
|
66
66
|
"graphql": "^14.5.8",
|
|
67
67
|
"graphql-tools": "^4.0.6",
|
|
68
|
-
"graphql-upload": "^
|
|
68
|
+
"graphql-upload": "^13.0.0",
|
|
69
69
|
"jaeger-client": "^3.18.0",
|
|
70
70
|
"js-base64": "^2.5.1",
|
|
71
71
|
"koa": "^2.11.0",
|