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
Copy file name to clipboardExpand all lines: content/en/other/pet-clinic/_index.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ The goal is to walk through the basic steps to configure the following component
12
12
* Database Query Performance
13
13
* AlwaysOn Profiling
14
14
* Splunk Real User Monitoring (RUM)
15
+
* RUM spans to APM spans
15
16
* Splunk LogsObserver (LO)
16
17
17
18
We will also show the steps about how to clone (download) a sample Java application (Spring PetClinic), as well as how to compile, package and run the application.
Next, run the maven command to compile/build/package PetClinic:
29
+
Next, run the `maven` command to compile/build/package PetClinic:
34
30
35
31
```bash
36
32
./mvnw package -Dmaven.test.skip=true
37
33
```
38
34
39
-
{{% notice title="Information" style="info" %}}
40
-
This will take a few minutes the first time you run, maven will download a lot of dependencies before it actually compiles the app. Future executions will be a lot shorter.
35
+
{{% notice title="Note" style="info" %}}
36
+
This will take a few minutes the first time you run, `maven` will download a lot of dependencies before it actually compiles the application. Future executions will be a lot shorter.
41
37
{{% /notice %}}
42
38
43
39
Once the compilation is complete, you can run the application with the following command:
@@ -54,37 +50,49 @@ If you check the logs of the Splunk OpenTelemetry collector you will see that th
54
50
sudo tail -f /var/log/syslog
55
51
```
56
52
57
-
You can validate if the application is running by visiting `http://<VM_IP_ADDRESS>:8080`. Now generate some traffic, click around, generate errors, add visits, etc. Then you can visit the Splunk APM UI and examine the application components, traces, etc. **Hamburger Menu → APM → Explore**.
53
+
You can validate if the application is running by visiting `http://<VM_IP_ADDRESS>:8080`.
54
+
55
+
## 2. Generating Traffic
56
+
57
+
Next we will start a Docker container running Locust that will generate some simple traffic to the PetClinic application. Locust is a simple load testing tool that can be used to generate traffic to a web application.
Then you can visit the Splunk APM UI and examine the application components, traces, etc. **Hamburger Menu → APM → Explore**.
64
+
65
+
Once your validation is complete you can stop the application by pressing `Ctrl-c`.
58
66
59
-
**Once your validation is complete you can stop the application by pressing**`Ctrl-c`**.**
67
+
## 3. Enabling AlwaysOn Profiling and Metrics
60
68
61
69
To enable CPU and Memory Profiling on the application we can start the application by passing `splunk.profiler.enabled=true` and for metrics pass `splunk.metrics.enabled=true`. Make sure the application is stopped and run the following command to enable metrics and profiling.
Let's go visit our application again to generate some traffic `http://<VM_IP_ADDRESS>:8080`. Click around, generate errors, add visits, etc. Then you can visit the Splunk APM UI and examine the application components, traces, profiling, DB Query performance and metrics **Hamburger Menu → APM → Explore**.
79
+
You can now visit the Splunk APM UI and examine the application components, traces, profiling, DB Query performance and metrics **Hamburger Menu → APM → Explore**.
72
80
73
-
**Once your validation is complete you can stop the application by pressing**`Ctrl-c`**.**
81
+
Once your validation is complete you can stop the application by pressing `Ctrl-c`.
74
82
75
-
## 2. Adding Resource Attributes to Spans
83
+
## 4. Adding Resource Attributes to Spans
76
84
77
85
Resource attributes can be added to every reported span. For example `version=0.314`. A comma separated list of resource attributes can also be defined e.g. `key1=val1,key2=val2`.
78
86
79
87
Let's launch the PetClinic again using a new resource attribute. Note, that adding resource attributes to the run command will override what was defined when we installed the collector. So, we also need to specify our `deployment.environment` resource attribute along with our new resource attribute. Below you will see we are setting `deployment.environment=$(hostname)-petclinic` and `version=0.314`.
Go back to the application and generate some more traffic. Then, back in the Splunk APM UI we can drill down on a recent trace and see the new `version` attribute in a span.
98
+
Back in the Splunk APM UI we can drill down on a recent trace and see the new `version` attribute in a span.
Then let's visit the application again to generate more traffic `http://<VM_IP_ADDRESS>:8080`, now we should see RUM traces being reported
61
+
Then let's visit the application using a browser to generate real-user traffic `http://<VM_IP_ADDRESS>:8080`, now we should see RUM traces being reported.
62
62
63
63
Let's visit RUM and see some of the traces and metrics **Hamburger Menu → RUM** and you will see some of the Spring PetClinic URLs showing up in the UI.
64
+
65
+
When you drill down into a RUM trace you will see a link to APM in the spans. Clicking on the trace ID will take you to the corresponding APM trace for the current RUM trace.
0 commit comments