Repository navigation
fix(transports): replace leftover 'logitron' names and hardcoded library version - #48
Conversation
|
Thanks, this looks good. The payloads now say One thing for later, not a blocker: Heads-up: #67 removes the |
|
#67 just merged and removed the |
…ary version DataDog and Segment payloads still shipped the legacy 'logitron' name to user accounts (service, logger.name, source_type_name, metric tags and context.library.name), and Segment's context.library.version was a hardcoded '1.0.0'. Switch the user-facing defaults to 'logixia' and source the version from a new src/version.ts. The Datadog metric name logitron.logs.* is kept as-is with a TODO(v2) note so existing dashboards keep resolving. Refs Logixia#35
c466694 to
5dd75dc
Compare
|
Rebased on main. I dropped the hunks inside the four old Typecheck and eslint are clean and the two new suites pass. The full jest run is 1001 passed, with one suite failing to load: |
|
Thanks for the quick rebase, this is exactly right: the probe hunks are gone, the renames and |
webcoderspeed
left a comment
There was a problem hiding this comment.
Rebase looks right, CI green. Thanks!
|
🎉 This issue has been resolved in version 1.12.6. |
What and why
DataDog and Segment transports still sent the legacy project name
logitronto user accounts:
datadog.transport.ts: defaultservice,logger.name, theservice:metric/trace tags andsource_type_name(plus the connection-probe metriclogitron.test).segment.transport.ts:context.library.namein all 8 payload builders, andcontext.library.versionhardcoded to'1.0.0'.google-analytics.transport.ts/mixpanel.transport.ts: the connection-probe eventlogitron_test.src/types/.Both transports now emit
'logixia'.context.library.version(and the SegmentUser-Agent) now come from a newsrc/version.ts(LOGIXIA_VERSION) instead of a hardcoded literal.Per the issue, the Datadog metric name
logitron.logs.*is intentionally leftunchanged so existing dashboards keep resolving — it carries a
TODO(v2)comment instead.
Closes #35
How I tested it
npx jest— 941 tests / 56 suites pass (2 new).npm run typecheckandnpm run lint:checkpass;prettier --check src/clean.grep -rn "logitron" src --include='*.ts' | grep -v "import\|from '"now returns only thelogitron.logs.*metric line and its TODO.src/transports/__tests__/datadog.transport.test.ts,.../segment.transport.test.ts) assert the outgoing payload sayslogixiaand that Segment'slibrary.versionequalsLOGIXIA_VERSION. Sabotage-checked: both fail on the pre-fix code and pass with the fix.Known issues / notes
src/version.tsholds a constant equal to the currentpackage.jsonversion (1.12.0); the release process needs to keep it in sync. A constant (rather than importingpackage.json) keeps the builtdistfree of a JSON import consumers would have to resolve — happy to switch to a build-time define if you prefer.context.app.versionin the Segment log payload ('1.0.0') is the host application's version placeholder, not the library's, so it is left untouched.logitron_test,logitron.test): they are user-visible strings in provider accounts and leaving them would fail the acceptance grep above.Checklist
fix(transports): ...)npm run typecheck && npm run lint && npm testpass locally