opentelemetry-js/examples/tracer-web
legendecas 5bb83224be
feat(api-metrics): remove bind/unbind and bound instruments (#2559)
Co-authored-by: Valentin Marchaud <contact@vmarchaud.fr>
Co-authored-by: Daniel Dyla <dyladan@users.noreply.github.com>
2021-11-02 14:14:48 -04:00
..
examples feat(api-metrics): remove bind/unbind and bound instruments (#2559) 2021-11-02 14:14:48 -04:00
images chore: removing examples of packages that are part of contrib repo (#2028) 2021-03-24 19:22:08 +01:00
.eslintrc feat: lint examples (#649) 2020-01-24 08:03:04 -05:00
README.md chore: rename sdks to better represent what they are [#2146] (#2340) 2021-08-05 21:13:18 +02:00
package.json chore!: rename collector exporters (#2476) 2021-09-15 20:41:08 +02:00
webpack.config.js chore: fix tracer-web example webpack config (#2326) 2021-07-06 14:26:13 -04:00

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:

Screenshot of the running example

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.

LICENSE

Apache License 2.0