@nestjs/observe 0.2.0 → 0.2.2
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 +58 -20
- package/dist/.tsbuildinfo +1 -1
- package/dist/agent/degraded-ingest.protocol.d.ts +67 -0
- package/dist/agent/degraded-ingest.protocol.js +86 -0
- package/dist/agent/detached-observe-worker.js +20 -0
- package/dist/agent/observe-agent.shared-buffer.d.ts +28 -0
- package/dist/agent/observe-agent.shared-buffer.js +54 -0
- package/dist/agent/observe-agent.worker.d.ts +28 -0
- package/dist/agent/observe-agent.worker.js +50 -0
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -1,23 +1,59 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="
|
|
2
|
+
<a href="https://observe.nestjs.com" target="_blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="NestJS Logo" /></a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
<p align="center">
|
|
7
|
-
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/common.svg" alt="NPM Version" /></a>
|
|
8
|
-
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/common.svg" alt="Package License" /></a>
|
|
9
|
-
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
|
|
10
|
-
<a href="https://coveralls.io/github/nestjs/nest?branch=master" target="_blank"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#9" alt="Coverage" /></a>
|
|
11
|
-
<a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
|
|
12
|
-
<a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
|
|
13
|
-
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
|
|
14
|
-
<a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg"/></a>
|
|
15
|
-
<a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
|
|
16
|
-
<a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
|
|
5
|
+
<p align="center">Auto-instrumented observability for <a href="https://nestjs.com" target="_blank">NestJS</a> applications — traces, errors, logs, jobs and profiles, with no manual span wiring.</p>
|
|
17
6
|
|
|
18
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://www.npmjs.com/package/@nestjs/observe"><img src="https://img.shields.io/npm/v/@nestjs/observe.svg" alt="NPM Version" /></a>
|
|
9
|
+
<a href="https://www.npmjs.com/package/@nestjs/observe"><img src="https://img.shields.io/npm/dm/@nestjs/observe.svg" alt="NPM Downloads" /></a>
|
|
10
|
+
<a href="https://www.npmjs.com/package/@nestjs/observe"><img src="https://img.shields.io/npm/l/@nestjs/observe.svg" alt="Package License" /></a>
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
<p align="center">
|
|
14
|
+
<a href="https://www.observe-demo.nestjs.com/dashboard"><b>Live demo</b></a> ·
|
|
15
|
+
<a href="https://observe.nestjs.com"><b>Website</b></a> ·
|
|
16
|
+
<a href="https://docs.nestjs.com">Documentation</a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
## What it is
|
|
20
|
+
|
|
21
|
+
`@nestjs/observe` instruments a NestJS application from the inside. It hooks
|
|
22
|
+
into Nest's own request lifecycle — controllers, interceptors, guards, queue
|
|
23
|
+
consumers, resolvers — rather than wrapping a generic Node.js agent around the
|
|
24
|
+
framework, so a trace is named in the vocabulary you wrote the code in: classes
|
|
25
|
+
and methods, not just HTTP routes.
|
|
26
|
+
|
|
27
|
+
Install it, set two environment variables, and the application starts reporting:
|
|
28
|
+
|
|
29
|
+
- **Requests, jobs and RPC calls** — HTTP, GraphQL, microservices (RPC/gRPC),
|
|
30
|
+
BullMQ consumers and `@nestjs/schedule` cron, interval and timeout jobs.
|
|
31
|
+
- **Distributed traces** with per-span self time, correlated across services.
|
|
32
|
+
- **Errors**, grouped by fingerprint, with the source frame and the trace that
|
|
33
|
+
produced them.
|
|
34
|
+
- **Logs**, correlated to the request that wrote them.
|
|
35
|
+
- **Runtime and custom metrics**, plus on-demand **CPU profiles**.
|
|
36
|
+
|
|
37
|
+
Telemetry is serialised on a detached worker thread and shipped from there, so
|
|
38
|
+
the request path is untouched by the reporting.
|
|
39
|
+
|
|
40
|
+
### Why not just OpenTelemetry?
|
|
41
|
+
|
|
42
|
+
OpenTelemetry is the right answer when you need vendor neutrality across a
|
|
43
|
+
polyglot estate, and this agent is not a replacement for it. It is a different
|
|
44
|
+
trade: no collector to run, no exporter pipeline to configure, no manual
|
|
45
|
+
instrumentation for the framework's own lifecycle — and spans named after your
|
|
46
|
+
Nest classes and methods, which generic Node.js instrumentation cannot produce
|
|
47
|
+
because it cannot see them. If you would otherwise spend a week wiring a
|
|
48
|
+
collector and still not know which provider spent the time, this is the
|
|
49
|
+
shortcut.
|
|
50
|
+
|
|
51
|
+
## Seeing it before installing
|
|
19
52
|
|
|
20
|
-
|
|
53
|
+
**[observe-demo.nestjs.com](https://www.observe-demo.nestjs.com/dashboard)** is the whole
|
|
54
|
+
dashboard running over a generated dataset from a busy service — real request
|
|
55
|
+
volumes, traces with waterfalls, errors, jobs and alerts. No signup, nothing to
|
|
56
|
+
install.
|
|
21
57
|
|
|
22
58
|
```bash
|
|
23
59
|
$ npm install @nestjs/observe
|
|
@@ -61,8 +97,8 @@ import { ObserveModule } from "./observe";
|
|
|
61
97
|
@Module({
|
|
62
98
|
imports: [
|
|
63
99
|
ObserveModule.forRoot({
|
|
64
|
-
appKey: process.env.OBSERVE_APP_KEY
|
|
65
|
-
appSecret: process.env.OBSERVE_APP_SECRET
|
|
100
|
+
appKey: process.env.OBSERVE_APP_KEY!,
|
|
101
|
+
appSecret: process.env.OBSERVE_APP_SECRET!,
|
|
66
102
|
serviceId: "my-service",
|
|
67
103
|
}),
|
|
68
104
|
],
|
|
@@ -198,9 +234,11 @@ const { createObserveModule } = require("@nestjs/observe");
|
|
|
198
234
|
|
|
199
235
|
## Stay in touch
|
|
200
236
|
|
|
201
|
-
-
|
|
202
|
-
-
|
|
237
|
+
- Dashboard — [observe.nestjs.com](https://observe.nestjs.com)
|
|
238
|
+
- Live demo — [observe-demo.nestjs.com](https://www.observe-demo.nestjs.com/dashboard)
|
|
239
|
+
- Documentation — [docs.nestjs.com](https://docs.nestjs.com)
|
|
240
|
+
- Twitter — [@nestframework](https://twitter.com/nestframework)
|
|
203
241
|
|
|
204
242
|
## License
|
|
205
243
|
|
|
206
|
-
|
|
244
|
+
`@nestjs/observe` is [MIT licensed](LICENSE).
|