@dex-monit/observability-sdk-node 1.0.10 → 1.0.12

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.
@@ -9,6 +9,7 @@ import { RemoteLogger, createRemoteLogger } from './remote-logger.js';
9
9
  import { DexLoggerService, DEX_LOGGER_TOKEN } from './dex-logger.service.js';
10
10
  import { startConsoleCapture, stopConsoleCapture } from './console-capture.js';
11
11
  import { startNestLoggerCapture, stopNestLoggerCapture, } from './nest-logger-capture.js';
12
+ import { HttpTraceInterceptor } from './http-interceptor.js';
12
13
  import { Logger, LOGGER_TOKEN, } from '@dex-monit/observability-logger';
13
14
  // Re-export LOGGER_TOKEN for convenience
14
15
  export { LOGGER_TOKEN };
@@ -115,12 +116,22 @@ let SdkNodeModule = (() => {
115
116
  provide: APP_INTERCEPTOR,
116
117
  useFactory: () => new ErrorCaptureInterceptor(monitoringClient),
117
118
  },
119
+ // HTTP trace interceptor (captures all HTTP requests)
120
+ ...((config.captureHttpRequests ?? true)
121
+ ? [
122
+ {
123
+ provide: APP_INTERCEPTOR,
124
+ useFactory: () => new HttpTraceInterceptor(monitoringClient),
125
+ },
126
+ ]
127
+ : []),
118
128
  // Keep the filter as fallback for non-HTTP contexts
119
129
  {
120
130
  provide: APP_FILTER,
121
131
  useFactory: () => new GlobalExceptionFilter(logger, monitoringClient),
122
132
  },
123
133
  RequestIdMiddleware,
134
+ HttpTraceInterceptor,
124
135
  ],
125
136
  exports: [
126
137
  // Main exports
@@ -128,6 +139,7 @@ let SdkNodeModule = (() => {
128
139
  DEX_LOGGER_TOKEN,
129
140
  MONITORING_CLIENT_TOKEN,
130
141
  MonitoringClient,
142
+ HttpTraceInterceptor,
131
143
  // Legacy exports
132
144
  LOGGER_TOKEN,
133
145
  Logger,