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
{{ message }}
This repository was archived by the owner on Oct 3, 2023. It is now read-only.
To run this example in local development mode, you will need to run the [OpenCensus agent][opencensus-agent].
16
28
17
-
First set your `GOPATH` environment variable and then install the agent by
18
-
running:
29
+
First set your `GOPATH` environment variable and then install the agent by running:
19
30
20
31
```bash
21
32
go get -d github.com/census-instrumentation/opencensus-service
22
33
```
23
34
24
35
Then create a `config.yaml` file following the
25
-
[Configuration](https://github.com/census-instrumentation/opencensus-service#config) instructions for the agent. You will need to have the `opencensus` receiver set up on the default port of `55678`, and you will need at least one exporter so you can see the traces that are generated. For example, your config file could look like this:
36
+
[Configuration][opencensus-servie-config] instructions for the agent. You will need to have the
37
+
`opencensus` receiver set up on the default port of `55678`, and you will need at least one exporter
38
+
so you can see the traces that are generated. For example, your config file could look like this:
26
39
27
40
```yaml
28
41
receivers:
@@ -36,12 +49,12 @@ exporters:
36
49
Then in the same folder as your `config.yaml` run the agent with this command:
37
50
38
51
```bash
39
-
go run github.com/census-instrumentation/opencensus-service/cmd/ocagent
52
+
GO111MODULE=on go run github.com/census-instrumentation/opencensus-service/cmd/ocagent
40
53
```
41
54
42
55
### Step 2: Run the client (React application)
43
56
44
-
Then within your the `client` folder install all dependencies and run locally the application.
57
+
Then within the `client` folder install all dependencies and run locally the application.
45
58
46
59
```bash
47
60
cd client/
@@ -51,19 +64,27 @@ npm start
51
64
52
65
That will start the react application on `localhost:3000`.
53
66
54
-
### Step 3: Run this example server
67
+
### Step 3: Run the server
55
68
56
-
Now you can run this example server with the following commands from within your
69
+
Now you can run the example server with the following commands from within your
57
70
`opencensus-web` folder:
58
71
59
72
```bash
60
-
cdexamples/user_interaction/server/
73
+
cd server/
61
74
node server.js
62
75
```
63
76
64
77
Now visit http://localhost:3000/ in your browser to see the hello
65
-
world page render. If you look in the browser developer tools network tab, you
66
-
should see an XHR that writes trace spans to the OpenCensus agent. Then go to
67
-
the trace viewer for the exporter you set up and view the trace of your initial
68
-
page load. It will be named `Nav./index.html` (or just `Nav./` if you left off
69
-
the actual `index.html` part when you visited the URL).
78
+
world page render. If you click on the button or navigate to another page
79
+
in the browser developer tools network tab, you should see an XHR that writes
80
+
trace spans to the OpenCensus agent.
81
+
82
+
Then go to the trace viewer for the exporter you set up and view the trace of your initial
83
+
page load plus the different user interaction traces. Notice they will be named as
84
+
*Trace user interaction*, *button#trace_interaction click* or *Navigation /second_page*
85
+
for this example. Then, in every trace you will see several spans associated to the interaction.
0 commit comments