Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr> Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| examples | ||
| images | ||
| .eslintrc | ||
| README.md | ||
| package.json | ||
| webpack.config.js | ||
README.md
Overview
This example shows how to use @opentelemetry/sdk-trace-web with different plugins and setup to instrument your JavaScript code running in the browser.
Installation
# from this directory
npm install
Run the Application
# from this directory
npm start
By default, the application will run on port 8090.
Examples
XMLHttpRequest
To see the results, open the browser at http://localhost:8090/xml-http-request/ and make sure you have the browser console open. The application is using the ConsoleSpanExporter and will post the created spans to the browser console.
The screen will look as follows:
Fetch
To see the results, open the browser at http://localhost:8090/fetch/ and make sure you have the browser console open. The application is using the ConsoleSpanExporter and will post the created spans to the browser console.
Useful links
- For more information on OpenTelemetry, visit: https://opentelemetry.io/
- For more information on web tracing, visit: https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-web
LICENSE
Apache License 2.0
