Skip to content

✨ feat: emit app_startup.duration_ms alongside the seconds value (0.1.18) - #7

Open
nitinstp23 wants to merge 1 commit into
mainfrom
feat/app-startup-duration-ms
Open

nitinstp23 wants to merge 1 commit into
mainfrom
feat/app-startup-duration-ms

Conversation

@nitinstp23

Copy link
Copy Markdown
Contributor

Summary

app_startup.duration carries seconds under an unsuffixed key — the same ambiguity that produced the 1000x ANR display bug fixed in 0.1.17 by renaming to anr.duration_ms. It bit again on snabbit ("Avg Cold Start 0.700 ms").

Every app_startup span now also carries app_startup.duration_ms. Unlike ANR, the seconds key is kept: RUM plugins before 0.1.34 read only app_startup.duration, so dropping it would blank their startup panels. Backends coalesce the ms key over seconds * 1000.

Changes

  • src/core/attributes.ts: APP_STARTUP_DURATION_MS = 'app_startup.duration_ms' (pinned in attributes.test.ts).
  • Emit sites: native cold (src/native/index.ts, reuses fbcMs), native warm (lifecycle.ts), web cold (Math.round(duration * 1000)) and web bfcache warm (0).
  • docs/configuration.md: enableStartupTracking claimed a "hot" start that does not exist; now states the semantics and both keys.
  • CHANGELOG.md: the 0.1.8 entry named app.startup.type / app.startup.duration_seconds, which were never emitted; corrected in place with a note. New 0.1.18 entry.
  • Version 0.1.17 → 0.1.18 (package.json, lockfile root entries, scope.ts).

Verification

  • vitest run: 294 passed. tsc --noEmit clean for both tsconfig.json and tsconfig.native.json. Prettier clean.

Related

  • base14: RUM plugin + tenant MVs read app_startup.duration_ms with a seconds fallback
  • scout-flutter 0.3.0: same key, plus process-start-anchored cold start

app_startup.duration carried seconds under an unsuffixed key, the same
ambiguity that produced the 1000x ANR display bug fixed in 0.1.17. Every
app_startup span (native cold and warm, web cold and bfcache warm) now
also carries app_startup.duration_ms. The seconds key is kept because
RUM plugins before 0.1.34 read only that one; backends coalesce the ms
key over seconds * 1000.

Also corrects docs/configuration.md (no hot start exists) and the 0.1.8
changelog entry, which named attribute keys the SDK never emitted.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants