Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

LogTide Logo

@logtide/types

npm License Release

Shared TypeScript type definitions for the LogTide JavaScript SDK ecosystem.


Installation

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.


Exported Types

Log Types

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)

Span Types

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>

Breadcrumb Types

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

Transport & Integration

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

Configuration

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

License

MIT License - see LICENSE for details.

Links