Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@codefresh-io/cf-telemetry

Package Overview
Dependencies
Maintainers
26
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codefresh-io/cf-telemetry

Base utils for monitoring.

Source
npmnpm
Version
4.1.2
Version published
Maintainers
26
Created
Source

cf-telemetry

Base utils for monitoring.

Includes:

  • Logs, fast and well-structured.
  • MongoDB client monitoring helper.
  • OpenTelemetry auto instrumentation, API and helpers.
  • Prometheus server and custom metrics.
  • Pyroscope to profile CPU and memory.

Usage

Add import '@codefresh-io/cf-telemetry/init' statement at the very beginning of the application lifecycle.

Please refer to the separate docs above for further configuration and usage details.

// index.ts
// ↓ Should be imported first
import '@codefresh-io/cf-telemetry/init'
// ↓ Keep one blank line below to prevent automatic import reordering

Lifecycle notice

This library only registers terminate listener beforeExit event to gracefully terminate instrumentation, which may include flushing logs, metrics, and profiles.

Please ensure calling terminate() method of this library before calling process.exit(), or to include it in your application logic that handles SIGINT/SIGTERM signals, to ensure graceful termination of instrumentation.

import { terminate } from '@codefresh-io/cf-telemetry/init'

// ...your application logic
await terminate();    // Ensure graceful termination of instrumentation
process.exit(0);      // Now it's safe to exit the process
import { terminate } from '@codefresh-io/cf-telemetry/init'

process.on('SIGINT', async () => {
  await terminate();    // Ensure graceful termination of instrumentation
  process.exit(130);    // Now it's safe to exit the process
});
process.on('SIGTERM', async () => {
  await terminate();    // Ensure graceful termination of instrumentation
  process.exit(143);    // Now it's safe to exit the process
});

Environment variables

VariableRequiredDefault valueDescription
CF_SERVICE_NAMEoptionalunknown_service:nodeSets service name for OpenTelemetry, Pyroscope and Prometheus.
CF_SERVICE_VERSIONoptionalunknownSets service name for OpenTelemetry, Pyroscope and Prometheus.

FAQs

Package last updated on 01 Apr 2026

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