@alwaysmeticulous/backend-recorder-launcher 2.298.0 → 2.300.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/README.md +16 -13
- package/dist/auto-init.d.ts +1 -0
- package/dist/auto-init.d.ts.map +1 -0
- package/dist/auto-init.js +2 -2
- package/dist/auto-init.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/LICENSE +0 -15
package/README.md
CHANGED
|
@@ -13,7 +13,9 @@ npm install @alwaysmeticulous/backend-recorder-launcher
|
|
|
13
13
|
Create or update your `instrumentation.js` (or `instrumentation.ts`) file at the root of your project:
|
|
14
14
|
|
|
15
15
|
```js
|
|
16
|
-
const {
|
|
16
|
+
const {
|
|
17
|
+
initBackendRecorder,
|
|
18
|
+
} = require("@alwaysmeticulous/backend-recorder-launcher");
|
|
17
19
|
|
|
18
20
|
initBackendRecorder({
|
|
19
21
|
recordingToken: process.env.METICULOUS_RECORDING_TOKEN,
|
|
@@ -31,9 +33,8 @@ If you are using Next.js, add the instrumentation hook in `instrumentation.ts`:
|
|
|
31
33
|
```ts
|
|
32
34
|
export async function register() {
|
|
33
35
|
if (process.env.NEXT_RUNTIME === "nodejs") {
|
|
34
|
-
const { initBackendRecorder } =
|
|
35
|
-
"@alwaysmeticulous/backend-recorder-launcher"
|
|
36
|
-
);
|
|
36
|
+
const { initBackendRecorder } =
|
|
37
|
+
await import("@alwaysmeticulous/backend-recorder-launcher");
|
|
37
38
|
await initBackendRecorder({
|
|
38
39
|
recordingToken: process.env.METICULOUS_RECORDING_TOKEN,
|
|
39
40
|
});
|
|
@@ -55,21 +56,23 @@ The auto-init entry point reads configuration from environment variables.
|
|
|
55
56
|
|
|
56
57
|
`initBackendRecorder` accepts an optional `BackendRecorderConfig` object:
|
|
57
58
|
|
|
58
|
-
| Option
|
|
59
|
-
|
|
60
|
-
| `enabled`
|
|
61
|
-
| `meticulousProjectName
|
|
62
|
-
| `recordingToken`
|
|
63
|
-
| `exportMode`
|
|
64
|
-
| `localOutputDir`
|
|
65
|
-
| `flushIntervalMs`
|
|
59
|
+
| Option | Type | Description |
|
|
60
|
+
| ----------------------- | ----------------- | --------------------------------------------- |
|
|
61
|
+
| `enabled` | `boolean` | Enable/disable the recorder (default: `true`) |
|
|
62
|
+
| `meticulousProjectName` | `string` | The name of the Meticulous project |
|
|
63
|
+
| `recordingToken` | `string` | Token used to authenticate span uploads |
|
|
64
|
+
| `exportMode` | `"local" \| "s3"` | Where to export spans (default: `"local"`) |
|
|
65
|
+
| `localOutputDir` | `string` | Directory for local exports |
|
|
66
|
+
| `flushIntervalMs` | `number` | How often to flush spans (ms) |
|
|
66
67
|
|
|
67
68
|
## Graceful shutdown
|
|
68
69
|
|
|
69
70
|
`initBackendRecorder` returns a `BackendRecorderHandle` with a `stopRecording()` method. Call it before your process exits to flush any pending spans:
|
|
70
71
|
|
|
71
72
|
```js
|
|
72
|
-
const handle = await initBackendRecorder({
|
|
73
|
+
const handle = await initBackendRecorder({
|
|
74
|
+
/* ... */
|
|
75
|
+
});
|
|
73
76
|
|
|
74
77
|
process.on("SIGTERM", async () => {
|
|
75
78
|
await handle?.stopRecording();
|
package/dist/auto-init.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-init.d.ts","sourceRoot":"","sources":["../src/auto-init.ts"],"names":[],"mappings":""}
|
package/dist/auto-init.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4d2be250-cd05-5638-b25c-e28fee094cdb")}catch(e){}}();
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
const downloading_helpers_1 = require("@alwaysmeticulous/downloading-helpers");
|
|
@@ -14,4 +14,4 @@ autoInit().catch((error) => {
|
|
|
14
14
|
console.error(error);
|
|
15
15
|
});
|
|
16
16
|
//# sourceMappingURL=auto-init.js.map
|
|
17
|
-
//# debugId=
|
|
17
|
+
//# debugId=4d2be250-cd05-5638-b25c-e28fee094cdb
|
package/dist/auto-init.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-init.js","sources":["../src/auto-init.ts"],"sourceRoot":"","names":[],"mappings":";;;;AAAA,+EAAmE;AAEnE,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"auto-init.js","sources":["../src/auto-init.ts"],"sourceRoot":"","names":[],"mappings":";;;;AAAA,+EAAmE;AAEnE,MAAM,qBAAqB,GAAG,0CAA0C,CAAC;AAEzE,MAAM,QAAQ,GAAG,KAAK,IAAI,EAAE;IAC1B,MAAM,cAAc,GAAG,MAAM,IAAA,gCAAU,EAAC,qBAAqB,CAAC,CAAC;IAC/D,iEAAiE;IACjE,OAAO,CAAC,cAAc,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACzB,OAAO,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC1E,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC","debugId":"4d2be250-cd05-5638-b25c-e28fee094cdb"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { BackendRecorderConfig, BackendRecorderHandle } from "@alwaysmeticulous/sdk-bundles-api";
|
|
1
|
+
import type { BackendRecorderConfig, BackendRecorderHandle } from "@alwaysmeticulous/sdk-bundles-api";
|
|
2
2
|
export declare const initBackendRecorder: (config?: BackendRecorderConfig) => Promise<BackendRecorderHandle | undefined>;
|
|
3
3
|
export declare const getBackendRecorderBundlePath: (version?: string | null) => string;
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,mCAAmC,CAAC;AAI3C,eAAO,MAAM,mBAAmB,YACrB,qBAAqB,KAC7B,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAO3C,CAAC;AAEF,eAAO,MAAM,4BAA4B,aAC7B,MAAM,GAAG,IAAI,KACtB,MAGF,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b0327675-bc78-5bcf-b306-1b938f1c4e22")}catch(e){}}();
|
|
3
3
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
5
|
exports.getBackendRecorderBundlePath = exports.initBackendRecorder = void 0;
|
|
@@ -20,4 +20,4 @@ const getBackendRecorderBundlePath = (version) => {
|
|
|
20
20
|
};
|
|
21
21
|
exports.getBackendRecorderBundlePath = getBackendRecorderBundlePath;
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
|
23
|
-
//# debugId=
|
|
23
|
+
//# debugId=b0327675-bc78-5bcf-b306-1b938f1c4e22
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAAA,qDAAsD;AACtD,+EAAmE;AAMnE,MAAM,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourceRoot":"","names":[],"mappings":";;;;;AAAA,qDAAsD;AACtD,+EAAmE;AAMnE,MAAM,uBAAuB,GAAG,4CAA4C,CAAC;AAEtE,MAAM,mBAAmB,GAAG,KAAK,EACtC,MAA8B,EACc,EAAE;IAC9C,MAAM,MAAM,GAAG,IAAA,mBAAU,GAAE,CAAC;IAC5B,MAAM,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAC;IACvD,MAAM,cAAc,GAAG,MAAM,IAAA,gCAAU,EAAC,uBAAuB,CAAC,CAAC;IAEjE,iEAAiE;IACjE,OAAO,CAAC,MAAM,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;AACrE,CAAC,CAAC;AATW,QAAA,mBAAmB,uBAS9B;AAEK,MAAM,4BAA4B,GAAG,CAC1C,OAAuB,EACf,EAAE;IACV,MAAM,aAAa,GAAG,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,CAAC;IAC9D,OAAO,qBAAqB,aAAa,wBAAwB,CAAC;AACpE,CAAC,CAAC;AALW,QAAA,4BAA4B,gCAKvC","debugId":"b0327675-bc78-5bcf-b306-1b938f1c4e22"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwaysmeticulous/backend-recorder-launcher",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.300.0",
|
|
4
4
|
"description": "Downloads the backend-recorder bundle script and executes it",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"dist"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@alwaysmeticulous/common": "2.
|
|
23
|
-
"@alwaysmeticulous/downloading-helpers": "2.
|
|
24
|
-
"@alwaysmeticulous/sdk-bundles-api": "2.
|
|
22
|
+
"@alwaysmeticulous/common": "2.300.0",
|
|
23
|
+
"@alwaysmeticulous/downloading-helpers": "2.300.0",
|
|
24
|
+
"@alwaysmeticulous/sdk-bundles-api": "2.300.0"
|
|
25
25
|
},
|
|
26
26
|
"author": {
|
|
27
27
|
"name": "The Meticulous Team",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"build": "tsc --build tsconfig.json",
|
|
46
46
|
"dev": "tsc --build tsconfig.json --watch",
|
|
47
47
|
"format": "prettier --write src",
|
|
48
|
-
"lint": "
|
|
48
|
+
"lint": "oxlint --type-aware src",
|
|
49
49
|
"lint:commit": "eslint --cache $(git diff --relative --name-only --diff-filter=ACMRTUXB master | grep -E \"(.js$|.ts$|.tsx$)\")",
|
|
50
|
-
"lint:fix": "
|
|
50
|
+
"lint:fix": "oxlint --type-aware src --fix",
|
|
51
51
|
"depcheck": "depcheck --ignore-patterns=dist"
|
|
52
52
|
}
|
|
53
53
|
}
|
package/LICENSE
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
ISC License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022, Meticulous Contributors
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
-
copyright notice and this permission notice appear in all copies.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
-
PERFORMANCE OF THIS SOFTWARE.
|