unnbound-logger-sdk 2.0.8 → 2.0.9

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.
@@ -89,6 +89,11 @@ class UnnboundLogger {
89
89
  // Axios response interceptor (should be used separately)
90
90
  this.axiosResponseInterceptor = {
91
91
  onFulfilled: (response) => {
92
+ // Check if the URL should be ignored
93
+ const url = `${response.config?.baseURL || ''}${response.config?.url}`;
94
+ if (url && this.shouldIgnorePath(url, this.ignoreAxiosTraceRoutes)) {
95
+ return response;
96
+ }
92
97
  // Calculate duration
93
98
  const startTime = response.config.metadata?.startTime || Date.now();
94
99
  const requestId = response.config.metadata?.requestId;
@@ -121,6 +126,11 @@ class UnnboundLogger {
121
126
  return response;
122
127
  },
123
128
  onRejected: (error) => {
129
+ // Check if the URL should be ignored
130
+ const url = `${error.config?.baseURL || ''}${error.config?.url}`;
131
+ if (url && this.shouldIgnorePath(url, this.ignoreAxiosTraceRoutes)) {
132
+ return Promise.reject(error);
133
+ }
124
134
  // Calculate duration for error responses
125
135
  const startTime = error.config?.metadata?.startTime || Date.now();
126
136
  const requestId = error.config?.metadata?.requestId;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unnbound-logger-sdk",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "A structured logging library with TypeScript support using Pino. Provides consistent, well-typed logging with automatic logId, workflowId, traceId, and deploymentId tracking across operational contexts.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",