Back to Docs Overview
SDKs
TypeScript SDK
Complete reference for the @contextpulse/sdk npm package.
Configuration Options
The `withContextPulse` function accepts a configuration object with the following properties:
Full Options Interface
interface ContextPulseOptions {
// Required: Workspace ingestion key
apiKey: string;
// Logical name of your service
service?: string;
// Deployment environment: "production" | "staging" | "development"
environment?: string;
// If true, omits tool arguments and response payloads entirely
metadataOnly?: boolean;
// Custom keys to scrub from tool parameters (in addition to defaults)
redactKeys?: string[];
// Telemetry flush interval in milliseconds (default: 5000)
flushIntervalMs?: number;
// Maximum queue size before forcing a flush (default: 50)
maxQueueSize?: number;
// Custom hook to filter or enrich event payload before transmission
beforeSend?: (event: ContextPulseEvent) => ContextPulseEvent | null;
}