File tree Expand file tree Collapse file tree 5 files changed +21
-10
lines changed
Expand file tree Collapse file tree 5 files changed +21
-10
lines changed Original file line number Diff line number Diff line change 1+ package-lock = false
Original file line number Diff line number Diff line change @@ -9,14 +9,26 @@ This example shows how to use [@opentelemetry/sdk-trace-web][] with different in
99npm install
1010```
1111
12+ ## Start a collector and trace viewer
13+
14+ Optionally, you can use the provided Docker Compose file to start an OpenTelemetry Collector and a Zipkin to view collected traces.
15+ You can skip this step if you have your own collector already setup.
16+
17+ ``` sh
18+ npm run docker:start
19+ ```
20+
1221## Run the Application
1322
1423``` sh
1524# from this directory
1625npm start
1726```
1827
19- By default, the application will run on port ` 8090 ` .
28+ - Open the application at < http://localhost:8090 > .
29+ - Click around in each of the example sub-paths to create some tracing data.
30+ - Open Zipkin at < http://127.0.0.1:9411/zipkin/ > and search for some traces (click "Run Query").
31+
2032
2133## More information
2234
Original file line number Diff line number Diff line change @@ -3,9 +3,10 @@ receivers:
33 protocols :
44 grpc :
55 http :
6- cors_allowed_origins :
7- - http://*
8- - https://*
6+ cors :
7+ allowed_origins :
8+ - http://*
9+ - https://*
910
1011exporters :
1112 zipkin :
Original file line number Diff line number Diff line change 1- version : " 3"
21services :
3- # Collector
42 collector :
5- image : otel/opentelemetry-collector:0.38 .0
3+ image : otel/opentelemetry-collector:0.99 .0
64 command : ["--config=/conf/collector-config.yaml"]
75 volumes :
86 - ./collector-config.yaml:/conf/collector-config.yaml
@@ -13,7 +11,6 @@ services:
1311 depends_on :
1412 - zipkin-all-in-one
1513
16- # Zipkin
1714 zipkin-all-in-one :
1815 image : openzipkin/zipkin:latest
1916 ports :
Original file line number Diff line number Diff line change 55 "description" : " Example of using web plugins in browser" ,
66 "main" : " index.js" ,
77 "scripts" : {
8- "docker:start" : " cd ./docker && docker- compose down && docker- compose up" ,
9- "docker:startd" : " cd ./docker && docker- compose down && docker- compose up -d" ,
8+ "docker:start" : " cd ./docker && docker compose down && docker compose up" ,
9+ "docker:startd" : " cd ./docker && docker compose down && docker compose up -d" ,
1010 "start" : " webpack-dev-server --progress --color --port 8090 --config ./webpack.config.js --hot --host 0.0.0.0"
1111 },
1212 "repository" : {
You can’t perform that action at this time.
0 commit comments