@commercetools/ts-sdk-apm 2.0.0 → 3.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @commercetools/ts-sdk-apm
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#896](https://github.com/commercetools/commercetools-sdk-typescript/pull/896) [`f9b8cb6`](https://github.com/commercetools/commercetools-sdk-typescript/commit/f9b8cb605d99fe5ece13bdc3c152eb4818e19b3b) Thanks [@lojzatran](https://github.com/lojzatran)! - Remove support of nodejs 16
8
+
3
9
  ## 2.0.0
4
10
 
5
11
  ### Major Changes
package/README.md CHANGED
@@ -63,12 +63,9 @@ Example
63
63
  const telemetryOptions = {
64
64
  createTelemetryMiddleware, // coming from the `@commercetools/ts-sdk-apm or a custom implementation
65
65
  tracer: () =>
66
- require(require('path').join(
67
- __dirname,
68
- '..',
69
- '..',
70
- 'custom-telemetry-module.js'
71
- )), // make sure the require takes in an absolute path to the custom tracer module.
66
+ require(
67
+ require('path').join(__dirname, '..', '..', 'custom-telemetry-module.js')
68
+ ), // make sure the require takes in an absolute path to the custom tracer module.
72
69
  }
73
70
  ```
74
71
 
@@ -20,10 +20,10 @@ function createTelemetryMiddleware(options) {
20
20
  // trace
21
21
  function trace() {
22
22
  // validate apm and tracer
23
- if (!(options !== null && options !== void 0 && options.apm && typeof options.apm == 'function')) {
23
+ if (!(options?.apm && typeof options.apm == 'function')) {
24
24
  options.apm = defaultOptions.apm;
25
25
  }
26
- if (!(options !== null && options !== void 0 && options.tracer && typeof options.tracer == 'function')) {
26
+ if (!(options?.tracer && typeof options.tracer == 'function')) {
27
27
  options.tracer = defaultOptions.tracer;
28
28
  }
29
29
  options.apm();
@@ -16,10 +16,10 @@ function createTelemetryMiddleware(options) {
16
16
  // trace
17
17
  function trace() {
18
18
  // validate apm and tracer
19
- if (!(options !== null && options !== void 0 && options.apm && typeof options.apm == 'function')) {
19
+ if (!(options?.apm && typeof options.apm == 'function')) {
20
20
  options.apm = defaultOptions.apm;
21
21
  }
22
- if (!(options !== null && options !== void 0 && options.tracer && typeof options.tracer == 'function')) {
22
+ if (!(options?.tracer && typeof options.tracer == 'function')) {
23
23
  options.tracer = defaultOptions.tracer;
24
24
  }
25
25
  options.apm();
@@ -1,2 +1,2 @@
1
- export * from "./declarations/src/index";
2
- //# sourceMappingURL=commercetools-ts-sdk-apm.cjs.d.ts.map
1
+ export * from "./declarations/src/index.js";
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy10cy1zZGstYXBtLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi9kZWNsYXJhdGlvbnMvc3JjL2luZGV4LmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
@@ -20,10 +20,10 @@ function createTelemetryMiddleware(options) {
20
20
  // trace
21
21
  function trace() {
22
22
  // validate apm and tracer
23
- if (!(options !== null && options !== void 0 && options.apm && typeof options.apm == 'function')) {
23
+ if (!(options?.apm && typeof options.apm == 'function')) {
24
24
  options.apm = defaultOptions.apm;
25
25
  }
26
- if (!(options !== null && options !== void 0 && options.tracer && typeof options.tracer == 'function')) {
26
+ if (!(options?.tracer && typeof options.tracer == 'function')) {
27
27
  options.tracer = defaultOptions.tracer;
28
28
  }
29
29
  options.apm();
@@ -20,10 +20,10 @@ function createTelemetryMiddleware(options) {
20
20
  // trace
21
21
  function trace() {
22
22
  // validate apm and tracer
23
- if (!(options !== null && options !== void 0 && options.apm && typeof options.apm == 'function')) {
23
+ if (!(options?.apm && typeof options.apm == 'function')) {
24
24
  options.apm = defaultOptions.apm;
25
25
  }
26
- if (!(options !== null && options !== void 0 && options.tracer && typeof options.tracer == 'function')) {
26
+ if (!(options?.tracer && typeof options.tracer == 'function')) {
27
27
  options.tracer = defaultOptions.tracer;
28
28
  }
29
29
  options.apm();
@@ -16,10 +16,10 @@ function createTelemetryMiddleware(options) {
16
16
  // trace
17
17
  function trace() {
18
18
  // validate apm and tracer
19
- if (!(options !== null && options !== void 0 && options.apm && typeof options.apm == 'function')) {
19
+ if (!(options?.apm && typeof options.apm == 'function')) {
20
20
  options.apm = defaultOptions.apm;
21
21
  }
22
- if (!(options !== null && options !== void 0 && options.tracer && typeof options.tracer == 'function')) {
22
+ if (!(options?.tracer && typeof options.tracer == 'function')) {
23
23
  options.tracer = defaultOptions.tracer;
24
24
  }
25
25
  options.apm();
@@ -1,2 +1,3 @@
1
1
  import type { Middleware, OTelemetryMiddlewareOptions } from "../types/types.js";
2
2
  export default function createTelemetryMiddleware(options: OTelemetryMiddlewareOptions): Middleware;
3
+ //# sourceMappingURL=apm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apm.d.ts","sourceRoot":"../../../src","sources":["apm.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAIV,2BAA2B,EAC5B,0BAAsB;AAiBvB,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAC/C,OAAO,EAAE,2BAA2B,GACnC,UAAU,CA0BZ"}
@@ -1,2 +1,3 @@
1
1
  export * from "../types/types.js";
2
2
  export { default as createTelemetryMiddleware } from "./apm.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"../../../src","sources":["index.ts"],"names":[],"mappings":"AAAA,kCAAgC;AAChC,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,iBAAa"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools/ts-sdk-apm",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
4
  "description": "commercetools typescript SDK application performance monitoring.",
5
5
  "main": "dist/commercetools-ts-sdk-apm.cjs.js",
6
6
  "module": "dist/commercetools-ts-sdk-apm.esm.js",
@@ -9,16 +9,16 @@
9
9
  "private": false,
10
10
  "dependencies": {
11
11
  "@opentelemetry/api": "^1.4.1",
12
- "@opentelemetry/auto-instrumentations-node": "^0.38.0",
13
- "@opentelemetry/exporter-metrics-otlp-http": "^0.41.0",
14
- "@opentelemetry/sdk-node": "^0.41.0",
15
- "uuid": "9.0.0"
12
+ "@opentelemetry/auto-instrumentations-node": "^0.52.0",
13
+ "@opentelemetry/exporter-metrics-otlp-http": "^0.54.0",
14
+ "@opentelemetry/sdk-node": "^0.54.0",
15
+ "uuid": "11.0.3"
16
16
  },
17
17
  "publishConfig": {
18
18
  "access": "public"
19
19
  },
20
20
  "engines": {
21
- "node": ">=14"
21
+ "node": ">=18"
22
22
  },
23
23
  "keywords": [
24
24
  "commercetools",
@@ -1 +0,0 @@
1
- {"version":3,"file":"commercetools-ts-sdk-apm.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}