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/1-imt/_index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ The workshops also introduce you to dashboards, editing and creating charts, cre
15
15
16
16
By the end of these technical workshops, you will have a good understanding of some of the key features and capabilities of the Splunk Observability Cloud.
17
17
18
-
Here are the instructions on how to access your pre-configured [AWS](./initial-setup/)/EC2 instance](./initial-setup/)
18
+
Here are the instructions on how to access your pre-configured [AWS](./initial-setup/)/[EC2 instance](./initial-setup/)
Copy file name to clipboardExpand all lines: content/en/other/3-auto-instrumentation/3-java-microservices-pet-clinic/10-preparation.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,14 +45,14 @@ configmap/scriptfile created
45
45
{{% /tab %}}
46
46
{{< /tabs >}}
47
47
48
-
{{% notice title="In case of error Unable to read /etc/rancher/k3s/k3s.yaml" style="warning" %}}
48
+
<!--{{% notice title="In case of error Unable to read /etc/rancher/k3s/k3s.yaml" style="warning" %}}
49
49
In rare occasions, you may encounter the above error at this point, this is due to incorrect file permission on the Kubernetes config file. This can easily be resolved by running the following command:
50
50
51
51
``` bash
52
52
sudo chmod 777 /etc/rancher/k3s/k3s.yaml
53
53
```
54
54
55
-
{{% /notice %}}
55
+
{{% /notice %}}-->
56
56
At this point we can verify the deployment by checking if the Pods are running:
## 4. Verify the installation by checking Metrics and Logs
196
196
197
197
Once the installation is completed, you can login into the **Splunk Observability Cloud** with the URL provided by the Instructor.
198
-
First, Navigate to **Kubernetes Navigator**in the **Infrastructure** section to see the metrics from your cluster inthe **K8s nodes** pane an change the *Time* filter to the last 15 Minutes (-15m).
198
+
First, Navigate to **Kubernetes Navigator**in the **Infrastructure** section to see the metrics from your cluster in the **K8s nodes** pane. Change the *Time* filter to the last 15 Minutes (-15m) to focus on the lates data.
199
199
200
-
Use the regular filter option and select`k8s.cluster.name`**(1)**andtype or selectthe cluster name of your workshop instance (you can get the unique part from your cluster name by using the `INSTANCE` from the output from the shell script you run earlier). (You can also selectyou cluster by clicking on on its image in the cluster pane.)
200
+
Use the regular filter option at the top of the Navigator and select`k8s.cluster.name`**(1)**and type or selectthe cluster name of your workshop instance (you can get the unique part from your cluster name by using the `INSTANCE` from the output from the shell script you run earlier). (You can also selectyou cluster by clicking on on its image in the cluster pane.)
201
201
202
202
You should see metrics **(3)**& log events **(4)** related to your cluster. Also a `Mysql` pane **(5)** should appear,when you click on that pane, you can see the MySQL related metrics from you database.
In the previous chapter, we enabled the OpenTelemetry Collector for Kubernetes and configured it to send metrics to the **Splunk Observability Cloud**. The next step is to enable auto-instrumentation for our Java apps running in the pods in our cluster.
7
+
In the previous chapter, we enabled the OpenTelemetry Collector for Kubernetes on our cluster and configured it to send metrics both Kubernetes and Mysql metrics to the **Splunk Observability Cloud**. The next step is to enable auto-instrumentation for our Java apps running in the pods in our cluster.
8
+
9
+
{{% notice title="Zero Config Auto Instrumentation" style="info" %}}
10
+
It is important to understand that Zero Config Auto instrumentation is designed to get Trace/Span & Profiling data out of your existing application, without requiring you to change your code or requiring to rebuild.
11
+
{{% /notice %}}
12
+
8
13
9
14
For this workshop we will be using the Zero config option of the Opentelemetry Collector in Kubernetes.
10
15
This means that the Collector monitors you pods running in Kubernetes, and if they match certain criteria, they will en able auto instrumentation on the pod.
Once the container is patched it will be restarted, let's go back to the **Splunk Observability Cloud** with the URL provided by the Instructor to check our service.
64
69
65
-
First, Navigate to the **APM** section to see the traces from your service in the **Explore** Pane. Use the filter option and change the *environment* filter **(1)** and search for the name of your workshop instance in the drop down box, it should be the [INSTANCE]-workshop. (where `INSTANCE` is the value from the shell script you run earlier). Make sure it is the only one selected.
70
+
First, Navigate to the **APM**section to see the traces from your service in the **Explore** Pane. Use the filter option and change the *environment* filter **(1)** and search for the name of your workshop instance in the drop down box, it should be the [INSTANCE]-workshop. (where `INSTANCE` is the value from the shell script you run earlier). Make sure it is the only one selected.
66
71

67
72
You should see the name **(2)** of the service and metrics in the Latency and Request & Errors charts. (You can ignore the Critical Alert, Its caused by the sudden request increase generated by the load generator, It will become the norm in a bit and go away).
Copy file name to clipboardExpand all lines: content/en/other/3-auto-instrumentation/3-java-microservices-pet-clinic/60-log-observer-connect.md
+53-13Lines changed: 53 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,19 +6,35 @@ weight: 60
6
6
7
7
## 1. Introduction
8
8
9
-
For the Splunk Log Observer component, we will configure the Spring PetClinic application to use an Otel Based format to write logs, This will allow the (Auto)-instrumentation to add Otel relevant information to the logs that can be used to correlate Metric, traces and logs.
9
+
Until this point, we have not touched or changed our code, yet we did receive Trace & Profiling/DB Query performance information.
10
+
If we want to get more out of our Java application, we can introduce a small change to our application log setup.
11
+
12
+
This change will configure the Spring PetClinic application to use an Otel Based format to write logs, This will allow the (Auto)-instrumentation to add Otel relevant information into the logs.
13
+
14
+
The Splunk Log Observer component is used to view the logs and with this information can automatically relate logs information with APM Services and Traces. This feature called **Related Content** will also work with Infra structure.
10
15
11
16
## 2. Update Logback config for the services
12
17
13
-
The Spring PetClinic application can be configured to use several different Java logging libraries. In this scenario, the application is using `logback`. to make sure we get the otel information in the logs we just need to update a file named `logback.xml` for each of the services in the petclinc microservices folders.
18
+
The Spring PetClinic application can be configured to use several different Java logging libraries. In this scenario, the application is using `logback`. To make sure we get the otel information in the logs we need to update a file named `logback.xml` with the log structure, and add an Otel dependency to the `pom.xml` of each of the services in the petclinic microservices folders.
19
+
20
+
First lets set the Log Structure/Format:
21
+
22
+
Spring boot will allow you to set a global template, but for ease of use, we will replace the existing content of the `logback-spring.xml` files of each service with the following XML content using a prepared script:
23
+
Note the following entries that will be added:
14
24
15
-
Spring boot will allow you to set a global template, but for ease of use, we will replace the existing content of the `logback-spring.xml` files of each service with the following XML content using a prepared script:
25
+
- trace_id
26
+
- span_id
27
+
- trace_flags
28
+
- service.name
29
+
- deployment.environment
30
+
31
+
These fields allows the **Splunk Observability Cloud Suite** to display **Related Content**:
Before we can build the new services with the updated log format we need to add the dependency to the `Pom.xml`:
74
94
75
-
Next, run the script that will use the `maven` command to compile/build/package the PetClinic microservices:
95
+
```bash
96
+
.~/workshop/petclinic/scripts/add_otel.sh
97
+
```
98
+
99
+
The Services are now ready to be build, so run the script that will use the `maven` command to compile/build/package the PetClinic microservices (Note the -P buildDocker, this will build the new containers):
Next, run the script that will push the newly build containers into our local repository:
136
+
Given that Kubernetes needs to pull these freshly build images from somewhere, we are going to store them in the repository we set up earlier. To do this, run the script that will push the newly build containers into our local repository:
113
137
114
138
{{< tabs >}}
115
139
{{% tab title="pushing Containers" %}}
@@ -171,12 +195,31 @@ The result should be :
171
195
172
196
## 5. Deploy new services to kubernetes
173
197
174
-
To see the changes in effect, we need to redeploy the services, by applying the local version of the deployment yaml.
198
+
To see the changes in effect, we need to redeploy the services, First let change the location of the images from the exterenal repo to the local one by running the following script:
199
+
200
+
```bash
201
+
.~/workshop/petclinic/scripts/set_local.sh
202
+
```
203
+
204
+
The result is a new file on disk called **petclinic-local.yaml**
205
+
Let switch to the local version by applying the local version of the deployment yaml.
0 commit comments