securenow 5.18.0 → 6.0.0

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 (85) hide show
  1. package/LICENSE +15 -0
  2. package/README.md +40 -239
  3. package/cli.js +455 -415
  4. package/console-instrumentation.js +136 -147
  5. package/docs/ALL-FRAMEWORKS-QUICKSTART.md +455 -1339
  6. package/docs/ARCHITECTURE.md +3 -3
  7. package/docs/AUTO-BODY-CAPTURE.md +1 -1
  8. package/docs/AUTO-SETUP.md +4 -4
  9. package/docs/AUTOMATIC-IP-CAPTURE.md +5 -5
  10. package/docs/BODY-CAPTURE-QUICKSTART.md +2 -2
  11. package/docs/CHANGELOG-NEXTJS.md +1 -1
  12. package/docs/CUSTOMER-GUIDE.md +16 -16
  13. package/docs/EASIEST-SETUP.md +5 -5
  14. package/docs/ENVIRONMENT-VARIABLES.md +652 -880
  15. package/docs/EXPRESS-BODY-CAPTURE.md +12 -13
  16. package/docs/EXPRESS-SETUP-GUIDE.md +720 -719
  17. package/docs/INDEX.md +4 -22
  18. package/docs/LOGGING-GUIDE.md +708 -701
  19. package/docs/LOGGING-QUICKSTART.md +239 -234
  20. package/docs/NEXTJS-BODY-CAPTURE.md +2 -2
  21. package/docs/NEXTJS-GUIDE.md +14 -14
  22. package/docs/NEXTJS-QUICKSTART.md +1 -1
  23. package/docs/NEXTJS-WRAPPER-APPROACH.md +1 -1
  24. package/docs/QUICKSTART-BODY-CAPTURE.md +2 -2
  25. package/docs/REDACTION-EXAMPLES.md +1 -1
  26. package/docs/REQUEST-BODY-CAPTURE.md +10 -19
  27. package/docs/VERCEL-OTEL-MIGRATION.md +3 -3
  28. package/examples/README.md +6 -6
  29. package/examples/instrumentation-with-auto-capture.ts +1 -1
  30. package/examples/nextjs-env-example.txt +2 -2
  31. package/examples/nextjs-instrumentation.js +1 -1
  32. package/examples/nextjs-instrumentation.ts +1 -1
  33. package/examples/nextjs-with-logging-example.md +6 -6
  34. package/examples/nextjs-with-options.ts +1 -1
  35. package/examples/test-nextjs-setup.js +1 -1
  36. package/nextjs-auto-capture.js +207 -199
  37. package/nextjs-middleware.js +181 -186
  38. package/nextjs-webpack-config.js +53 -88
  39. package/nextjs-wrapper.js +158 -158
  40. package/nextjs.d.ts +1 -1
  41. package/nextjs.js +135 -190
  42. package/package.json +45 -67
  43. package/postinstall.js +6 -6
  44. package/register.d.ts +1 -1
  45. package/register.js +4 -39
  46. package/tracing.d.ts +1 -2
  47. package/tracing.js +22 -287
  48. package/web-vite.mjs +156 -239
  49. package/CONSUMING-APPS-GUIDE.md +0 -455
  50. package/NPM_README.md +0 -1933
  51. package/SKILL-API.md +0 -600
  52. package/SKILL-CLI.md +0 -409
  53. package/cidr.js +0 -83
  54. package/cli/apps.js +0 -585
  55. package/cli/auth.js +0 -280
  56. package/cli/client.js +0 -115
  57. package/cli/config.js +0 -173
  58. package/cli/firewall.js +0 -100
  59. package/cli/fp.js +0 -638
  60. package/cli/init.js +0 -201
  61. package/cli/monitor.js +0 -440
  62. package/cli/run.js +0 -133
  63. package/cli/security.js +0 -1064
  64. package/cli/ui.js +0 -386
  65. package/docs/API-KEYS-GUIDE.md +0 -233
  66. package/docs/AUTO-SETUP-SUMMARY.md +0 -331
  67. package/docs/BODY-CAPTURE-FIX.md +0 -261
  68. package/docs/COMPLETION-REPORT.md +0 -408
  69. package/docs/FINAL-SOLUTION.md +0 -335
  70. package/docs/FIREWALL-GUIDE.md +0 -426
  71. package/docs/IMPLEMENTATION-SUMMARY.md +0 -410
  72. package/docs/NEXTJS-BODY-CAPTURE-COMPARISON.md +0 -323
  73. package/docs/NEXTJS-SETUP-COMPLETE.md +0 -795
  74. package/docs/NUXT-GUIDE.md +0 -166
  75. package/docs/SOLUTION-SUMMARY.md +0 -312
  76. package/firewall-cloud.js +0 -212
  77. package/firewall-iptables.js +0 -139
  78. package/firewall-only.js +0 -38
  79. package/firewall-tcp.js +0 -74
  80. package/firewall.js +0 -720
  81. package/free-trial-banner.js +0 -174
  82. package/nuxt-server-plugin.mjs +0 -423
  83. package/nuxt.d.ts +0 -60
  84. package/nuxt.mjs +0 -75
  85. package/resolve-ip.js +0 -77
@@ -36,7 +36,7 @@ SecureNow provides seamless OpenTelemetry instrumentation for Node.js and Next.j
36
36
 
37
37
 
38
38
  ┌──────────────────────────────────┐
39
- SecureNow / OpenTelemetry
39
+ SigNoz / OpenTelemetry
40
40
  │ Collector │
41
41
  └──────────────────────────────────┘
42
42
  ```
@@ -198,7 +198,7 @@ Your Application
198
198
 
199
199
 
200
200
  ┌─────────────────┐
201
- SecureNow /
201
+ SigNoz /
202
202
  │ OTLP Collector │
203
203
  └─────────────────┘
204
204
  ```
@@ -249,7 +249,7 @@ Every span includes these resource attributes:
249
249
  6. Batch sent to collector via HTTP
250
250
 
251
251
 
252
- 7. Visible in SecureNow UI
252
+ 7. Visible in SigNoz UI
253
253
  ```
254
254
 
255
255
  ---
@@ -182,7 +182,7 @@ export function register() {
182
182
  ```bash
183
183
  # Required
184
184
  SECURENOW_APPID=my-nextjs-app
185
- SECURENOW_INSTANCE=http://otel-collector:4318
185
+ SECURENOW_INSTANCE=http://signoz:4318
186
186
 
187
187
  # Enable auto-capture
188
188
  SECURENOW_CAPTURE_BODY=1
@@ -38,11 +38,11 @@ Would you like to automatically create instrumentation file? (Y/n) Y
38
38
  │ │
39
39
  │ 1. Edit .env.local and set: │
40
40
  │ SECURENOW_APPID=your-app-name │
41
- │ SECURENOW_INSTANCE=http://otel-collector:4318
41
+ │ SECURENOW_INSTANCE=http://signoz:4318
42
42
  │ │
43
43
  │ 2. Run your app: npm run dev │
44
44
  │ │
45
- │ 3. Check SecureNow for traces!
45
+ │ 3. Check SigNoz for traces!
46
46
  └─────────────────────────────────────────────────┘
47
47
  ```
48
48
 
@@ -93,7 +93,7 @@ $ npx securenow init
93
93
  │ Next steps: │
94
94
  │ 1. Edit .env.local and configure │
95
95
  │ 2. Start your app: npm run dev │
96
- │ 3. Check SecureNow dashboard for traces!
96
+ │ 3. Check SigNoz dashboard for traces!
97
97
  └─────────────────────────────────────────────────┘
98
98
  ```
99
99
 
@@ -115,7 +115,7 @@ export function register() {
115
115
  ```bash
116
116
  # .env.local
117
117
  SECURENOW_APPID=my-nextjs-app
118
- SECURENOW_INSTANCE=http://your-otlp-backend:4318
118
+ SECURENOW_INSTANCE=http://your-signoz:4318
119
119
  ```
120
120
 
121
121
  ---
@@ -50,9 +50,9 @@ That's it! All request metadata is automatically captured.
50
50
 
51
51
  ---
52
52
 
53
- ## 📈 View in SecureNow
53
+ ## 📈 View in SigNoz
54
54
 
55
- In your SecureNow dashboard, you'll see these attributes on every span:
55
+ In your SigNoz dashboard, you'll see these attributes on every span:
56
56
 
57
57
  ```json
58
58
  {
@@ -160,7 +160,7 @@ export function register() {
160
160
  - Consider anonymizing IPs in some regions
161
161
 
162
162
  2. **Data Retention**
163
- - Configure SecureNow retention policies
163
+ - Configure SigNoz retention policies
164
164
  - Consider shorter retention for IP data
165
165
 
166
166
  3. **Anonymization Option**
@@ -281,7 +281,7 @@ LIMIT 10
281
281
  1. **HttpInstrumentation** intercepts incoming HTTP requests
282
282
  2. **requestHook** extracts headers and metadata
283
283
  3. **Attributes** are added to the active span
284
- 4. **Data flows** to SecureNow with the trace
284
+ 4. **Data flows** to SigNoz with the trace
285
285
 
286
286
  ### Headers Priority
287
287
 
@@ -352,7 +352,7 @@ SecureNow automatically captures:
352
352
 
353
353
  **Zero configuration required** - it just works!
354
354
 
355
- View everything in SecureNow for powerful analytics and debugging.
355
+ View everything in SigNoz for powerful analytics and debugging.
356
356
 
357
357
 
358
358
 
@@ -62,7 +62,7 @@ SECURENOW_SENSITIVE_FIELDS=email,phone,address
62
62
 
63
63
  ---
64
64
 
65
- ## View in SecureNow
65
+ ## View in SigNoz
66
66
 
67
67
  Query for captured bodies:
68
68
  ```
@@ -125,7 +125,7 @@ app.post('/api/login', (req, res) => {
125
125
 
126
126
  **Best practices:**
127
127
  - Add relevant fields to `SECURENOW_SENSITIVE_FIELDS`
128
- - Set appropriate retention in SecureNow
128
+ - Set appropriate retention in SigNoz
129
129
  - Document in privacy policy
130
130
  - Consider GDPR/CCPA requirements
131
131
 
@@ -151,7 +151,7 @@ NODE_OPTIONS="-r securenow/register" node app.js
151
151
  ### 🙏 Credits
152
152
  - Built on OpenTelemetry
153
153
  - Inspired by Vercel's `@vercel/otel`
154
- - Compatible with SecureNow and all OTLP collectors
154
+ - Compatible with SigNoz and all OTLP collectors
155
155
 
156
156
  ---
157
157
 
@@ -1,6 +1,6 @@
1
1
  # 🚀 Add Observability to Your Next.js App in 2 Minutes
2
2
 
3
- **Send traces to SecureNow with just 1-2 steps. No webpack warnings!**
3
+ **Send traces to SigNoz with just 1-2 steps. No webpack warnings!**
4
4
 
5
5
  ---
6
6
 
@@ -51,7 +51,7 @@ Create or update `.env.local`:
51
51
  ```bash
52
52
  # Just update these two values:
53
53
  SECURENOW_APPID=my-nextjs-app # Your app name
54
- SECURENOW_INSTANCE=http://your-otlp-backend:4318 # Your OTLP / SecureNow URL
54
+ SECURENOW_INSTANCE=http://your-signoz:4318 # Your SigNoz URL
55
55
  ```
56
56
 
57
57
  ---
@@ -83,7 +83,7 @@ Then create `.env.local`:
83
83
 
84
84
  ```bash
85
85
  SECURENOW_APPID=my-nextjs-app
86
- SECURENOW_INSTANCE=http://your-otlp-backend:4318
86
+ SECURENOW_INSTANCE=http://your-signoz:4318
87
87
  ```
88
88
 
89
89
  ---
@@ -104,7 +104,7 @@ You should see:
104
104
  [securenow] ✅ OpenTelemetry started for Next.js
105
105
  ```
106
106
 
107
- Open your **SecureNow dashboard** and you'll see traces immediately!
107
+ Open your **SigNoz dashboard** and you'll see traces immediately!
108
108
 
109
109
  ---
110
110
 
@@ -169,7 +169,7 @@ No additional code needed!
169
169
 
170
170
  ## ⚙️ Optional: Add Authentication
171
171
 
172
- If your OTLP backend requires an API key:
172
+ If your SigNoz server requires an API key:
173
173
 
174
174
  ```bash
175
175
  # Add to .env.local
@@ -188,9 +188,9 @@ import { registerSecureNow } from 'securenow/nextjs';
188
188
  export function register() {
189
189
  registerSecureNow({
190
190
  serviceName: 'my-app',
191
- endpoint: 'http://otel-collector:4318',
191
+ endpoint: 'http://signoz:4318',
192
192
  headers: {
193
- 'x-api-key': process.env.SECURENOW_API_KEY || '',
193
+ 'x-api-key': process.env.SIGNOZ_API_KEY || '',
194
194
  },
195
195
  disableInstrumentations: ['fs'], // Optional: disable specific instrumentations
196
196
  });
@@ -221,9 +221,9 @@ OTEL_LOG_LEVEL=debug
221
221
  SECURENOW_TEST_SPAN=1
222
222
  ```
223
223
 
224
- **4. Verify your OTLP endpoint is accessible**
224
+ **4. Verify SigNoz is accessible**
225
225
  ```bash
226
- curl http://your-otlp-backend:4318/v1/traces
226
+ curl http://your-signoz-server:4318/v1/traces
227
227
  ```
228
228
 
229
229
  ---
@@ -256,10 +256,10 @@ module.exports = nextConfig;
256
256
  1. Go to your Vercel project settings
257
257
  2. Add environment variables:
258
258
  - `SECURENOW_APPID=my-nextjs-app`
259
- - `SECURENOW_INSTANCE=http://your-otlp-backend:4318`
259
+ - `SECURENOW_INSTANCE=http://your-signoz:4318`
260
260
  3. Redeploy
261
261
 
262
- **Done!** Traces will appear in SecureNow.
262
+ **Done!** Traces will appear in SigNoz.
263
263
 
264
264
  ### Docker
265
265
 
@@ -274,7 +274,7 @@ COPY . .
274
274
  RUN npm run build
275
275
 
276
276
  ENV SECURENOW_APPID=my-nextjs-app
277
- ENV SECURENOW_INSTANCE=http://otel-collector:4318
277
+ ENV SECURENOW_INSTANCE=http://signoz:4318
278
278
 
279
279
  EXPOSE 3000
280
280
  CMD ["npm", "start"]
@@ -284,7 +284,7 @@ CMD ["npm", "start"]
284
284
 
285
285
  ```bash
286
286
  export SECURENOW_APPID=my-nextjs-app
287
- export SECURENOW_INSTANCE=http://your-otlp-backend:4318
287
+ export SECURENOW_INSTANCE=http://your-signoz:4318
288
288
  npm start
289
289
  ```
290
290
 
@@ -295,7 +295,7 @@ npm start
295
295
  ```bash
296
296
  # ===== REQUIRED =====
297
297
  SECURENOW_APPID=my-app-name # Your app identifier
298
- SECURENOW_INSTANCE=http://host:4318 # OTLP / SecureNow endpoint
298
+ SECURENOW_INSTANCE=http://host:4318 # SigNoz endpoint
299
299
 
300
300
  # ===== OPTIONAL =====
301
301
  OTEL_EXPORTER_OTLP_HEADERS="key=val" # API keys/headers
@@ -336,7 +336,7 @@ SECURENOW_TEST_SPAN=1 # Test span on startup
336
336
 
337
337
  - **Documentation:** [Full guides](./NEXTJS-GUIDE.md)
338
338
  - **Examples:** See `examples/` folder
339
- - **SecureNow:** [securenow.ai](https://securenow.ai/)
339
+ - **SigNoz Docs:** [signoz.io/docs](https://signoz.io/docs/)
340
340
 
341
341
  ---
342
342
 
@@ -356,7 +356,7 @@ SECURENOW_TEST_SPAN=1 # Test span on startup
356
356
 
357
357
  <div align="center">
358
358
 
359
- **Made with ❤️ for Next.js and SecureNow**
359
+ **Made with ❤️ for Next.js and SigNoz**
360
360
 
361
361
  [Website](http://securenow.ai/) • [NPM](https://www.npmjs.com/package/securenow) • [Documentation](./NEXTJS-GUIDE.md)
362
362
 
@@ -13,7 +13,7 @@
13
13
  ```bash
14
14
  # .env.local
15
15
  SECURENOW_APPID=my-nextjs-app
16
- SECURENOW_INSTANCE=http://your-otlp-backend:4318
16
+ SECURENOW_INSTANCE=http://your-signoz:4318
17
17
  SECURENOW_CAPTURE_BODY=1
18
18
  ```
19
19
 
@@ -61,7 +61,7 @@ export async function POST(request: Request) {
61
61
  "password": "secret123"
62
62
  }
63
63
 
64
- // Captured in SecureNow (password redacted):
64
+ // Captured in SigNoz (password redacted):
65
65
  {
66
66
  "email": "user@example.com",
67
67
  "password": "[REDACTED]"
@@ -110,7 +110,7 @@ export function register() {
110
110
  ```bash
111
111
  # Required
112
112
  SECURENOW_APPID=my-nextjs-app
113
- SECURENOW_INSTANCE=http://otel-collector:4318
113
+ SECURENOW_INSTANCE=http://signoz:4318
114
114
 
115
115
  # Enable body capture
116
116
  SECURENOW_CAPTURE_BODY=1
@@ -248,7 +248,7 @@ export function register() {
248
248
  ```bash
249
249
  # .env.local
250
250
  SECURENOW_APPID=my-app
251
- SECURENOW_INSTANCE=http://otel-collector:4318
251
+ SECURENOW_INSTANCE=http://signoz:4318
252
252
  SECURENOW_CAPTURE_BODY=1
253
253
  ```
254
254
 
@@ -258,7 +258,7 @@ SECURENOW_CAPTURE_BODY=1
258
258
  npm run dev
259
259
  ```
260
260
 
261
- ### 5. Check SecureNow
261
+ ### 5. Check SigNoz
262
262
 
263
263
  **See traces with:**
264
264
  - ✅ Request bodies (redacted)