Skip to content

Commit b048bb9

Browse files
nstawskimayurkale22
authored andcommitted
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
1 parent d948f51 commit b048bb9

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

examples/tracer-web/README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Overview
2+
3+
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+
![Screenshot of the running example](images/traces.png)
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>
32+
33+
## LICENSE
34+
35+
Apache License 2.0

examples/tracer-web/images/traces.png

384 KB
Loading

0 commit comments

Comments
 (0)