SecureNow README

The full upstream README, mirrored for reference. Install config, tool schemas, adoption signals and our own overview live on the SecureNow listing page.

SecureNow

OpenTelemetry instrumentation for Node.js and Next.js applications - send traces and logs to SigNoz or any OTLP-compatible backend.

Official npm package: securenow


πŸš€ Quick Start

For Next.js Applications

The easiest way to add observability to Next.js!

bash
# Just install - setup is automatic!
npm install securenow

πŸŽ‰ The installer will automatically:

  • Detect your Next.js project
  • Create instrumentation.ts (or .js)
  • Create .env.local template

Just answer "Y" when prompted!

Then configure your .env.local:

bash
SECURENOW_APPID=my-nextjs-app
SECURENOW_INSTANCE=http://your-signoz-server:4318

Alternative: Use the CLI command

Terminal
npx securenow init

Done! πŸŽ‰ See Next.js Complete Guide for details.


For Node.js Applications (Express, Fastify, NestJS, etc.)

Tracing Only

server.ts
# 1. Install
npm install securenow

# 2. Set environment variables
export SECURENOW_APPID=my-app
export SECURENOW_INSTANCE=http://your-signoz-server:4318

# 3. Run with preload
NODE_OPTIONS="-r securenow/register" node app.js
# or
NODE_OPTIONS="-r securenow/register" npm start

Tracing + Logging (Recommended)

server.ts
# 1. Install
npm install securenow

# 2. Set environment variables
export SECURENOW_APPID=my-app
export SECURENOW_INSTANCE=http://your-signoz-server:4318
export SECURENOW_LOGGING_ENABLED=1

# 3. Run with preload (adds logging)
NODE_OPTIONS="-r securenow/register -r securenow/console-instrumentation" node app.js

# Now all console.log/info/warn/error automatically go to SigNoz!

πŸ“¦ Installation

Terminal
npm install securenow
# or
yarn add securenow
# or
pnpm add securenow

βš™οΈ Configuration

Environment Variables

bash
# Required: Your application identifier
SECURENOW_APPID=my-app-name

# Optional: Your SigNoz/OTLP collector endpoint
# Default: https://freetrial.securenow.ai:4318
SECURENOW_INSTANCE=http://your-signoz-server:4318

# Optional: Enable Logging
SECURENOW_LOGGING_ENABLED=1                 # Enable automatic log collection

# Optional: Additional configuration
SECURENOW_NO_UUID=1                         # Don't append UUID to service name
OTEL_LOG_LEVEL=info                         # debug|info|warn|error
SECURENOW_DISABLE_INSTRUMENTATIONS=fs,dns   # Disable specific instrumentations
OTEL_EXPORTER_OTLP_HEADERS="x-api-key=..."  # Authentication headers

# Optional: Request body capture (for debugging)
SECURENOW_CAPTURE_BODY=1                    # Capture request bodies in traces
SECURENOW_MAX_BODY_SIZE=10240               # Max body size in bytes
SECURENOW_SENSITIVE_FIELDS="field1,field2"  # Additional fields to redact

Legacy Environment Variables (still supported)

server.ts
export securenow=<API-KEY>
export securenow_instance='http://<dedicated_instance>:4318'

🎯 Supported Frameworks & Libraries

SecureNow automatically instruments:

Web Frameworks

  • βœ… Next.js (App Router & Pages Router)
  • βœ… Express.js
  • βœ… Fastify
  • βœ… NestJS
  • βœ… Koa
  • βœ… Hapi

Databases

  • βœ… PostgreSQL
  • βœ… MySQL / MySQL2
  • βœ… MongoDB
  • βœ… Redis

Logging

  • βœ… Automatic console logging (console.log, info, warn, error)
  • βœ… Structured logging with OpenTelemetry
  • βœ… Automatic trace-log correlation
  • βœ… Works with all frameworks

Other

  • βœ… HTTP/HTTPS requests
  • βœ… GraphQL
  • βœ… gRPC
  • βœ… And many more via OpenTelemetry auto-instrumentation

πŸ“š Documentation

Quick Starts

Complete Guides

Examples


πŸ†˜ Support

  • Website: securenow.ai
  • Issues: Report bugs and request features
  • Documentation: Full documentation and guides

πŸ“„ License

ISC