Skip to content

Commit

Permalink
chore(web-example): Added a README for the existing example (#562)
Browse files Browse the repository at this point in the history
* 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 <dyladan@users.noreply.github.com>

* Updated tracing to web
  • Loading branch information
nstawski authored and mayurkale22 committed Nov 21, 2019
1 parent d948f51 commit b048bb9
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions examples/tracer-web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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.

## Installation

```sh
$ # from this directory
$ npm install
```

## Run the Application

```sh
$ # from this directory
$ npm start
```

By default, the application will run on port `8090`.

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.

The screen will look as follows:

![Screenshot of the running example](images/traces.png)

## Useful links

- For more information on OpenTelemetry, visit: <https://opentelemetry.io/>
- For more information on web tracing, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-web>

## LICENSE

Apache License 2.0
Binary file added examples/tracer-web/images/traces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b048bb9

Please sign in to comment.