@commercetools/ts-sdk-apm 1.0.2 → 2.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 +8 -0
- package/dist/commercetools-ts-sdk-apm.browser.cjs.js +7 -1
- package/dist/commercetools-ts-sdk-apm.browser.esm.js +7 -1
- package/dist/commercetools-ts-sdk-apm.cjs.dev.js +7 -1
- package/dist/commercetools-ts-sdk-apm.cjs.prod.js +7 -1
- package/dist/commercetools-ts-sdk-apm.esm.js +7 -1
- package/dist/declarations/types/types.d.ts +3 -2
- package/package.json +1 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @commercetools/ts-sdk-apm
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#564](https://github.com/commercetools/commercetools-sdk-typescript/pull/564) [`db69db1`](https://github.com/commercetools/commercetools-sdk-typescript/commit/db69db1f2a1f6ca69858c272f3905b96b6180bd2) Thanks [@ajimae](https://github.com/ajimae)! - - remove newrelic as dependency in `@commercetools/ts-sdk-apm` package
|
|
8
|
+
- add useragent key with a default `typescript-sdk-apm-middleware` string
|
|
9
|
+
- add example express app on how to add `dynatrace` monitoring in the ts sdk
|
|
10
|
+
|
|
3
11
|
## 1.0.2
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -7,7 +7,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
* opentelemetry tracer modules
|
|
8
8
|
*/
|
|
9
9
|
const defaultOptions = {
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* if this is to be used with newrelic, then
|
|
12
|
+
* pass this (apm) as an option in the `createTelemetryMiddleware`
|
|
13
|
+
* function e.g createTelemetryMiddleware({ apm: () => require('newrelic'), ... })
|
|
14
|
+
* Note: don't forget to install newrelic agent in your project `yarn add newrelic`
|
|
15
|
+
*/
|
|
16
|
+
apm: () => {},
|
|
11
17
|
tracer: () => require('../opentelemetry')
|
|
12
18
|
};
|
|
13
19
|
function createTelemetryMiddleware(options) {
|
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
* opentelemetry tracer modules
|
|
4
4
|
*/
|
|
5
5
|
const defaultOptions = {
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* if this is to be used with newrelic, then
|
|
8
|
+
* pass this (apm) as an option in the `createTelemetryMiddleware`
|
|
9
|
+
* function e.g createTelemetryMiddleware({ apm: () => require('newrelic'), ... })
|
|
10
|
+
* Note: don't forget to install newrelic agent in your project `yarn add newrelic`
|
|
11
|
+
*/
|
|
12
|
+
apm: () => {},
|
|
7
13
|
tracer: () => require('../opentelemetry')
|
|
8
14
|
};
|
|
9
15
|
function createTelemetryMiddleware(options) {
|
|
@@ -7,7 +7,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
* opentelemetry tracer modules
|
|
8
8
|
*/
|
|
9
9
|
const defaultOptions = {
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* if this is to be used with newrelic, then
|
|
12
|
+
* pass this (apm) as an option in the `createTelemetryMiddleware`
|
|
13
|
+
* function e.g createTelemetryMiddleware({ apm: () => require('newrelic'), ... })
|
|
14
|
+
* Note: don't forget to install newrelic agent in your project `yarn add newrelic`
|
|
15
|
+
*/
|
|
16
|
+
apm: () => {},
|
|
11
17
|
tracer: () => require('../opentelemetry')
|
|
12
18
|
};
|
|
13
19
|
function createTelemetryMiddleware(options) {
|
|
@@ -7,7 +7,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
7
7
|
* opentelemetry tracer modules
|
|
8
8
|
*/
|
|
9
9
|
const defaultOptions = {
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* if this is to be used with newrelic, then
|
|
12
|
+
* pass this (apm) as an option in the `createTelemetryMiddleware`
|
|
13
|
+
* function e.g createTelemetryMiddleware({ apm: () => require('newrelic'), ... })
|
|
14
|
+
* Note: don't forget to install newrelic agent in your project `yarn add newrelic`
|
|
15
|
+
*/
|
|
16
|
+
apm: () => {},
|
|
11
17
|
tracer: () => require('../opentelemetry')
|
|
12
18
|
};
|
|
13
19
|
function createTelemetryMiddleware(options) {
|
|
@@ -3,7 +3,13 @@
|
|
|
3
3
|
* opentelemetry tracer modules
|
|
4
4
|
*/
|
|
5
5
|
const defaultOptions = {
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* if this is to be used with newrelic, then
|
|
8
|
+
* pass this (apm) as an option in the `createTelemetryMiddleware`
|
|
9
|
+
* function e.g createTelemetryMiddleware({ apm: () => require('newrelic'), ... })
|
|
10
|
+
* Note: don't forget to install newrelic agent in your project `yarn add newrelic`
|
|
11
|
+
*/
|
|
12
|
+
apm: () => {},
|
|
7
13
|
tracer: () => require('../opentelemetry')
|
|
8
14
|
};
|
|
9
15
|
function createTelemetryMiddleware(options) {
|
|
@@ -95,8 +95,9 @@ export type MethodType =
|
|
|
95
95
|
| 'UNSUBSCRIBE'
|
|
96
96
|
|
|
97
97
|
export type TelemetryMiddlewareOptions = {
|
|
98
|
-
apm?: Function
|
|
99
|
-
tracer?: Function
|
|
98
|
+
apm?: Function;
|
|
99
|
+
tracer?: Function;
|
|
100
|
+
userAgent?: string;
|
|
100
101
|
createTelemetryMiddleware: (options?: OTelemetryMiddlewareOptions) => Middleware
|
|
101
102
|
}
|
|
102
103
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools/ts-sdk-apm",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.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",
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
"@opentelemetry/auto-instrumentations-node": "^0.38.0",
|
|
13
13
|
"@opentelemetry/exporter-metrics-otlp-http": "^0.41.0",
|
|
14
14
|
"@opentelemetry/sdk-node": "^0.41.0",
|
|
15
|
-
"newrelic": "^10.0.0",
|
|
16
15
|
"uuid": "9.0.0"
|
|
17
16
|
},
|
|
18
17
|
"publishConfig": {
|