You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(web-example): Added a README for the existing example (open-telemetry#562)
* Added a README for the existing example
* Fixed typo
* A few updates to the README
* A few updates to the README
* Changed the link to point to the instead of tracing
* Update examples/tracer-web/README.md
Co-Authored-By: Daniel Dyla <[email protected]>
* Updated tracing to web
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.
4
+
This example uses the `ConsoleSpanExporter()` to export spans to the browser console output.
5
+
6
+
## Installation
7
+
8
+
```sh
9
+
$ # from this directory
10
+
$ npm install
11
+
```
12
+
13
+
## Run the Application
14
+
15
+
```sh
16
+
$ # from this directory
17
+
$ npm start
18
+
```
19
+
20
+
By default, the application will run on port `8090`.
21
+
22
+
To see the results, open the browser at <http://localhost:8090/> 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.
23
+
24
+
The screen will look as follows:
25
+
26
+

27
+
28
+
## Useful links
29
+
30
+
- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
31
+
- For more information on web tracing, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web>
0 commit comments