Skip to content

Commit d39d55a

Browse files
committed
added instructions to build profiling app
1 parent 0e99aa2 commit d39d55a

File tree

7 files changed

+92
-2
lines changed

7 files changed

+92
-2
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
---
2+
title: Build the Sample Application
3+
linkTitle: 5.1 Build the Sample Application
4+
weight: 1
5+
---
6+
7+
{{% badge icon="clock" color="#ed0090" %}}10 minutes{{% /badge %}}
8+
9+
## Introduction
10+
11+
For this workshop, we'll be using a Java-based application called `The Door Game`. It will be hosted in Kubernetes.
12+
13+
## Pre-requisites
14+
You will start with an EC2 instance and perform some [initial steps](#initial-steps) in order to get to the following state:
15+
* Install Kubernetes (k3s) and Docker
16+
* Deploy the **Splunk distribution of the OpenTelemetry Collector**
17+
* Build and deploy the `doorgame` application container
18+
19+
## Initial Steps
20+
21+
The initial setup can be completed by executing the following steps on the command line of your EC2 instance.
22+
23+
You'll be asked to enter a name for your environment. Please use `profiling-workshop-yourname` (where `yourname` is replaced by your actual name).
24+
```
25+
cd workshop/profiling
26+
27+
./1-docker-setup.sh
28+
29+
# Exit and ssh back to this instance
30+
31+
# return to the same directory as before
32+
cd workshop/profiling
33+
34+
# ensure Docker is running
35+
sudo systemctl start docker
36+
37+
./2-deploy-otel-collector.sh
38+
./3-deploy-doorgame.sh
39+
```
40+
41+
## Let's Play The Door Game!
42+
43+
Now that the application is deployed, let's play with it and generate some observability data.
44+
45+
Get the external IP address for your application instance using the following command:
46+
47+
````
48+
kubectl describe svc doorgame | grep "LoadBalancer Ingress"
49+
````
50+
51+
The output should look like the following:
52+
53+
````
54+
LoadBalancer Ingress: 52.23.184.60
55+
````
56+
57+
You should be able to access The Door Game application by pointing your browser to port 81 of the provided IP address. For example:
58+
59+
````
60+
http://52.23.184.60:81
61+
````
62+
63+
You should be met with The Door Game intro screen:
64+
65+
![Door Game Welcome Screen](../images/door_game_initial_screen.png)
66+
67+
Click `Let's Play` then choose a door:
68+
69+
![Door Game Choose Door Screen](../images/door_game_choose_door.png)
70+
71+
Play through a couple of times to get the feel for the application flow... and then play many times to ensure there are enough spans to create usable Profiling data...
72+
73+
## View your application in Splunk Observability Cloud
74+
75+
Now that the setup is complete, let's confirm that it's sending data to **Splunk Observability Cloud**. Note that when the application is deployed for the first time, it may take a few minutes for the data to appear.
76+
77+
Navigate to APM, then use the Environment dropdown to select your environment (i.e. `profiling-workshop-name`).
78+
79+
If everything was deployed correctly, you should see `doorgame` displayed in the list of services:
80+
81+
![APM Overview](../images/apm_overview.png)
82+
83+
Click on **Explore** on the right-hand side to view the service map. We should the `doorgame` application on the service map:
84+
85+
![Service Map](../images/service_map.png)
86+
87+
Next, click on **Traces** on the right-hand side to see the traces captured for this application. You'll see that some traces run relatively fast (i.e. just a few milliseconds), whereas others take a few seconds.
88+
89+
![Traces](../images/traces.png)
90+
194 KB
Loading
185 KB
Loading
131 KB
Loading
248 KB
Loading
314 KB
Loading

workshop/profiling/doorgame/doorgame.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ kind: Service
5454
metadata:
5555
name: doorgame
5656
spec:
57-
type: ClusterIP
57+
type: LoadBalancer
5858
selector:
5959
app: doorgame
6060
ports:
6161
- protocol: TCP
62-
port: 9090
62+
port: 81
6363
targetPort: 9090

0 commit comments

Comments
 (0)