New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

cloudgrip

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudgrip

**CloudGrip** is the world’s first **AI-native observability platform**. It doesn’t just collect logs and metrics — it finds and fixes bugs in production **automatically**.

latest
npmnpm
Version
1.1.4
Version published
Maintainers
1
Created
Source

CloudGrip SDK for Node.js

CloudGrip is the world’s first AI-native observability platform. It doesn’t just collect logs and metrics — it finds and fixes bugs in production automatically.

  • ⚡️ Zero-config setup
  • 🧠 Real-time AI root cause analysis
  • 🔍 Detects the exact line of code causing a problem
  • ✅ Auto-generates pull requests with the fix

CloudGrip turns observability from passive data collection into an active DevOps agent — fixing issues before users even notice.

👉 Learn more at cloudgrip.ai

Installation

npm install cloudgrip

Getting Started

🔹 Send Logs

import { CloudGrip } from 'cloudgrip';

const cg = new CloudGrip({
  apiKey: 'cg_123456789',
});

cg.logger.info('User login', { userId: 'abc123' });
cg.logger.error(new Error('Something went wrong'), 'Failed to process request');

🔹 Send Metrics

cg.metrics.counter('http.requests');
cg.metrics.histogram('http.request.duration', 245);
cg.metrics.gauge('heap.usage.bytes', process.memoryUsage().heapUsed);

🔹 Send Traces

const spanId = cg.tracer.span('db_query', { traceId: 'abc123' });
// ... your code here ...
cg.tracer.endSpan(spanId);

🔹 Use CloudGrip with Pino

import pino from 'pino';

const logger = pino({
  transport: {
    target: 'cloudgrip/transport',
    options: {
      apiKey: 'cg_123456789',
    },
  },
});

logger.info('This log is sent to CloudGrip');

Log Levels

MethodLevelDescription
trace()10Most detailed logs — every step, for deep debugging
debug()20Internal debugging info
info()30Normal logs: service start, request handled, etc.
warn()40Something unexpected, but not broken
error()50An error occurred, but app continues to run
fatal()60Unrecoverable error, likely before shutdown

Configuration

Pass the following options when creating the SDK instance:

const cg = new CloudGrip({
  apiKey: 'cg_123456789',
  host: 'https://telemetry-api.cloudgrip.ai', // optional
  logLevel: 'info',                          // optional
  logToConsole: true,                        // optional
  maxBufferSize: 1000,                       // optional
  flushIntervalMs: 5000,                     // optional
});
OptionTypeRequiredDescription
apiKeystring✅ YesYour CloudGrip API key
hoststringNoCustom endpoint for telemetry export (defaults to CloudGrip API)
logLevelstringNoMinimum log level (trace, debug, etc.). Default: trace
logToConsolebooleanNoWhether to also print logs to stdout. Default: true in development
maxBufferSizenumberNoMax telemetry items buffered before flushing
flushIntervalMsnumberNoTime (ms) between automatic telemetry flushes

Deployment Environment

The SDK automatically sets deployment.environment based on process.env.NODE_ENV. If NODE_ENV is not set, it defaults to "development".

FAQs

Package last updated on 19 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts