Skip to content

Releases: duckbugio/duckbug-js

v1.0.0

09 Apr 09:52

Choose a tag to compare

@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?) and sendError(event, meta?) using canonical types DuckBugLogEvent and DuckBugErrorEvent (not legacy ad-hoc log shapes). Console-style methods remain for LogProvider integration.
  • 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/batch when 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 under schemas/ in the package.
  • Privacy pipeline — Events are processed in order: strip sectionssanitize (sensitive keys) → stable eventId → optional beforeSend.
    DuckSDK / Duck hooks apply to all providers; DuckBugProvider can run its own beforeSend when used without the core client.
  • Default sdk identity — Finalized events get a default sdk block when omitted (aligned with ingest expectations).
  • Transport — Configurable batch size, retries, fetch override, and onTransportError. Call flush() before shutdown so queued requests complete.
  • Branded API — Prefer Duck with quack, captureException, setScope, and Pond.ripple for extra sensitive keys. DuckSDK remains the same runtime class.

Highlights

  • flush() on Duck / DuckBugProvider for reliable delivery at exit.
  • Node integration: registerNodeGlobalErrorHandlers for unhandledRejection / uncaughtException (opt-in).
  • Docs & tooling: expanded README (full usage example), bun run check (lint + typecheck + tests), relaxed commitlint for feat!: and realistic subjects / footers.

Migration (short)

  1. Replace old provider log APIs with sendLog / sendError and contract types.
  2. Point dsn at the new ingest URL shape.
  3. Move global metadata to duck.setScope(...); use beforeSend / stripSections / flush as needed.
  4. Replace manual error reporting with quack(tag, error) or captureException

v0.1.3

31 Oct 19:22

Choose a tag to compare

This release fixes issues related to data submission

Init duckbug module

20 Jul 19:37

Choose a tag to compare

v0.1.1

0.1.1