The Hilla demo uses this function to initialize the frontend observability insturmentation:
|
export default function initTelemetry(): void { |
|
const provider = new WebTracerProvider(); |
|
|
|
provider.register({ |
|
contextManager: new ZoneContextManager(), |
|
}); |
|
|
|
provider.addSpanProcessor( |
|
new SimpleSpanProcessor( |
|
new HillaEndpointExporter({ |
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises |
|
endpoint: ObservabilityEndpoint.export, |
|
}), |
|
), |
|
); |
|
|
|
registerInstrumentations({ |
|
instrumentations: [new DocumentLoadInstrumentation()], |
|
}); |
|
} |
We should provide this functionality embedded in the kit to facilitate the initialization of frontend observability.
The Hilla demo uses this function to initialize the frontend observability insturmentation:
observability-kit/observability-kit-demo-hilla/frontend/utils/telemetry.ts
Lines 8 to 27 in e5d1200
We should provide this functionality embedded in the kit to facilitate the initialization of frontend observability.