Shared TypeScript type definitions for the LogTide JavaScript SDK ecosystem.
npm install @logtide/types
# or
pnpm add @logtide/types
# or
yarn add @logtide/types
Note: You typically don't need to install this package directly. It's automatically included as a dependency of @logtide/core and all framework packages.
import type { LogLevel, LogEntry, InternalLogEntry } from '@logtide/types';
| Type |
Description |
LogLevel |
'debug' | 'info' | 'warn' | 'error' | 'critical' |
LogEntry |
Log entry with service, level, message, metadata, trace/span IDs |
InternalLogEntry |
LogEntry with required time field (used internally) |
import type { Span, SpanStatus, SpanAttributes } from '@logtide/types';
| Type |
Description |
Span |
Distributed trace span with traceId, spanId, name, status, timing |
SpanStatus |
'ok' | 'error' | 'unset' |
SpanAttributes |
Record<string, string | number | boolean | undefined> |
import type { Breadcrumb, BreadcrumbType } from '@logtide/types';
| Type |
Description |
BreadcrumbType |
'http' | 'navigation' | 'ui' | 'console' | 'error' | 'query' | 'custom' |
Breadcrumb |
Breadcrumb with type, category, message, level, timestamp, data |
import type { Transport, Integration, Client } from '@logtide/types';
| Type |
Description |
Transport |
Interface for sending logs and spans (sendLogs, sendSpans, flush) |
Integration |
Plugin interface with setup(client) and optional teardown() |
Client |
Minimal client interface for integrations |
import type { ClientOptions, DSN } from '@logtide/types';
| Type |
Description |
ClientOptions |
Full configuration: DSN (or apiUrl + apiKey), service, batching, retry, circuit breaker, etc. |
DSN |
Parsed DSN with apiUrl, apiKey |
MIT License - see LICENSE for details.