0.0.3 • Published 1 year ago

oreppo v0.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

IMPORTANT NOTE: Oreppo does NOT collect actual HTTP bodies and headers, only parameter names.

Oreppo Node SDK

Oreppo is an OpenTelemetry-based SDK for privacy scanning and monitoring in Node.js applications. It automatically instruments your application to collect HTTP and database traces while respecting privacy concerns.

Installation

npm install oreppo

or

yarn add oreppo

Quickstart

import { Oreppo } from 'oreppo';

// Initialize the SDK
const oreppo = new Oreppo({
    apiKey: 'your-api-key',
    applicationId: 'your-app-id',
});
// Start the SDK
await oreppo.start();

// Your application code here...

// Shutdown when your app terminates
await oreppo.shutdown();

Configuration

The SDK accepts the following configuration options:

OptionTypeRequiredDefaultDescription
apiKeystringYes-Your Oreppo API key
applicationIdstringYes-Unique identifier for your application from Oreppo
flushMsnumberNo60000Interval (in ms) to flush traces to backend
debugbooleanNofalseEnable debug logging

Features

  • Automatic instrumentation of HTTP requests
  • Database query monitoring (PostgreSQL, Redis, MySQL, MongoDB)
  • Privacy-aware data collection
  • Automatic trace aggregation
  • Configurable flush intervals

Privacy Considerations

The SDK is designed with privacy in mind:

  • HTTP bodies and headers are not stored, only parameter names
  • Database queries are collected without actual values
  • Personal data is never transmitted to our servers

Automatic Instrumentation

The SDK automatically instruments:

HTTP Requests

  • Request methods
  • URLs
  • Query parameter names (NOT the values)
  • Status codes
  • Response times
  • Request body parameter names (NOT the values)
  • Request header parameter names (NOT the values)

Database Operations

  • Database system (e.g. PostgreSQL, MySQL, MongoDB)
  • Database query
  • NOTE: Oreppo does NOT collect actual database values, only parameter names.

Manual Shutdown

It's important to properly shutdown the SDK when your application terminates:

process.on('SIGTERM', async () => {
    await oreppo.shutdown();
    process.exit(0);
});

Development

To build the package locally, run:

npm run build

Support

For support, please contact support@oreppo.com or open an issue on our GitHub repository.