Skip to content

newttrace

Discord-native telemetry SDK for structured lifecycle analytics.

Overview

newttrace converts Discord runtime events into structured, exportable telemetry data. Track installs, activations, and attributions without managing infrastructure.

Documentation

Guides

API Reference

  • Exporters — Datadog, Webhook, File, Stream
  • API — SDK methods and type definitions

Quick Start

ts
import { Client, GatewayIntentBits } from "discord.js";
import { initNewttrace, DatadogExporter } from "newttrace";

const client = new Client({ intents: [GatewayIntentBits.Guilds] });

const newttrace = initNewttrace({
  botId: "my-bot",
  exporters: [
    new DatadogExporter({
      apiKey: process.env.DD_API_KEY!,
      service: "my-bot",
    }),
  ],
  auto: true,
  client,
});

client.login(process.env.DISCORD_TOKEN);