@nestjs/observe 0.0.1 → 0.1.1

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.
Files changed (72) hide show
  1. package/README.md +16 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/agent/detached-observe-worker.js +98 -1
  4. package/dist/agent/observe-agent.shared-buffer.d.ts +82 -0
  5. package/dist/agent/observe-agent.shared-buffer.js +94 -3
  6. package/dist/agent/observe-agent.worker.d.ts +28 -0
  7. package/dist/agent/observe-agent.worker.js +59 -5
  8. package/dist/custom-metrics/counter.d.ts +124 -0
  9. package/dist/custom-metrics/counter.js +93 -0
  10. package/dist/custom-metrics/gauge.d.ts +116 -0
  11. package/dist/custom-metrics/gauge.js +55 -0
  12. package/dist/custom-metrics/summary.d.ts +102 -0
  13. package/dist/custom-metrics/summary.js +100 -0
  14. package/dist/encoders/custom-metrics.encoder.js +18 -0
  15. package/dist/encoders/remap-keys.util.d.ts +11 -0
  16. package/dist/encoders/remap-keys.util.js +15 -0
  17. package/dist/encoders/trace.encoder.d.ts +7 -0
  18. package/dist/encoders/trace.encoder.js +12 -0
  19. package/dist/instrument/create-instance-decorator.instrument.d.ts +8 -0
  20. package/dist/instrument/create-instance-decorator.instrument.js +67 -0
  21. package/dist/interfaces/custom-metric.interface.d.ts +74 -0
  22. package/dist/interfaces/graphql.interfaces.d.ts +16 -0
  23. package/dist/interfaces/job-snapshot.interface.d.ts +70 -0
  24. package/dist/interfaces/node-runtime-metrics.interface.d.ts +5 -0
  25. package/dist/interfaces/observe-options.interface.d.ts +358 -0
  26. package/dist/interfaces/request-snapshot.interface.d.ts +62 -0
  27. package/dist/interfaces/trace-events.interfaces.d.ts +51 -0
  28. package/dist/interfaces/trace-span.interface.d.ts +29 -0
  29. package/dist/observe.module.js +29 -0
  30. package/dist/profiling/cpu-profiler.service.d.ts +65 -0
  31. package/dist/profiling/cpu-profiler.service.js +80 -0
  32. package/dist/profiling/fold-profile.util.d.ts +20 -0
  33. package/dist/profiling/fold-profile.util.js +0 -0
  34. package/dist/profiling/profile-uploader.d.ts +26 -0
  35. package/dist/profiling/profile-uploader.js +52 -0
  36. package/dist/profiling/span-slice-recorder.d.ts +51 -0
  37. package/dist/profiling/span-slice-recorder.js +77 -0
  38. package/dist/protocols/graphql-observe-agent.service.d.ts +128 -0
  39. package/dist/protocols/graphql-observe-agent.service.js +166 -0
  40. package/dist/protocols/graphql-operation-parser.d.ts +26 -0
  41. package/dist/protocols/graphql-operation-parser.js +66 -0
  42. package/dist/protocols/http-observe-agent.service.d.ts +19 -0
  43. package/dist/protocols/http-observe-agent.service.js +34 -0
  44. package/dist/protocols/queue-observe-agent.service.d.ts +8 -0
  45. package/dist/protocols/queue-observe-agent.service.js +32 -0
  46. package/dist/protocols/rpc-observe-agent.service.d.ts +7 -0
  47. package/dist/protocols/rpc-observe-agent.service.js +12 -0
  48. package/dist/services/logger-patcher.service.d.ts +4 -0
  49. package/dist/services/logger-patcher.service.js +13 -1
  50. package/dist/services/node-runtime-metrics.service.js +24 -8
  51. package/dist/services/operation-trace.registry.d.ts +56 -1
  52. package/dist/services/operation-trace.registry.js +145 -6
  53. package/dist/services/stdout-forwarder.service.d.ts +19 -0
  54. package/dist/services/stdout-forwarder.service.js +62 -0
  55. package/dist/services/trace-sampler.service.d.ts +6 -0
  56. package/dist/services/trace-sampler.service.js +3 -3
  57. package/dist/services/tracer.service.d.ts +91 -0
  58. package/dist/services/tracer.service.js +56 -1
  59. package/dist/trace-span.delegate.d.ts +11 -0
  60. package/dist/trace-span.delegate.js +11 -0
  61. package/dist/types/path-value.type.d.ts +4 -0
  62. package/dist/utils/default-trace-id-generator.util.js +11 -0
  63. package/dist/utils/log-line.parser.d.ts +14 -0
  64. package/dist/utils/log-line.parser.js +37 -0
  65. package/dist/utils/log-redactor.js +65 -0
  66. package/dist/utils/redact-url-query.d.ts +17 -0
  67. package/dist/utils/redact-url-query.js +38 -0
  68. package/dist/utils/source-context.util.d.ts +22 -0
  69. package/dist/utils/source-context.util.js +60 -0
  70. package/dist/utils/source-map-resolver.util.d.ts +13 -0
  71. package/dist/utils/source-map-resolver.util.js +26 -28
  72. package/package.json +1 -1
package/README.md CHANGED
@@ -23,6 +23,22 @@
23
23
  $ npm install @nestjs/observe
24
24
  ```
25
25
 
26
+ ## Getting credentials
27
+
28
+ Sign up at **[observe.nestjs.com](https://observe.nestjs.com)** and create a
29
+ service. The dashboard issues an **app key** and an **app secret**, which the
30
+ agent sends on every ingest request.
31
+
32
+ The secret is shown once and is not retrievable afterwards - store it with the
33
+ rest of your secrets and supply both from the environment:
34
+
35
+ ```bash
36
+ OBSERVE_APP_KEY=...
37
+ OBSERVE_APP_SECRET=...
38
+ ```
39
+
40
+ Without valid credentials the collector answers `401` and telemetry is dropped.
41
+
26
42
  ## Quick start
27
43
 
28
44
  `createObserveModule()` returns both the dynamic module and the instrumentation