Skip to content

Publish a release from main — 0.3.3 (Jan 2026) emits no test attributes #23

@TheEisbaer

Description

@TheEisbaer

Summary

@dagger.io/jest@0.3.3 — the only version currently on npm — is missing critical fixes that have been on main since at least Jan/Feb 2026. As shipped, users who follow the OpenTelemetry Auto-Instrumentation snippet in the README (npm install @dagger.io/jest + NODE_OPTIONS="--require @dagger.io/jest/register") get zero usable telemetry in Dagger v0.21's tests view.

The toolchain path (dagger toolchain install github.com/dagger/jest) is unaffected because jest.dang builds the library from main source at runtime via bun run build.

Repro

  • Dagger CLI / engine: v0.21.0
  • Jest: 29.x with jest-environment-jsdom
  • Setup: NODE_OPTIONS="--require @dagger.io/jest/register" + npm test
  • Symptom: Jest runs all 339 tests, 338 pass / 1 skipped, but Dagger TUI's T view stays empty and --progress=dots prints no test summary at end. Hand-rolled probe span using @dagger.io/telemetry SDK from the same container does appear, so OTEL transport is healthy.

Two bugs in v0.3.3 source (gitHead 5765094)

1. Tracer captured at module-load time

src/wrapper.ts:11 @ 5765094:

const tracer = trace.getTracer("dagger.io/jest");

This runs when register.cjs is loaded by --require, before any OtelJestEnvironment instance runs setup() / _otelSDK.start(). No tracer provider is registered yet, so trace.getTracer() returns and caches a no-op tracer. Every later tracer.startSpan(...) is a no-op.

Fixed on main (src/wrapper.ts:59-61) — now a function __tracer() called per span site.

2. Test semconv attributes never set

grep -E "setAttribute|ATTR_TEST" src/wrapper.ts on 5765094: 0 hits.
Same grep on main: 16 hits.

The published bundle creates spans but never tags them with test.case.name, test.suite.name, test.case.result.status, or test.suite.run.status. Dagger's TUI (dagql/dagui/spans.go) scans specifically for those keys, so spans without them are not classified as tests and the test view stays empty.

Verified via patched register.cjs adding logs to setup() / handleTestEvent: hook fires correctly, 73 setup() calls, 339 test_start + 338 test_done events received. Spans created, but un-tagged → invisible to the TUI.

Both fixed on main:

  • wrapper.ts:464[ATTR_TEST_CASE_NAME]: this.testCaseName(test)
  • wrapper.ts:234,251span.setAttribute(ATTR_TEST_CASE_RESULT_STATUS, ...)
  • wrapper.ts:322setAttribute(ATTR_TEST_SUITE_RUN_STATUS, ...)

Request

Cut a 0.3.4 (or 0.4.0) release from current main. No new fixes needed — just a build + publish.

If there's an unmerged blocker, mind sharing what it is so downstream users can decide whether to vendor main from git in the meantime?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions