Skip to content

fix(transports): replace leftover 'logitron' names and hardcoded library version - #48

Merged
webcoderspeed merged 1 commit into
Logixia:mainfrom
kragent66-glitch:fix/logitron-leftovers-35
Oct 24, 2026
Merged

webcoderspeed merged 1 commit into
Logixia:mainfrom
kragent66-glitch:fix/logitron-leftovers-35

Conversation

@kragent66-glitch

Copy link
Copy Markdown
Contributor

What and why

DataDog and Segment transports still sent the legacy project name logitron
to user accounts:

  • datadog.transport.ts: default service, logger.name, the service: metric/trace tags and source_type_name (plus the connection-probe metric logitron.test).
  • segment.transport.ts: context.library.name in all 8 payload builders, and context.library.version hardcoded to '1.0.0'.
  • google-analytics.transport.ts / mixpanel.transport.ts: the connection-probe event logitron_test.
  • Two stale file-header comments in src/types/.

Both transports now emit 'logixia'. context.library.version (and the Segment User-Agent) now come from a new src/version.ts (LOGIXIA_VERSION) instead of a hardcoded literal.

Per the issue, the Datadog metric name logitron.logs.* is intentionally left
unchanged 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 typecheck and npm run lint:check pass; prettier --check src/ clean.
  • Acceptance grep is clean: grep -rn "logitron" src --include='*.ts' | grep -v "import\|from '" now returns only the logitron.logs.* metric line and its TODO.
  • New regression tests (src/transports/__tests__/datadog.transport.test.ts, .../segment.transport.test.ts) assert the outgoing payload says logixia and that Segment's library.version equals LOGIXIA_VERSION. Sabotage-checked: both fail on the pre-fix code and pass with the fix.

Known issues / notes

  • src/version.ts holds a constant equal to the current package.json version (1.12.0); the release process needs to keep it in sync. A constant (rather than importing package.json) keeps the built dist free of a JSON import consumers would have to resolve — happy to switch to a build-time define if you prefer.
  • context.app.version in the Segment log payload ('1.0.0') is the host application's version placeholder, not the library's, so it is left untouched.
  • I also renamed the connection-probe identifiers (logitron_test, logitron.test): they are user-visible strings in provider accounts and leaving them would fail the acceptance grep above.

Checklist

  • PR title follows Conventional Commits (fix(transports): ...)
  • npm run typecheck && npm run lint && npm test pass locally
  • Tests added or updated for behaviour changes
  • README or examples updated — not needed, no public API change

@webcoderspeed

Copy link
Copy Markdown
Contributor

Thanks, this looks good. The payloads now say logixia, the tests fail on the old code, and keeping logitron.logs.* with a TODO is the right call for people's existing dashboards.

One thing for later, not a blocker: LOGIXIA_VERSION is hardcoded to 1.12.0 while npm is already on 1.12.5, and semantic-release won't update it. A follow-up that reads the version from package.json at runtime would stop it drifting.

Heads-up: #67 removes the testConnection() startup probes entirely (they sent fake events to customers' accounts, #3), so whichever merges second gets a small conflict there. I'll rebase #67 after this one.

@webcoderspeed

Copy link
Copy Markdown
Contributor

#67 just merged and removed the testConnection() startup probes from all four analytics transports (they sent fake events to customers' accounts, #3), so this now conflicts. Could you rebase on main? When resolving, drop your hunks inside the old testConnection() methods (logitron.test, logitron_test renames) since those methods are gone, and keep everything else: the service/logger/tag renames, LOGIXIA_VERSION, and both tests. Also, main now uses stringifyForLog( instead of JSON.stringify( for request bodies, so keep main's side on those lines. Thanks!

…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
@kragent66-glitch
kragent66-glitch force-pushed the fix/logitron-leftovers-35 branch from c466694 to 5dd75dc Compare October 23, 2026 19:32
@kragent66-glitch

Copy link
Copy Markdown
Contributor Author

Rebased on main. I dropped the hunks inside the four old testConnection() methods as you said - gone in #67, so the logitron.test / logitron_test renames went with them - and kept the service/logger/tag renames, LOGIXIA_VERSION, and both new test files. Where request bodies now go through stringifyForLog, I kept main's side.

Typecheck and eslint are clean and the two new suites pass. The full jest run is 1001 passed, with one suite failing to load: src/middleware/__tests__/http-logger.test.ts throws a module-not-found at line 11, and it does the same on main without my commit.

@webcoderspeed

Copy link
Copy Markdown
Contributor

Thanks for the quick rebase, this is exactly right: the probe hunks are gone, the renames and LOGIXIA_VERSION are kept, and main's stringifyForLog lines are untouched. CI is green. The local http-logger.test.ts failure is only a stale node_modules: #50 added fastify as a dev dependency, and npm install fixes it. Good to merge.

@webcoderspeed webcoderspeed left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase looks right, CI green. Thanks!

@webcoderspeed
webcoderspeed merged commit f813407 into Logixia:main Oct 24, 2026
10 of 11 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This issue has been resolved in version 1.12.6.
Install it: npm install logixia@1.12.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(transports): replace leftover 'logitron' names and hardcoded library version

2 participants