feat: autumn-js pre-1.0 compat + local Jaeger trace playground#4
Merged
feat: autumn-js pre-1.0 compat + local Jaeger trace playground#4
Conversation
Two loosely-related changes landing together: autumn-js pre-1.0 compatibility - Widen `autumn-js` peer range to `>=0.0.70 <2.0.0` (was `>=1.0.0`). - Wrap pre-1.0 flat-top-level methods (`attach`, `cancel`, `setupPayment`, `usage`) alongside the existing 1.x sub-resource coverage; methods missing from the installed SDK are skipped silently. - Unwrap the pre-1.0 `Result<T, E>` response envelope so response-side span attributes populate the same on both versions; map `product_id`/`product_ids` to `autumn.plan_id`/`autumn.plan_ids` for dashboard consistency. - Expand unit tests to cover the pre-1.0 shapes. Local Jaeger trace playground (new) - `docker-compose.yml` at repo root runs `jaegertracing/all-in-one` with OTLP enabled on ports 16686 (UI), 4318 (OTLP HTTP), 4317 (OTLP gRPC). - Each package gets an `examples/` folder with `otel-setup.ts`, `demo.ts`, and a README. Demos use plain-object mocks (matching the unit tests) and export via OTLP/HTTP. - Autumn demo exercises every 1.x instrumented method (37 spans incl. one ERROR path). Drizzle demo exercises all instrumentation surfaces: `instrumentDrizzle` (query + execute + callback), `instrumentDrizzleClient` (session.prepareQuery, session.query, $client fallback, _.session.execute fallback, transactions), all SQL-verb operations, all query-object shapes, long-query truncation, and both promise/callback error paths (30 spans). - Root README gets a brief `## Examples` pointer; full walkthrough lives in a new `EXAMPLES.md`. - Dev-only: new `@opentelemetry/sdk-trace-node`, `exporter-trace-otlp-http`, `resources`, `semantic-conventions`, and `tsx` devDeps; `examples/` is outside `src/**/*` so it is neither type-checked into `dist/` nor published. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Minor bump for autumn-js pre-1.0 compatibility (widened peer range, flat top-level method wrapping, Result envelope unwrapping, plan id attribute mapping). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
>=0.0.70 <2.0.0and wraps the pre-1.0 flat-top-level methods (attach,cancel,setupPayment,usage) alongside the existing 1.x sub-resource coverage. The pre-1.0Result<T, E>envelope is unwrapped automatically andproduct_id/product_idsmap toautumn.plan_id/autumn.plan_idsso dashboards stay consistent. Missing methods on the installed SDK are skipped silently.docker-compose.ymlrunsjaegertracing/all-in-onewith OTLP, and each package gets anexamples/folder withotel-setup.ts,demo.ts, and a README. Autumn demo exercises every 1.x method (37 spans incl. one ERROR); Drizzle demo exercises every instrumentation surface (30 spans: promise + callback + execute,instrumentDrizzleClientwith session/prepareQuery/$client/_.session/transactions, all SQL verbs, all query-object shapes, long-query truncation, both error paths).EXAMPLES.mdat repo root with the full walkthrough; root README gets a brief## Examplespointer.examples/sits outsidesrc/**/*so nothing leaks intodist/or the published package.Test plan
pnpm type-check— greenpnpm unit-test— 34 autumn + 27 drizzle tests pass, includes new pre-1.0 casespnpm build—dist/only containsindex.js,index.js.map,types/;examples/excludeddocker compose up -d && pnpm --filter @api-blitz/otel-autumn example && pnpm --filter @api-blitz/otel-drizzle example— both services appear in Jaeger UI atlocalhost:16686with the expected span counts (37 / 30) and error/transaction markers🤖 Generated with Claude Code