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
The [Aspire dashboard](/dashboard/overview/) provides a great user experience for viewing telemetry, and is available as a standalone container image that can be used with any OpenTelemetry-enabled app. In this article, you'll learn how to:
9
9
@@ -35,21 +35,21 @@ To create a new Express.js application:
35
35
36
36
1. Initialize a new Node.js project:
37
37
38
-
```npm
38
+
```bash
39
39
npm init -y
40
40
```
41
41
42
42
1. Install Express.js:
43
43
44
-
```npm
44
+
```bash
45
45
npm install express
46
46
```
47
47
48
48
1. Create a basic Express.js application by creating an *app.js* file with Express server code.
49
49
50
50
1. Test the application by running:
51
51
52
-
```console
52
+
```bash
53
53
npm start
54
54
```
55
55
@@ -60,30 +60,32 @@ To create a new Express.js application:
60
60
61
61
To use the Aspire dashboard with your Node.js app, you need to install the OpenTelemetry SDK and exporter. The OpenTelemetry SDK provides the API for instrumenting your application, and the exporter sends telemetry data to the Aspire dashboard.
62
62
63
+
<Steps>
63
64
1. Create a new file called *tracing.js* to configure OpenTelemetry.
64
65
65
66
1. Update your *app.js* to import the tracing configuration at the very beginning.
66
67
67
68
1. Restart your application:
68
69
69
-
```console
70
+
```bash
70
71
npm start
71
72
```
73
+
</Steps>
72
74
73
75
## Start the Aspire dashboard
74
76
75
77
To start the Aspire dashboard in standalone mode, run the following Docker command:
@@ -99,14 +101,16 @@ In the Docker logs, the endpoint and key for the dashboard are displayed. Copy t
99
101
100
102
After starting both the dashboard and your Node.js application, you can view telemetry data by making requests to your application and observing the results in the dashboard.
101
103
104
+
<Steps>
102
105
1. Make some requests to your Node.js application:
103
106
104
107
```console
105
108
curl http://localhost:3000/
106
109
curl http://localhost:3000/api/weather
107
110
```
108
111
109
-
1. Navigate to the Aspire dashboard at <http://localhost:18888>andexplorethedifferentsections:
112
+
1. Navigate to the Aspire dashboard at `http://localhost:18888` and explore the different sections:
In the Docker logs, the endpoint and key for the dashboard are displayed. Copy the key and navigate to `http://localhost:18888` in a web browser. Enter the key to log in to the dashboard.
88
88
89
-
## View Structured Logs
89
+
## View structured logs
90
90
91
91
Navigate around the Python application, and you'll see structured logs in the Aspire dashboard. The structured logs page displays logs from your application, and you can filter and search the logs.
0 commit comments