npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

autonomize-sdk

v1.15.17

Published

A lightweight, easy-to-use SDK for implementing OpenTelemetry in Node.js and Nest.js applications. This SDK provides unified instrumentation for traces, metrics, and logs with automatic context propagation.

Downloads

2,560

Readme

Autonomize SDK (@autonomize/sdk)

The official TypeScript SDK for Autonomize platform, providing unified access to Genesis API and OpenTelemetry capabilities. This SDK bundles both @autonomize/genesis and @autonomize/otel packages for a seamless integration experience.

Installation

# Using npm
npm install autonomize-sdk

# Using yarn
yarn add autonomize-sdk

# Using pnpm
pnpm add autonomize-sdk

Quick Start

import { Genesis, OTEL } from 'autonomize-sdk';
// or
import SDK from 'autonomize-sdk';

// Initialize Genesis
const genesis = new Genesis({
  baseURL: 'https://api-genesis.sprint.autonomize.dev/api/v1/',
  auth: {
    baseUrl: 'https://auth.sprint.autonomize.dev/',
    realm: 'autonomize',
    clientId: 'your-client-id',
    clientSecret: 'your-client-secret'
  }
});

// Initialize OTEL
const telemetry = new OTEL({
  serviceName: 'your-service-name',
  environment: 'production',
  version: '1.0.0',
  otlpEndpoint: 'http://localhost:4318'
});

// Start services
await genesis.initialize();
await telemetry.start();

Features

Genesis Features

  • 🔑 Secure Authentication

    • Keycloak integration
    • Multiple authentication flows
    • Automatic token management
  • 🤖 Copilot Management

    • Assign and manage copilots
    • Customize copilot behavior
    • Monitor copilot performance

OTEL Features

  • 📊 Unified Metrics Collection

    • Custom metrics with counters and histograms
    • Configurable export intervals
    • Pre-configured attributes
  • 🔍 Distributed Tracing

    • Automatic context propagation
    • Built-in span management
    • Error recording
  • 📝 Structured Logging

    • Trace correlation
    • Multiple severity levels
    • Error stack trace handling

Package Components

Genesis Module

import { Genesis } from 'autonomize-sdk';

const genesis = new Genesis({
  baseURL: 'https://api.example.com',
  auth: {
    baseUrl: 'https://auth.example.com',
    realm: 'your-realm',
    clientId: 'your-client-id',
    clientSecret: 'your-client-secret'
  }
});

// Make API calls
const copilots = await genesis.copilots.getAssignedCopilots({
  page: 1,
  limit: 10
});

OTEL Module

import { OTEL } from 'autonomize-sdk';

const telemetry = new OTEL({
  serviceName: 'your-service',
  environment: 'production'
});

// Create metrics
const requestCounter = telemetry.createCounter({
  name: 'http_requests_total',
  description: 'Total HTTP requests',
  unit: 'requests'
});

// Create traces
await telemetry.createSpan('operation-name', async () => {
  // Your operation code
});

// Add logs
telemetry.info('Operation started', { type: 'process' });

Requirements

  • Node.js >= 18
  • TypeScript >= 5 (if using TypeScript)
  • Auth (Keycloak) server for Genesis features
  • OpenTelemetry collector for OTEL features

Error Handling

The SDK provides consistent error handling across all components:

try {
  // Genesis operations
  await genesis.copilots.getAssignedCopilots(args);
  
  // OTEL operations
  await telemetry.createSpan('operation', async () => {
    // Your code
  });
} catch (error) {
  console.error('Error:', error.message);
  console.error('Details:', error.error);
}

Playground

To test new features or debug locally:

  1. Clone the repository:

    git clone https://github.com/autonomize-ai/autonomize-sdk-js.git
    cd autonomize-sdk-js
  2. Set up the playground:

    cd playground
    cp .env.example .env   # Configure your environment variables
    pnpm install
  3. Run the playground:

    pnpm dev

This will start a development environment where you can test SDK features without publishing to npm.

Support

For support and inquiries:

Contributing

We welcome contributions! Please read our contributing guidelines for details on our code of conduct and the process for submitting pull requests.