AppStartupTraceConfiginterface
The application startup trace (instrumentAppStartup): its startup window
(parentSpanTimeoutMs, parentSpanLoadTimeoutMs,
parentSpanEnd) and what it traces, aspect by aspect. Every aspect
defaults to true: an object switches off only what it sets to false.
The aspects other than the root span apply in browsers only - in NodeJS
the trace is the root span and the startup window (see
instrumentAppStartup).
Properties (11)
| Property | Type | Default | Required | Description |
|---|---|---|---|---|
| enabled⚓︎ | boolean | true | x | Whether the application startup is traced at all. |
| observeErrors⚓︎ | boolean | true | x | Whether the uncaught errors and unhandled promise rejections of the startup window are observed: counted on the root span (errorCount) and, when instrumentErrors is off, published as its error spans under the root. Has no bearing on instrumentErrors itself. |
| observeLifecycle⚓︎ | boolean | true | x | Whether the page lifecycle transitions of the startup window are observed: visibility changes, pageshow/pagehide (back/forward cache), freeze/resume and prerenderingchange as point-in-time child spans, and the visibilityChanges / hiddenDuringStartup / bfcacheRestored summary on the root span. |
| observeLongTasks⚓︎ | boolean | true | x | Whether long tasks of the startup window are observed: the per-task child spans ("interopio.api.instrumentation.eventLoopBlocking", only when instrumentEventLoop is off - it publishes them otherwise) and the perf.longTasks aggregate on the root span. |
| observePaints⚓︎ | boolean | true | x | Whether the first-paint / first-contentful-paint marks are published as child spans ("interopio.api.appStartup.paint"). |
| observeVitals⚓︎ | boolean | true | x | Whether the web vitals of the startup window - the latest LCP and the session-window CLS - are observed and published on the root span (perf.vitals.lcp / perf.vitals.cls). The SESSION-level values are instrumentWebVitals' job either way. |
| parentSpanEnd⚓︎ | "explicit" | "timeout" | "loader" | "any" | "dom-ready" | "loaded" | "any" | x | When will the application startup span be considered completed, so that no further spans are added under it.
In NodeJS there is no loader signal, page load or DOMContentLoaded: "loader", "dom-ready" and "loaded" behave as "any", and the timeout counts alone. Whatever the value, the page being unloaded (a reload, a navigation away,
the window closing - not an entry into the back/forward cache) while the
startup window is still open closes it and completes the startup span there
and then, marked startupFinishedType "pagehide": a span is only exported
once it has ended, so the span of a startup the user walked away from would
be lost otherwise. In the "dom-ready", "loaded" and "loader" modes, once the
mode's event has happened, startupFinishedType stays the event - the span
ends with the event's time - and only startupWindowClosedBy is "pagehide".
The ended spans are flushed by the When not set, the deprecated traces setting startupParentSpanEnd applies. |
| parentSpanLoadTimeoutMs⚓︎ | number | 0 | x | How long the startup window waits for the page's load event once
parentSpanTimeoutMs has elapsed, in milliseconds. |
| parentSpanTimeoutMs⚓︎ | number | 3000 | x | If non-zero, how long after application startup will any traced operations automatically be nested under the application startup trace. The timeout is counted from the moment the io.Connect API begins initializing. Without a timeout the startup window only closes on an explicit startupTraceFinished() call, on the loader signal in io.Connect Desktop windows ("loader" and "any"), or on the event of the "dom-ready" and "loaded" modes - the root span stays open, and unexported, until then or until the page goes away. When the timeout elapses before the page has loaded, the window stays open until the load event - so the navigation KPIs, which are read after it, land on the startup span. See parentSpanLoadTimeoutMs for limiting that wait. When not set, the deprecated traces setting startupParentSpanTimeoutMs applies. |
| rootSpan⚓︎ | boolean | true | x | Whether the "interopio.api.appStartup" root span becomes the implicit
parent of the spans the application creates during the startup window
(through the propagation defaults). The root span itself is always
opened - it is what the gathered data lands on, and the child spans of
the aspects below always nest under it. With |
| traceNavigation⚓︎ | boolean | true | x | Whether the navigation timing is traced once the load event completed: the "interopio.api.appStartup.windowLoad" span - from the start of the navigation (the activation, for a prerendered page) to the end of the window's load event, its duration being the time to load, with the milestones (domInteractiveMs, domContentLoadedMs, domCompleteMs, loadEventStartMs, loadHandlersMs) as attributes -, the navigation phase child spans ("interopio.api.appStartup.navigation.*" - redirect, dns, connect, tls, request, response, domParsing, deferredScripts, contentLoadedHandlers, subresources, loadHandlers), the navigation metadata and perf.kpi on the root span, perf.resources.count and the slowest resource loads as child spans (the latter only when instrumentResources is off - it publishes them otherwise). |