@sentienguard/apm 1.0.5 → 1.0.7
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/README.md +6 -1
- package/package.json +1 -1
- package/src/aggregator.js +463 -463
- package/src/browser/transport.js +22 -21
- package/src/browser.js +3 -2
- package/src/circuitBreaker.js +264 -254
- package/src/config.js +67 -61
- package/src/dependencies.js +231 -236
- package/src/index.js +225 -209
- package/src/instrumentation.js +208 -208
- package/src/normalizer.js +147 -147
- package/src/transport.js +215 -214
package/README.md
CHANGED
|
@@ -11,7 +11,10 @@ npm install @sentienguard/apm
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
13
|
```js
|
|
14
|
-
//
|
|
14
|
+
// If using dotenv, import it first
|
|
15
|
+
import 'dotenv/config';
|
|
16
|
+
|
|
17
|
+
// Then import the SDK (before other app modules for best instrumentation coverage)
|
|
15
18
|
import '@sentienguard/apm';
|
|
16
19
|
|
|
17
20
|
// Your app code
|
|
@@ -56,6 +59,7 @@ All configuration is via environment variables:
|
|
|
56
59
|
For better route extraction, add the middleware:
|
|
57
60
|
|
|
58
61
|
```js
|
|
62
|
+
import 'dotenv/config'; // if using dotenv
|
|
59
63
|
import '@sentienguard/apm';
|
|
60
64
|
import { expressMiddleware, expressErrorMiddleware } from '@sentienguard/apm';
|
|
61
65
|
import express from 'express';
|
|
@@ -75,6 +79,7 @@ app.use(expressErrorMiddleware());
|
|
|
75
79
|
### Fastify
|
|
76
80
|
|
|
77
81
|
```js
|
|
82
|
+
import 'dotenv/config'; // if using dotenv
|
|
78
83
|
import '@sentienguard/apm';
|
|
79
84
|
import { fastifyPlugin, fastifyErrorHandler } from '@sentienguard/apm';
|
|
80
85
|
import Fastify from 'fastify';
|