securenow 5.11.1 → 5.11.2
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/nextjs.js +3 -3
- package/package.json +1 -1
package/nextjs.js
CHANGED
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
* SECURENOW_INSTANCE=http://your-otlp-backend:4318
|
|
38
38
|
*/
|
|
39
39
|
|
|
40
|
-
const {
|
|
40
|
+
const { randomUUID } = require('crypto');
|
|
41
41
|
|
|
42
42
|
const env = k => process.env[k] ?? process.env[k.toUpperCase()] ?? process.env[k.toLowerCase()];
|
|
43
43
|
|
|
@@ -157,9 +157,9 @@ function registerSecureNow(options = {}) {
|
|
|
157
157
|
// service.name
|
|
158
158
|
let serviceName;
|
|
159
159
|
if (baseName) {
|
|
160
|
-
serviceName = noUuid ? baseName : `${baseName}-${
|
|
160
|
+
serviceName = noUuid ? baseName : `${baseName}-${randomUUID()}`;
|
|
161
161
|
} else {
|
|
162
|
-
serviceName = `nextjs-app-${
|
|
162
|
+
serviceName = `nextjs-app-${randomUUID()}`;
|
|
163
163
|
console.warn('[securenow] ⚠️ No SECURENOW_APPID or OTEL_SERVICE_NAME provided. Using fallback: %s', serviceName);
|
|
164
164
|
console.warn('[securenow] 💡 Set SECURENOW_APPID=your-app-name in .env.local for better tracking');
|
|
165
165
|
}
|
package/package.json
CHANGED