W3C Performance API
W3C Performance API
The Embrace SDK automatically collects timing data from the browser's Performance API, giving you visibility into how your application and its resources perform in real user environments.
Available Instrumentations
- User Timing - Captures custom performance marks and measures created by your application via
performance.mark()andperformance.measure() - Element Timing - Tracks render and load timing for elements annotated with the
elementtimingattribute - Server Timing - Reads backend performance hints sent via the
Server-TimingHTTP response header on navigation requests
Opting Out
Each instrumentation is always-on by default. Individual instrumentations can be disabled via the omit option when initializing the SDK:
import { initSDK } from '@embrace-io/web-sdk';
initSDK({
appID: "YOUR_EMBRACE_APP_ID",
appVersion: "YOUR_APP_VERSION",
defaultInstrumentationConfig: {
omit: new Set(['user-timing', 'element-timing', 'server-timing']),
},
});