GitHub上のドキュメントをスライド化しています
https://github.com/SigNoz/angular-otel-native/master/README.mdを参照しています。
This project was generated with Angular CLI version 17.1.2.
The angular 17 by default installs Standalone
component.
ng new signoz-angular-sample
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Create an instrument.ts file in the repository
For setting up traces for the application we need the following things :-
Trace Provider (this takes care of giving us the tracer factory through which we can generate traces either auto or manual)
Trace Exporter (this takes care of exporting the generated data to the destination end points)
Auto / Manual Instrumentations to generate OTEL data (actual generation of otel data)
Propagators to propagate traceContext
to the down-stream services if any
In the application we are using :-
WebTracerProvider as the TraceProvider
ConsoleSpanExporter
(easy debugging in dev mode) & OTLPTraceExporter
(used in prod envs to export data) as the exporters
getWebAutoInstrumentations
to generate auto instrumentations out of the box