Skip to content

Releases

@strada.sh/[email protected]

Choose a tag to compare

  1. userId option for track() and captureException(): set user.id on an event or error without wrapping the call in a baggage context.

    import { captureException, track } from "@strada.sh/sdk"
    
    track("task_started", { org_id: org.id }, { userId: session.userId })
    captureException(error, { userId: job.userId, tags: { handler: "export" } })

    It lands in the same user.id attribute that baggage and the browser cookie set, so the record joins otel_users. Use it where the user is known but there is no request context: Durable Object alarms, queue consumers, cron jobs. An explicit userId wins over the user from baggage or the browser cookie.

@strada.sh/[email protected]

Choose a tag to compare

  1. Fewer ingest requests — every flush is now one request to /v1/batch with spans, logs, and metrics together.
  2. Debounced flush on Cloudflare Workers and Vercel — the waitUntil flush waits until no record arrived for 100ms (at most 1s), so spans that end after an await and concurrent requests in the same isolate share one request. Before, each span sent its own request.
  3. A slow observable metric callback no longer delays logs and spans — collection stops at telemetry.metrics.exportTimeoutMillis.

Requires the Strada collector with /v1/batch (live on strada.sh). Update self-hosted collectors first.

@strada.sh/[email protected]

Choose a tag to compare

  1. Fixed Cloudflare Workers crash on every request — in 0.8.0 and 0.9.0, a Worker whose runtime exports tracing.enterSpan threw TypeError: Illegal invocation from startActiveSpan() / startSpan(), so every traced request failed with error 1101. The native Cloudflare span bridge now works.

@strada.sh/[email protected]

Choose a tag to compare

  1. Automatic spans with node:diagnostics_channel — opt-in integrations from @strada.sh/sdk/instrument. No module patching, no preload, no extra packages. Works with any import order and in bundled apps (Vite, Next):

    import { initStrada } from '@strada.sh/sdk'
    import { fetchSpans, httpClientSpans, httpServerSpans, mysql2Spans, redisSpans } from '@strada.sh/sdk/instrument'
    
    initStrada({
      projectId: '01JTHG5M7XPQR8KNCZ0W4D',
      service: 'api',
      integrations: [fetchSpans(), httpClientSpans(), httpServerSpans(), mysql2Spans(), redisSpans()],
    })
    Integration What it records
    fetchSpans(), httpClientSpans() client spans for outgoing requests, with traceparent and baggage headers added. httpClientSpans() needs Node 22.12+
    httpServerSpans() a server span per incoming request, active for the whole handler, parented to the incoming traceparent
    mysql2Spans(), redisSpans(), mongooseSpans() database client spans with db.* attributes (mysql2 3.20+, redis 5.12+, ioredis 5.11+, mongoose 9.7+)
    graphqlSpans(), aiSpans(), h3Spans() graphql 17+, AI SDK 7+ GenAI spans with token usage, h3 v2 with tracingPlugin()
    pinoLogs() every pino 9.10+ log line becomes an OTel log record, correlated to the active span

    Spans from these integrations are active inside the traced call, so nested spans, logs, and errors attach to them. Nothing is enabled by default. Write your own integration for any library that publishes a TracingChannel: an integration is { name, setup() }, where setup() returns the teardown that shutdown() runs. See https://strada.sh/docs/instrumentation.

  2. W3C tracestate support — the header is read, sent to downstream requests, and stored on spans. New exports createTraceState() and the TraceState type, the same as in @opentelemetry/api. Spans also export their trace flags, so TraceFlags in otel_traces is no longer always 0.

  3. Cloudflare Workers export per invocation — each invocation exports its own records, and the SDK starts no timers in Workers. A flush no longer waits for another request's export. Metrics export with the invocation that recorded them, and only series that changed are sent. Before, a shared export chain could delay or lose telemetry, and every flush sent all metrics again.

  4. registerOpenTelemetry() is all or nothing and never throws — if another OTel SDK already owns one global, or a registration step throws, it rolls back every global it set and returns the error.

  5. Browser: tab switches rejoin a page trace — when a hidden tab is visible again, the SDK starts a pageview.resume span. Events and errors after a tab switch get a parent trace again. It is not a pageview, so page analytics do not count a tab switch as a hit.

  6. Fixed lost batches on page close — the 64 KiB keepalive limit is now checked in bytes, not characters. Batches with many non-ASCII characters are no longer dropped.

  7. Fixed re-init after shutdown() — metrics no longer export old cumulative values again, and instruments stop collecting while the SDK is not exporting. On Node, shutdown() removes the uncaughtException, unhandledRejection, and beforeExit handlers, so a later initStrada() can change captureUncaughtErrors.

  8. Stricter traceparent parsing — a version 00 header with extra fields after the flags is rejected, as the W3C spec requires.

[email protected]

Choose a tag to compare

@remorses remorses released this 16 Sep 09:45
  1. Raw telemetry is kept by default — traces, logs, errors, and metrics no longer expire at 14 / 30 / 90 days. Set a custom TTL only when you want that signal to expire:

    strada projects retention -p api
    strada projects retention update -p api --traces-days 7 --logs-days 14
    strada projects retention update -p staging --all-days 7
    strada projects retention update --traces-days -1
    strada projects create staging --all-days 7

    Pass -1 to remove a custom TTL and keep that signal forever. Custom values are 1 through 365 days. Browser analytics and health-check aggregates stay at 90 days. After website production deploy, run strada database upgrade so Tinybird drops the old default TTLs. New self-hosted ClickHouse tables also keep all raw rows. Existing ClickHouse tables still need ALTER TABLE ... REMOVE TTL.

  2. strada database upgrade waits through Tinybird pending — pending is treated as in-flight, same as creating_schema and calculating. Leftover Staging candidates are skipped by numeric deployment id when timestamps are missing.

[email protected]

Choose a tag to compare

@remorses remorses released this 15 Sep 16:31
  1. Unique visitors and first-visit analytics — browser traffic now uses cookie strada_vid (visitor.id). Login and logout do not touch it. strada_uid stays the signed-in account. New commands for a daily traffic check without SQL:

    strada analytics overview -p my-app --since 7d
    strada analytics timeseries -p my-app --since 30d
    strada analytics visitors -p my-app --since 7d

    overview prints unique visitors, first visits, pageviews, sessions, bounce rate, top pages, and top referrers. Unique visitors in the pages MV use visitor.id, with session.id as fallback for old data. First visits come from the FirstVisits column. Existing analytics rows are not backfilled.

  2. strada mcp — the same CLI binary is now a stdio MCP server. Cursor, Claude Desktop, and VS Code can spawn it and call supported non-interactive commands as tools (issues_list, logs, query):

    strada login
    npx @playwriter/install-mcp 'strada mcp' --client cursor

    login, logout, database create, database upgrade, projects retention update, mcp, and the TUI are not MCP tools. Run those in a terminal.

  3. Per-project Tinybird retention — set how long raw traces, logs, errors, and metrics stay in Tinybird:

    strada projects retention -p api
    strada projects retention update -p api --traces-days 7 --logs-days 14
    strada projects retention update -p staging --all-days 7

    New projects default to 14 days for traces, 30 days for logs and custom events, and 90 days for errors and metrics. Browser analytics and health-check aggregates stay at 90 days. Lowering a value can delete existing Tinybird rows after schema promotion.

  4. strada database upgrade waits for an in-progress Tinybird deploy — a 400 that means "already a deployment in progress" is no longer treated as a hard failure. Upgrade now waits and retries until Tinybird finishes. Run strada database upgrade again if a previous attempt failed with Deployment not found.

@strada.sh/[email protected]

Choose a tag to compare

  1. Unique visitors — the browser SDK writes cookie strada_vid (visitor.id) on first pageview. strada_uid stays the signed-in account (user.id). Login and logout do not touch strada_vid. No localStorage.

    Tab focus no longer starts an extra pageview. SPA navigations use the Navigation API only, and only sameDocument navigations, so a full page load is not counted twice. identifyUser() updates strada_uid without restarting the active pageview.

  2. Telemetry never throws into application code — high-level SDK calls catch internally and return the failure instead of throwing it:

    const error = captureException(err)
    if (error) {
      // optional. The SDK already logged it once.
    }
    Function Returns
    captureException(), track(), trackPageview(), identifyUser(), initStrada() Error | undefined
    flush(), shutdown() Promise<Error | undefined>

    Almost every call site can ignore the return value. Failures are also logged once with console.warn, deduplicated by message. startSpan() still re-throws: it wraps your callback, records the exception on the span, and leaves app control flow unchanged.

  3. A blank projectId disables export — missing env vars or secrets no longer post to https://-ingest.strada.sh. Call initStrada() unconditionally:

    initStrada({
      projectId: env.STRADA_PROJECT_ID, // "" while the secret is missing
      token: env.STRADA_TOKEN,
      service: "my-worker",
    })
    
    track("thing_happened", { ok: true }) // no guard, no request

    An explicit endpoint (a local collector) still exports without a projectId.

[email protected]

Choose a tag to compare

@remorses remorses released this 05 Sep 12:38
  1. URL health checks — monitor any HTTP endpoint on a cron schedule and get alerted when it fails. Checks run as a Cloudflare Workflow, one durable step per org, so a slow tenant does not block others:

    strada checks create --url https://api.example.com/health --name "API health"
    strada checks list
    strada checks disable <id>
    strada checks enable <id>
    strada checks delete <id>

    Defaults: GET, expect 200-299, check every 5 minutes (*/5 * * * *), alert after 2 consecutive failures, 60 minute cooldown. After 24 hours of continuous failure the check auto-disables so a dead URL does not fill ClickHouse. Recovery notifications fire automatically when the URL comes back.

    Results live in otel_health_checks. Failed checks store the response body (up to 16KB) and headers so you can see what the server returned:

    strada query "
      SELECT Timestamp, StatusCode, LatencyMs, ErrorMessage
      FROM otel_health_checks
      WHERE Success = 0
      ORDER BY Timestamp DESC
      LIMIT 20
    "
  2. Rewritten alerts and destinations — multiple named error-alert rules per org, with project-scoped overrides. Destinations (email, webhook, Slack) are org-scoped and auto-link to every rule, including health checks:

    # Org-wide default
    strada alerts create --name "All errors" --channel email --to [email protected]
    
    # Project override: only fire after 20 errors in 30 minutes
    strada alerts create --name "Frontend noise" --project frontend --threshold 20 --window 30
    
    strada alerts list
    strada alerts update <id> --threshold 5 --window 15
    strada alerts delete <id>
    strada alerts test
    strada destinations list
    strada destinations remove <id>

    alerts add / alerts set / alerts remove are gone. Use create, update, and delete.

  3. --status on issues list — default is now open only. Pass --status to include other triage states:

    strada issues list -p my-app
    strada issues list -p my-app --status all
    strada issues list -p my-app --status resolved

    Valid values: open, resolved, muted, ignored, all.

  4. CLI docs site — every command now has a generated Holocron page under the CLI tab, with usage, flags, and examples. Command descriptions use .example() so --help and the docs stay in sync.

  5. CLI sessions last one year — device-flow tokens no longer expire after 7 days. Active sessions refresh at most once per day.

  6. TUI starts correctly — Termcast is initialized before the cache module, so strada opens with the right ~/.termcast/compiled/strada storage instead of creating a cache before Termcast is ready.

  7. strada database upgrade no longer deadlocks on slow Tinybird data migrations. It waits for data_ready (up to 45 minutes), adopts in-flight deployments, and allows destructive schema changes so removed datasources can be cleaned up.

@strada.sh/[email protected]

Choose a tag to compare

  1. trackPageview() for server-side pageviews — emit a zero-duration pageview span from Node or Cloudflare Workers. It lands in the same analytics materialized views as browser pageviews, so bots, AI crawlers, JS-blocked visitors, and SSR-only pages show up in analytics:

    import { initStrada, trackPageview } from "@strada.sh/sdk"
    
    app.use((req, res, next) => {
      trackPageview({
        path: req.path,
        url: req.url,
        referrer: req.headers.referer,
      })
      next()
    })

    Cloudflare Workers:

    export default {
      fetch(request, env) {
        initStrada({ projectId: "...", service: "docs", token: env.STRADA_TOKEN })
        const url = new URL(request.url)
        trackPageview({ path: url.pathname, url: url.href })
      },
    }

    session.id and user.id come from W3C Baggage when not passed. Relative URLs are parsed safely; only absolute URLs set url.full.

  2. Cloudflare native tracing bridge — when tracing.enterSpan is available (workerd 2026-06-16+), every startActiveSpan() also creates a Cloudflare native span. Custom OTel spans then appear in the Cloudflare trace waterfall next to auto-instrumented KV, D1, and fetch spans.

    Auto-enabled at runtime. Disable with cloudflareTracing: false:

    initStrada({
      projectId: "...",
      token: env.STRADA_TOKEN,
      cloudflareTracing: false,
    })
  3. Better Auth plugin reports API errors — strataBetterAuth() now calls captureException on Better Auth onAPIError failures, tagged source: better-auth.

[email protected]

Choose a tag to compare

@remorses remorses released this 03 Jun 13:09
  1. Enriched issue detail view -- issue detail now shows URL path, user ID, session ID, browser brands, and environment alongside the existing metadata. The events table displays URL path and user ID columns. A 30-day frequency bar chart renders below the metadata so you can see error trends at a glance.

  2. HTTP method and route in issues list -- the issues list subtitle now shows POST /api/users/:id style labels combining http.method and http.route (or url.path as fallback). The full detail view also shows method, route, and URL path as separate metadata labels.

  3. 30-day frequency chart in both list and detail -- each issue shows a daily frequency bar graph for the last 30 days. In the list view, frequency data for all visible issues is batch-fetched in a single SQL query to avoid N+1 requests. Bar width adapts to terminal width.

  4. Copy stacktrace action -- press the action key on any issue to copy the full stacktrace (prefixed with error type and message) to the clipboard. Available in both the issues list and the pushed detail view.

  5. URL path visible in issues list -- the issues list subtitle shows the URL path inline (e.g. error · /api/orders) so you can see which endpoint errored without opening the detail view.

  6. Server-side url.path propagation into error rows -- errors captured via captureException() in Node or Cloudflare Workers HTTP handlers now include url.path, http.route, and http.method in their tags. Errors from span.recordException() also inherit span-level attributes.

  7. Removed unhandled tag from issues list -- the red dot icon color already communicates unhandled status; the redundant text tag is gone for a cleaner layout.

  8. Fixed bin.js entrypoint resolution under bun -- the CLI re-spawn logic now resolves the bin.js path correctly when running under bun.