Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(web-example): Added a README for the existing example #562

Merged
merged 10 commits into from
Nov 21, 2019
34 changes: 34 additions & 0 deletions examples/tracer-web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Overview

This example shows how to use [@opentelemetry/tracing](https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing) to instrument your JavScript code running in the browser.
nstawski marked this conversation as resolved.
Show resolved Hide resolved
nstawski marked this conversation as resolved.
Show resolved Hide resolved
The supplied example uses the `ConsoleSpanExporter()` to export spans into the console output.
nstawski marked this conversation as resolved.
Show resolved Hide resolved

## 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`: `http://localhost:8090/`
nstawski marked this conversation as resolved.
Show resolved Hide resolved

To see the results, make sure you have the console open. The application is using the `ConsoleSpanExporter` and will post the created spans into the console.
nstawski marked this conversation as resolved.
Show resolved Hide resolved

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 tracing, visit: <https://github.com/open-telemetry/opentelemetry-js/tree/master/packages/opentelemetry-tracing>

## 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.