Releases: duckbugio/duckbug-js
Releases · duckbugio/duckbug-js
v1.0.0
@duckbug/js v1.0.0
First stable major aligned with the DuckBug ingest contract and duckbug-sdk-spec-style delivery. This release introduces a new public surface for events, transport, and privacy.
Breaking changes
- Provider API — Implementations must expose
sendLog(event, meta?)andsendError(event, meta?)using canonical typesDuckBugLogEventandDuckBugErrorEvent(not legacy ad-hoc log shapes). Console-style methods remain forLogProviderintegration. - DSN / ingest URLs — The DSN must be a full ingest URL in the form
{origin}/ingest/{projectId}:{publicKey}or
{origin}/api/ingest/{projectId}:{publicKey}.
Requests are sent to{dsn-base}/logs,/errors, and optional/logs/batch,/errors/batchwhen batching is enabled. - Event model — Logs and errors follow the wire contract (levels, shared metadata, structured errors with stacktrace,
dTags, etc.). Types and JSON Schemas are published underschemas/in the package. - Privacy pipeline — Events are processed in order: strip sections → sanitize (sensitive keys) → stable
eventId→ optionalbeforeSend.
DuckSDK/Duckhooks apply to all providers;DuckBugProvidercan run its ownbeforeSendwhen used without the core client. - Default
sdkidentity — Finalized events get a defaultsdkblock when omitted (aligned with ingest expectations). - Transport — Configurable batch size, retries,
fetchoverride, andonTransportError. Callflush()before shutdown so queued requests complete. - Branded API — Prefer
Duckwithquack,captureException,setScope, andPond.ripplefor extra sensitive keys.DuckSDKremains the same runtime class.
Highlights
flush()onDuck/DuckBugProviderfor reliable delivery at exit.- Node integration:
registerNodeGlobalErrorHandlersforunhandledRejection/uncaughtException(opt-in). - Docs & tooling: expanded README (full usage example),
bun run check(lint + typecheck + tests), relaxed commitlint forfeat!:and realistic subjects / footers.
Migration (short)
- Replace old provider log APIs with
sendLog/sendErrorand contract types. - Point
dsnat the new ingest URL shape. - Move global metadata to
duck.setScope(...); usebeforeSend/stripSections/flushas needed. - Replace manual error reporting with
quack(tag, error)orcaptureException
v0.1.3
This release fixes issues related to data submission
Init duckbug module
v0.1.1 0.1.1