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.
- package/LICENSE +15 -0
- package/README.md +40 -239
- package/cli.js +455 -415
- package/console-instrumentation.js +136 -147
- package/docs/ALL-FRAMEWORKS-QUICKSTART.md +455 -1339
- package/docs/ARCHITECTURE.md +3 -3
- package/docs/AUTO-BODY-CAPTURE.md +1 -1
- package/docs/AUTO-SETUP.md +4 -4
- package/docs/AUTOMATIC-IP-CAPTURE.md +5 -5
- package/docs/BODY-CAPTURE-QUICKSTART.md +2 -2
- package/docs/CHANGELOG-NEXTJS.md +1 -1
- package/docs/CUSTOMER-GUIDE.md +16 -16
- package/docs/EASIEST-SETUP.md +5 -5
- package/docs/ENVIRONMENT-VARIABLES.md +652 -880
- package/docs/EXPRESS-BODY-CAPTURE.md +12 -13
- package/docs/EXPRESS-SETUP-GUIDE.md +720 -719
- package/docs/INDEX.md +4 -22
- package/docs/LOGGING-GUIDE.md +708 -701
- package/docs/LOGGING-QUICKSTART.md +239 -234
- package/docs/NEXTJS-BODY-CAPTURE.md +2 -2
- package/docs/NEXTJS-GUIDE.md +14 -14
- package/docs/NEXTJS-QUICKSTART.md +1 -1
- package/docs/NEXTJS-WRAPPER-APPROACH.md +1 -1
- package/docs/QUICKSTART-BODY-CAPTURE.md +2 -2
- package/docs/REDACTION-EXAMPLES.md +1 -1
- package/docs/REQUEST-BODY-CAPTURE.md +10 -19
- package/docs/VERCEL-OTEL-MIGRATION.md +3 -3
- package/examples/README.md +6 -6
- package/examples/instrumentation-with-auto-capture.ts +1 -1
- package/examples/nextjs-env-example.txt +2 -2
- package/examples/nextjs-instrumentation.js +1 -1
- package/examples/nextjs-instrumentation.ts +1 -1
- package/examples/nextjs-with-logging-example.md +6 -6
- package/examples/nextjs-with-options.ts +1 -1
- package/examples/test-nextjs-setup.js +1 -1
- package/nextjs-auto-capture.js +207 -199
- package/nextjs-middleware.js +181 -186
- package/nextjs-webpack-config.js +53 -88
- package/nextjs-wrapper.js +158 -158
- package/nextjs.d.ts +1 -1
- package/nextjs.js +135 -190
- package/package.json +45 -67
- package/postinstall.js +6 -6
- package/register.d.ts +1 -1
- package/register.js +4 -39
- package/tracing.d.ts +1 -2
- package/tracing.js +22 -287
- package/web-vite.mjs +156 -239
- package/CONSUMING-APPS-GUIDE.md +0 -455
- package/NPM_README.md +0 -1933
- package/SKILL-API.md +0 -600
- package/SKILL-CLI.md +0 -409
- package/cidr.js +0 -83
- package/cli/apps.js +0 -585
- package/cli/auth.js +0 -280
- package/cli/client.js +0 -115
- package/cli/config.js +0 -173
- package/cli/firewall.js +0 -100
- package/cli/fp.js +0 -638
- package/cli/init.js +0 -201
- package/cli/monitor.js +0 -440
- package/cli/run.js +0 -133
- package/cli/security.js +0 -1064
- package/cli/ui.js +0 -386
- package/docs/API-KEYS-GUIDE.md +0 -233
- package/docs/AUTO-SETUP-SUMMARY.md +0 -331
- package/docs/BODY-CAPTURE-FIX.md +0 -261
- package/docs/COMPLETION-REPORT.md +0 -408
- package/docs/FINAL-SOLUTION.md +0 -335
- package/docs/FIREWALL-GUIDE.md +0 -426
- package/docs/IMPLEMENTATION-SUMMARY.md +0 -410
- package/docs/NEXTJS-BODY-CAPTURE-COMPARISON.md +0 -323
- package/docs/NEXTJS-SETUP-COMPLETE.md +0 -795
- package/docs/NUXT-GUIDE.md +0 -166
- package/docs/SOLUTION-SUMMARY.md +0 -312
- package/firewall-cloud.js +0 -212
- package/firewall-iptables.js +0 -139
- package/firewall-only.js +0 -38
- package/firewall-tcp.js +0 -74
- package/firewall.js +0 -720
- package/free-trial-banner.js +0 -174
- package/nuxt-server-plugin.mjs +0 -423
- package/nuxt.d.ts +0 -60
- package/nuxt.mjs +0 -75
- package/resolve-ip.js +0 -77
|
@@ -1,234 +1,239 @@
|
|
|
1
|
-
# SecureNow Logging - Quick Start
|
|
2
|
-
|
|
3
|
-
Get logging set up in your Node.js app in under 2 minutes!
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
#
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
console.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
[securenow]
|
|
68
|
-
[securenow]
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
---
|
|
72
|
-
|
|
73
|
-
## 5. View Logs in
|
|
74
|
-
|
|
75
|
-
1. Open your
|
|
76
|
-
2. Go to **Logs** section
|
|
77
|
-
3. Filter by `service.name = my-app`
|
|
78
|
-
4. See all your logs with automatic trace correlation!
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## Framework-Specific Examples
|
|
83
|
-
|
|
84
|
-
### Express.js
|
|
85
|
-
|
|
86
|
-
```javascript
|
|
87
|
-
// app.js
|
|
88
|
-
require('securenow/register');
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
require
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
require('securenow/register');
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
console.
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
1
|
+
# SecureNow Logging - Quick Start
|
|
2
|
+
|
|
3
|
+
Get logging set up in your Node.js app in under 2 minutes!
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install securenow
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## 2. Configure Environment
|
|
16
|
+
|
|
17
|
+
Create `.env` file or export variables:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
SECURENOW_LOGGING_ENABLED=1
|
|
21
|
+
SECURENOW_APPID=my-app
|
|
22
|
+
SECURENOW_INSTANCE=http://your-signoz-server:4318
|
|
23
|
+
|
|
24
|
+
# For SigNoz Cloud:
|
|
25
|
+
# SECURENOW_INSTANCE=https://ingest.<region>.signoz.cloud:443
|
|
26
|
+
# OTEL_EXPORTER_OTLP_HEADERS="signoz-ingestion-key=<your-key>"
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## 3. Add to Your App
|
|
32
|
+
|
|
33
|
+
**Option A: Automatic Console Logging (Easiest)**
|
|
34
|
+
|
|
35
|
+
Add these two lines at the top of your main file:
|
|
36
|
+
|
|
37
|
+
```javascript
|
|
38
|
+
// app.js, index.js, server.js, or main.ts
|
|
39
|
+
require('securenow/register');
|
|
40
|
+
require('securenow/console-instrumentation');
|
|
41
|
+
|
|
42
|
+
// That's it! Now use console normally
|
|
43
|
+
console.log('App started');
|
|
44
|
+
console.error('An error occurred', { userId: 123 });
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Option B: Use NODE_OPTIONS (No code changes)**
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
NODE_OPTIONS="-r securenow/register -r securenow/console-instrumentation" node app.js
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 4. Run Your App
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
node app.js
|
|
59
|
+
# or
|
|
60
|
+
npm start
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
You should see:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
[securenow] OTel SDK started → http://your-signoz-server:4318/v1/traces
|
|
67
|
+
[securenow] 📋 Logging: ENABLED → http://your-signoz-server:4318/v1/logs
|
|
68
|
+
[securenow] Console instrumentation installed
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 5. View Logs in SigNoz
|
|
74
|
+
|
|
75
|
+
1. Open your SigNoz dashboard
|
|
76
|
+
2. Go to **Logs** section
|
|
77
|
+
3. Filter by `service.name = my-app`
|
|
78
|
+
4. See all your logs with automatic trace correlation!
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Framework-Specific Examples
|
|
83
|
+
|
|
84
|
+
### Express.js
|
|
85
|
+
|
|
86
|
+
```javascript
|
|
87
|
+
// app.js
|
|
88
|
+
require('securenow/register');
|
|
89
|
+
require('securenow/console-instrumentation');
|
|
90
|
+
|
|
91
|
+
const express = require('express');
|
|
92
|
+
const app = express();
|
|
93
|
+
|
|
94
|
+
app.get('/', (req, res) => {
|
|
95
|
+
console.log('Request received');
|
|
96
|
+
res.send('Hello World');
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
app.listen(3000);
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Next.js
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
// instrumentation.ts (in project root)
|
|
106
|
+
export async function register() {
|
|
107
|
+
if (process.env.NEXT_RUNTIME === 'nodejs') {
|
|
108
|
+
process.env.SECURENOW_LOGGING_ENABLED = '1';
|
|
109
|
+
await import('securenow/register');
|
|
110
|
+
await import('securenow/console-instrumentation');
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
# .env.local
|
|
117
|
+
SECURENOW_LOGGING_ENABLED=1
|
|
118
|
+
SECURENOW_APPID=my-nextjs-app
|
|
119
|
+
SECURENOW_INSTANCE=http://localhost:4318
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Fastify
|
|
123
|
+
|
|
124
|
+
```javascript
|
|
125
|
+
// server.js
|
|
126
|
+
require('securenow/register');
|
|
127
|
+
require('securenow/console-instrumentation');
|
|
128
|
+
|
|
129
|
+
const fastify = require('fastify')();
|
|
130
|
+
|
|
131
|
+
fastify.get('/', async () => {
|
|
132
|
+
console.log('Route called');
|
|
133
|
+
return { hello: 'world' };
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
fastify.listen({ port: 3000 });
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### NestJS
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
// main.ts
|
|
143
|
+
require('securenow/register');
|
|
144
|
+
require('securenow/console-instrumentation');
|
|
145
|
+
|
|
146
|
+
import { NestFactory } from '@nestjs/core';
|
|
147
|
+
import { AppModule } from './app.module';
|
|
148
|
+
|
|
149
|
+
async function bootstrap() {
|
|
150
|
+
const app = await NestFactory.create(AppModule);
|
|
151
|
+
console.log('App starting');
|
|
152
|
+
await app.listen(3000);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
bootstrap();
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Troubleshooting
|
|
161
|
+
|
|
162
|
+
**Logs not appearing?**
|
|
163
|
+
|
|
164
|
+
1. Check `SECURENOW_LOGGING_ENABLED=1` is set
|
|
165
|
+
2. Verify SigNoz endpoint is correct
|
|
166
|
+
3. Enable debug: `OTEL_LOG_LEVEL=debug`
|
|
167
|
+
|
|
168
|
+
**Console instrumentation not working?**
|
|
169
|
+
|
|
170
|
+
Make sure require order is correct:
|
|
171
|
+
|
|
172
|
+
```javascript
|
|
173
|
+
// ✅ Correct
|
|
174
|
+
require('securenow/register'); // First
|
|
175
|
+
require('securenow/console-instrumentation'); // Second
|
|
176
|
+
|
|
177
|
+
// ❌ Wrong
|
|
178
|
+
require('express');
|
|
179
|
+
require('securenow/register'); // Too late!
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
---
|
|
183
|
+
|
|
184
|
+
## What Gets Logged?
|
|
185
|
+
|
|
186
|
+
All standard console methods:
|
|
187
|
+
|
|
188
|
+
- `console.log()` → INFO
|
|
189
|
+
- `console.info()` → INFO
|
|
190
|
+
- `console.warn()` → WARN
|
|
191
|
+
- `console.error()` → ERROR
|
|
192
|
+
- `console.debug()` → DEBUG
|
|
193
|
+
|
|
194
|
+
**Structured logging example:**
|
|
195
|
+
|
|
196
|
+
```javascript
|
|
197
|
+
console.log('User logged in', {
|
|
198
|
+
userId: 123,
|
|
199
|
+
email: 'user@example.com',
|
|
200
|
+
ip: '192.168.1.1'
|
|
201
|
+
});
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
This creates a log with attributes you can filter/search in SigNoz!
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Advanced Usage
|
|
209
|
+
|
|
210
|
+
**Direct Logger API:**
|
|
211
|
+
|
|
212
|
+
```javascript
|
|
213
|
+
const { getLogger } = require('securenow/tracing');
|
|
214
|
+
const logger = getLogger('my-module', '1.0.0');
|
|
215
|
+
|
|
216
|
+
logger.emit({
|
|
217
|
+
severityNumber: 9,
|
|
218
|
+
severityText: 'INFO',
|
|
219
|
+
body: 'Custom log message',
|
|
220
|
+
attributes: {
|
|
221
|
+
customField: 'value',
|
|
222
|
+
},
|
|
223
|
+
});
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Next Steps
|
|
229
|
+
|
|
230
|
+
- [Complete Logging Guide](./LOGGING-GUIDE.md) - All features and options
|
|
231
|
+
- [View Logs in SigNoz](https://signoz.io/docs/logs-management/overview/)
|
|
232
|
+
- [Set Up Log Alerts](https://signoz.io/docs/alerts-management/log-based-alerts/)
|
|
233
|
+
- [Combine with Tracing](../README.md) - Full observability
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
**That's it!** 🎉 Your app is now sending logs to SigNoz.
|
|
238
|
+
|
|
239
|
+
Need help? Check the [full documentation](./LOGGING-GUIDE.md) or open an issue.
|
|
@@ -213,7 +213,7 @@ your-nextjs-app/
|
|
|
213
213
|
-d '{"username":"test","password":"secret123"}'
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
-
4. **Check
|
|
216
|
+
4. **Check SigNoz:**
|
|
217
217
|
- Find the `/api/test` trace
|
|
218
218
|
- Look for `http.request.body` attribute
|
|
219
219
|
- Verify password shows `[REDACTED]`
|
|
@@ -259,7 +259,7 @@ export const config = {
|
|
|
259
259
|
```bash
|
|
260
260
|
# Required
|
|
261
261
|
SECURENOW_APPID=my-nextjs-app
|
|
262
|
-
SECURENOW_INSTANCE=http://your-
|
|
262
|
+
SECURENOW_INSTANCE=http://your-signoz:4318
|
|
263
263
|
|
|
264
264
|
# Optional: Enable body capture
|
|
265
265
|
SECURENOW_CAPTURE_BODY=1
|
package/docs/NEXTJS-GUIDE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SecureNow for Next.js - Complete Integration Guide
|
|
2
2
|
|
|
3
|
-
Send traces and logs from your Next.js app to
|
|
3
|
+
Send traces and logs from your Next.js app to SigNoz (or any OpenTelemetry-compatible backend) in under 2 minutes.
|
|
4
4
|
|
|
5
5
|
## 🚀 Quick Start (2 Simple Steps!)
|
|
6
6
|
|
|
@@ -27,11 +27,11 @@ pnpm add securenow
|
|
|
27
27
|
Edit the `.env.local` file that was created:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
# Required: Your app name (shows up in
|
|
30
|
+
# Required: Your app name (shows up in SigNoz)
|
|
31
31
|
SECURENOW_APPID=my-nextjs-app
|
|
32
32
|
|
|
33
|
-
# Required: Your
|
|
34
|
-
SECURENOW_INSTANCE=http://your-
|
|
33
|
+
# Required: Your SigNoz server endpoint
|
|
34
|
+
SECURENOW_INSTANCE=http://your-signoz-server:4318
|
|
35
35
|
|
|
36
36
|
# Optional: API key for authentication
|
|
37
37
|
OTEL_EXPORTER_OTLP_HEADERS="x-api-key=your-api-key-here"
|
|
@@ -155,7 +155,7 @@ See [REQUEST-BODY-CAPTURE.md](./REQUEST-BODY-CAPTURE.md) for full details.
|
|
|
155
155
|
SECURENOW_APPID=my-nextjs-app
|
|
156
156
|
|
|
157
157
|
# Optional Configuration
|
|
158
|
-
SECURENOW_INSTANCE=http://your-
|
|
158
|
+
SECURENOW_INSTANCE=http://your-signoz-server:4318
|
|
159
159
|
SECURENOW_NO_UUID=1 # Don't append UUID (useful for dev)
|
|
160
160
|
OTEL_LOG_LEVEL=info # debug|info|warn|error
|
|
161
161
|
SECURENOW_DISABLE_INSTRUMENTATIONS=fs,dns # Disable specific instrumentations
|
|
@@ -178,7 +178,7 @@ import { registerSecureNow } from 'securenow/nextjs';
|
|
|
178
178
|
export function register() {
|
|
179
179
|
registerSecureNow({
|
|
180
180
|
serviceName: 'my-nextjs-app',
|
|
181
|
-
endpoint: 'http://your-
|
|
181
|
+
endpoint: 'http://your-signoz-server:4318',
|
|
182
182
|
noUuid: false,
|
|
183
183
|
disableInstrumentations: ['fs', 'dns'],
|
|
184
184
|
headers: {
|
|
@@ -243,7 +243,7 @@ COPY . .
|
|
|
243
243
|
RUN npm run build
|
|
244
244
|
|
|
245
245
|
ENV SECURENOW_APPID=my-nextjs-app
|
|
246
|
-
ENV SECURENOW_INSTANCE=http://
|
|
246
|
+
ENV SECURENOW_INSTANCE=http://signoz:4318
|
|
247
247
|
|
|
248
248
|
EXPOSE 3000
|
|
249
249
|
CMD ["npm", "start"]
|
|
@@ -255,7 +255,7 @@ Just set environment variables and run:
|
|
|
255
255
|
|
|
256
256
|
```bash
|
|
257
257
|
export SECURENOW_APPID=my-nextjs-app
|
|
258
|
-
export SECURENOW_INSTANCE=http://your-
|
|
258
|
+
export SECURENOW_INSTANCE=http://your-signoz-server:4318
|
|
259
259
|
npm start
|
|
260
260
|
```
|
|
261
261
|
|
|
@@ -288,14 +288,14 @@ Make sure you're on the latest version:
|
|
|
288
288
|
npm install securenow@latest
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
### Traces not appearing in
|
|
291
|
+
### Traces not appearing in SigNoz
|
|
292
292
|
|
|
293
293
|
1. **Check endpoint:**
|
|
294
294
|
```bash
|
|
295
|
-
curl http://your-
|
|
295
|
+
curl http://your-signoz-server:4318/v1/traces
|
|
296
296
|
```
|
|
297
297
|
|
|
298
|
-
2. **Verify connectivity:** Make sure your app can reach
|
|
298
|
+
2. **Verify connectivity:** Make sure your app can reach SigNoz
|
|
299
299
|
|
|
300
300
|
3. **Check authentication:** If using API keys, verify headers
|
|
301
301
|
|
|
@@ -311,7 +311,7 @@ SECURENOW_DISABLE_INSTRUMENTATIONS=fs,dns,net
|
|
|
311
311
|
## 📖 Comparison with Other Solutions
|
|
312
312
|
|
|
313
313
|
### vs. `@vercel/otel`
|
|
314
|
-
- ✅ **SecureNow**: Pre-configured for
|
|
314
|
+
- ✅ **SecureNow**: Pre-configured for SigNoz, includes auto-instrumentations
|
|
315
315
|
- ⚠️ **@vercel/otel**: Requires manual instrumentation setup
|
|
316
316
|
|
|
317
317
|
### vs. Manual OpenTelemetry Setup
|
|
@@ -375,7 +375,7 @@ Check the `examples/` folder for:
|
|
|
375
375
|
|
|
376
376
|
- **Issues:** [GitHub Issues](https://github.com/your-repo/securenow/issues)
|
|
377
377
|
- **Documentation:** [Full Documentation](https://your-docs-site.com)
|
|
378
|
-
- **
|
|
378
|
+
- **SigNoz Docs:** [SigNoz OpenTelemetry Docs](https://signoz.io/docs/)
|
|
379
379
|
|
|
380
380
|
---
|
|
381
381
|
|
|
@@ -385,5 +385,5 @@ ISC
|
|
|
385
385
|
|
|
386
386
|
---
|
|
387
387
|
|
|
388
|
-
**Made with ❤️ for the Next.js and
|
|
388
|
+
**Made with ❤️ for the Next.js and SigNoz community**
|
|
389
389
|
|
|
@@ -8,7 +8,7 @@ This approach **never interferes** with your middleware or routing.
|
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
SECURENOW_APPID=my-app
|
|
11
|
-
SECURENOW_INSTANCE=http://
|
|
11
|
+
SECURENOW_INSTANCE=http://signoz:4318
|
|
12
12
|
SECURENOW_CAPTURE_BODY=1
|
|
13
13
|
```
|
|
14
14
|
|
|
@@ -155,7 +155,7 @@ export async function GET() {
|
|
|
155
155
|
```bash
|
|
156
156
|
# Required
|
|
157
157
|
SECURENOW_APPID=my-nextjs-app
|
|
158
|
-
SECURENOW_INSTANCE=http://your-
|
|
158
|
+
SECURENOW_INSTANCE=http://your-signoz:4318
|
|
159
159
|
|
|
160
160
|
# Body capture
|
|
161
161
|
SECURENOW_CAPTURE_BODY=1 # Enable body capture
|
|
@@ -439,7 +439,7 @@ If "token" is sensitive, these get redacted:
|
|
|
439
439
|
-d '{"username":"test","password":"secret123"}'
|
|
440
440
|
```
|
|
441
441
|
|
|
442
|
-
3. **Check
|
|
442
|
+
3. **Check SigNoz:**
|
|
443
443
|
- Find the trace
|
|
444
444
|
- Look for `http.request.body`
|
|
445
445
|
- Verify password shows `[REDACTED]`
|