Requests
- HttpClient, with or without withFetch()
- traceparent on every fetch and XHR
- Same origin, or what you allow
Two providers in app.config.ts. Every HttpClient call links to the server trace it started. Page views come from the router, and errors from your ErrorHandler, with zone.js unwrapped.
// app.config.ts const lens = initWizeLens({ endpoint: "/_wizelens" }); { provide: ErrorHandler, useValue: createWizeLensErrorHandler(lens) }, provideAppInitializer(() => void trackAngularRouter(inject(Router), lens)), // Program.cs builder.Services.AddWizeLens(); app.UseWizeLens();
Everything below lands in the same trace as the request that caused it.
HttpClient uses XMLHttpRequest unless you call withFetch(). WizeLens traces both, so every call carries a traceparent to your API.
zone.js wraps promise rejections. The error handler unwraps them first, sends the error, then logs it like Angular's own.
createWizeLensErrorHandler(lens)Each NavigationEnd is a page view, named by its path after redirects. Before Angular 19, call it from your root component's constructor.
trackAngularRouter(router)The package does not import @angular/*. It works from Angular 14 on and adds nothing but WizeLens to your bundle. You register its two parts yourself.
A Vue front end, a .NET gateway, a Node service, and a Python worker join the same trace, and the same insights run on all of it.