Skip to content

Official JavaScript SDKs for LogTide — distributed tracing, error capture, and structured logging for Node.js, Next.js, Nuxt, SvelteKit, Hono, Angular, and Elysia

License

Notifications You must be signed in to change notification settings

logtide-dev/logtide-javascript

LogTide Logo

LogTide JavaScript SDK

Release License CI

Official JavaScript SDKs for LogTide — self-hosted log management with distributed tracing, error capture, and breadcrumbs for every major framework.


Packages

Package Version Description
@logtide/types npm Shared type definitions
@logtide/core npm Core client, hub, transports, and utilities
@logtide/express npm Express middleware
@logtide/fastify npm Fastify plugin
@logtide/nextjs npm Next.js integration (App Router & Pages)
@logtide/nuxt npm Nuxt 3 module with Nitro hooks
@logtide/sveltekit npm SvelteKit hooks integration
@logtide/hono npm Hono middleware
@logtide/angular npm Angular ErrorHandler, HTTP Interceptor
@logtide/elysia npm Elysia plugin
@logtide/sdk-node npm Legacy Node.js SDK (use @logtide/express or @logtide/fastify instead)

Quick Start

Every framework package follows the same pattern — pass your DSN and service name:

# Install for your framework
npm install @logtide/express   # Express
npm install @logtide/fastify   # Fastify
npm install @logtide/nextjs    # Next.js
npm install @logtide/nuxt      # Nuxt 3
npm install @logtide/sveltekit # SvelteKit
npm install @logtide/hono      # Hono
npm install @logtide/angular   # Angular
npm install @logtide/elysia    # Elysia
// Every integration follows the same pattern:
{
  dsn: 'https://lp_your_key@your-logtide-instance.com',
  service: 'my-app',
}

// Or use apiUrl + apiKey separately:
{
  apiUrl: 'https://your-logtide-instance.com',
  apiKey: 'lp_your_key',
  service: 'my-app',
}

See each package's README for framework-specific setup instructions.


Architecture

@logtide/types          ← Shared TypeScript interfaces
    ↓
@logtide/core           ← Client, Hub, Scope, Transports, Integrations
    ↓
├── @logtide/express    ← Express middleware
├── @logtide/fastify    ← Fastify plugin
├── @logtide/nextjs     ← Next.js (App Router + Pages)
├── @logtide/nuxt       ← Nuxt 3 (Nitro + Vue)
├── @logtide/sveltekit  ← SvelteKit (handle/handleError/handleFetch)
├── @logtide/hono       ← Hono middleware
├── @logtide/angular    ← Angular (ErrorHandler + HttpInterceptor)
├── @logtide/elysia     ← Elysia plugin
└── @logtide/sdk-node   ← Legacy standalone Node.js SDK

All framework packages share @logtide/core for:

  • Distributed tracing (W3C Trace Context / traceparent)
  • Error serialization with structured stack traces
  • Breadcrumbs for navigation, HTTP, console, and custom events
  • Batched transport with retry logic and circuit breaker
  • Scope isolation per request

Development

# Install dependencies
pnpm install

# Build all packages
pnpm build

# Run all tests
pnpm test

# TypeScript check
pnpm typecheck

# Set version across all packages
pnpm version:set 0.6.0

Branch Model

feature/* ──> develop ──> main ──> tag v*.*.* ──> npm publish
hotfix/*  ──> main (direct, for urgent fixes)

See .github/BRANCH_PROTECTION.md for full details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

MIT License — see LICENSE for details.

Links

Packages

No packages published

Languages