diff --git a/examples/tracer-web/README.md b/examples/tracer-web/README.md index ec60ac8422..fef2af26b4 100644 --- a/examples/tracer-web/README.md +++ b/examples/tracer-web/README.md @@ -1,7 +1,6 @@ # Overview -This example shows how to use [@opentelemetry/web](https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web) to instrument your JavaScript code running in the browser. -This example uses the `ConsoleSpanExporter()` to export spans to the browser console output. +This example shows how to use [@opentelemetry/web](https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web) with different plugins and setup to instrument your JavaScript code running in the browser. ## Installation @@ -19,11 +18,23 @@ $ npm start By default, the application will run on port `8090`. -To see the results, open the browser at 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. +## Examples + +### Document Load + +To see the results, open the browser at 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](images/traces.png) +![Screenshot of the running example](images/document-load.png) + +### XMLHttpRequest + +To see the results, open the browser at 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](images/xml-http-request.png) + ## Useful links diff --git a/examples/tracer-web/index.html b/examples/tracer-web/examples/document-load/index.html similarity index 88% rename from examples/tracer-web/index.html rename to examples/tracer-web/examples/document-load/index.html index 395281f3e8..772a215769 100644 --- a/examples/tracer-web/index.html +++ b/examples/tracer-web/examples/document-load/index.html @@ -3,7 +3,7 @@ - Web Tracer Example + Document Load Plugin Example