opentelemetry-js/examples/tracer-web
Daniel Dyla c5bc4382ec
update examples and getting started for provider and api package (#750)
* chore: rename provider in examples and getting started

* chore: update examples, bench, and getting started for api

* chore: update examples for latest changes

* chore: lint examples
2020-02-05 10:44:05 -08:00
..
examples update examples and getting started for provider and api package (#750) 2020-02-05 10:44:05 -08:00
images XMLHttpRequest (#595) 2019-12-19 15:34:09 -08:00
.eslintrc feat: lint examples (#649) 2020-01-24 08:03:04 -05:00
README.md XMLHttpRequest (#595) 2019-12-19 15:34:09 -08:00
package.json update examples and getting started for provider and api package (#750) 2020-02-05 10:44:05 -08:00
webpack.config.js feat: lint examples (#649) 2020-01-24 08:03:04 -05:00

README.md

Overview

This example shows how to use @opentelemetry/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

Document Load

To see the results, open the browser at http://localhost:8090/document-load/ 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

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

LICENSE

Apache License 2.0