server-devtools 0.1.4 → 0.1.5
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 +31 -1
- package/dist/dashboard/assets/{index-ChfcS51A.js → index-BXbomG5W.js} +1 -1
- package/dist/dashboard/index.html +1 -1
- package/dist/src/instrumentation/instrumentation.d.ts.map +1 -1
- package/dist/src/instrumentation/instrumentation.js +13 -0
- package/dist/src/instrumentation/instrumentation.js.map +1 -1
- package/dist/src/nestjs.d.mts +3 -0
- package/dist/src/nestjs.d.mts.map +1 -0
- package/dist/src/nestjs.mjs +5 -0
- package/dist/src/nestjs.mjs.map +1 -0
- package/package.json +7 -2
package/README.md
CHANGED
|
@@ -165,6 +165,18 @@ server.listen(3000);
|
|
|
165
165
|
tsx watch --import ./server-devtools.ts src/main.ts
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
+
`await devtools.start()` automatically registers OpenTelemetry's ESM loader hook
|
|
169
|
+
once per process before starting the OpenTelemetry SDK. Keep startup in the
|
|
170
|
+
preload module and let it complete before application dependencies load, including
|
|
171
|
+
normal Redis (ioredis) imports. Already-loaded dependencies cannot be instrumented
|
|
172
|
+
retroactively.
|
|
173
|
+
|
|
174
|
+
The installed OpenTelemetry hook exports asynchronous loader hooks, which require
|
|
175
|
+
`node:module.register()`. Newer Node.js versions deprecate this API; its
|
|
176
|
+
`registerHooks()` replacement takes synchronous hooks and cannot directly load
|
|
177
|
+
OpenTelemetry's `hook.mjs`. This compatibility requirement does not change the
|
|
178
|
+
startup command or configuration.
|
|
179
|
+
|
|
168
180
|
The application can import the same instance normally and mount it in Express:
|
|
169
181
|
|
|
170
182
|
```ts
|
|
@@ -454,6 +466,7 @@ ServerDevTools currently supports:
|
|
|
454
466
|
- MongoDB
|
|
455
467
|
- PostgreSQL through `pg`
|
|
456
468
|
- MySQL through `mysql2`
|
|
469
|
+
- Redis (ioredis)
|
|
457
470
|
- native HTTP/HTTPS and fetch/Undici requests, including headers and bodies
|
|
458
471
|
- request search and filtering by HTTP method and status
|
|
459
472
|
- current/authenticated user context when supplied by the application
|
|
@@ -467,6 +480,11 @@ execution trace when using these supported drivers:
|
|
|
467
480
|
- MongoDB
|
|
468
481
|
- PostgreSQL (`pg`)
|
|
469
482
|
- MySQL (`mysql2`)
|
|
483
|
+
- Redis (ioredis)
|
|
484
|
+
|
|
485
|
+
Redis command spans include command inspection, arguments, timings, request
|
|
486
|
+
links, and command errors. Redis (ioredis) support has been verified in
|
|
487
|
+
Express and NestJS applications, including pipelines and transactions.
|
|
470
488
|
|
|
471
489
|
------------------------------------------------------------------------
|
|
472
490
|
|
|
@@ -507,7 +525,6 @@ Expect APIs and configuration to evolve before `1.0`.
|
|
|
507
525
|
|
|
508
526
|
Planned, not yet available:
|
|
509
527
|
|
|
510
|
-
- Redis visibility
|
|
511
528
|
- Configurable trace storage, including storing ServerDevTools data through
|
|
512
529
|
user-configured storage instead of only the default local SQLite storage
|
|
513
530
|
|
|
@@ -548,6 +565,19 @@ The goal is simple:
|
|
|
548
565
|
|
|
549
566
|
The project is still early.
|
|
550
567
|
|
|
568
|
+
### Redis (ioredis) integration tests
|
|
569
|
+
|
|
570
|
+
The ioredis integration tests require a disposable Redis instance. Run
|
|
571
|
+
them with its connection URL:
|
|
572
|
+
|
|
573
|
+
```sh
|
|
574
|
+
REDIS_TEST_URL=redis://127.0.0.1:6379 npx tsx --test tests/ioredis-integration.test.ts
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
When `REDIS_TEST_URL` is not set, the Redis integration tests are
|
|
578
|
+
reported as skipped. The tests use isolated keys and clean up their
|
|
579
|
+
clients and data.
|
|
580
|
+
|
|
551
581
|
Issues, ideas, bug reports, and contributions are welcome.
|
|
552
582
|
|
|
553
583
|
------------------------------------------------------------------------
|