You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: follow the addon renames, and make the Datadog preload actually work
Three catalog packages were renamed on npm: @imqueue/opentelemetry-instrumentation-imqueue
to @imqueue/opentelemetry, @imqueue/sequelize to @imqueue/pg-sequelize, and
@imqueue/dd-trace to @imqueue/datadog. No shim was published, so the old names
stay installable and frozen.
Catalog ids are unchanged — `dd-trace` and `sequelize` stay as they are. They are
what `--packages` takes and what ~/.imq/config.json and .imqrc.json hold, and
validateSelection() rejects an id it does not know, so renaming them would turn
every stored selection into a hard "Unknown package" error. The wiki now says
plainly that two ids no longer match their npm names.
Fleet probes accept BOTH names per member. usesMember() tested one exact string,
so swapping in the new names alone would have made every unmigrated service
invisible: a ten-service Sequelize fleet would read as "no ORM anywhere" and the
prompt would recommend pg-prisma into it. No error, no failing test either — the
existing assertions are all about ids. ProbeMember.dep now takes a string or a
list, and four cases cover old-only and mixed fleets.
Also fixes a bug the rename would otherwise have been blamed for: the dd-trace
addon's preload was `import '@imqueue/dd-trace';`, which installs the tracing
hooks but never calls tracer.init() — and init() is what enables the imq
integration and starts reporting. Every service ever scaffolded with that addon
has been sending nothing to Datadog. The preload now imports a generated
src/tracer.ts that calls init(), mirroring how opentelemetry uses
src/telemetry.ts. It has to be a separate module: %ADDON_PRELOAD sits at the top
of src/index.ts and ESM evaluates all imports before any body statement, so an
inline init() would run after the config and service-class modules.
generateAddons() had no test coverage at all; it has three now, including one
asserting the generated tracer calls init(). The generated import specifiers are
string content, so tsc cannot check them — a stale one only shows up at the
user's npm install.
README's orm group listed `prisma`, which was replaced by `pg-prisma` in b27a4be.
"pick": "For a service joining a fleet already built on Sequelize, where matching the existing stack is worth more than the default. Migrating the fleet to pg-prisma is worth proposing, as separate work.",
0 commit comments