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/logobserver.md
+24-19Lines changed: 24 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,13 @@ We need to configure the Splunk OpenTelemetry Collector to tail the Spring PetCl
13
13
14
14
The Splunk OpenTelemetry Collector uses FluentD to consume/report logs and to configure the proper setting to report Spring PetClinic logs, we just need to add a FluentD configuration file in the default directory (`/etc/otel/collector/fluentd/conf.d/`).
15
15
16
-
Here's the sample FluentD configuration file (`petclinic.conf`, reading the file `/tmp/spring-petclinic.log`)
16
+
So we need to create the a new FluentD configuration file:
17
+
18
+
```bash
19
+
sudo vi /etc/otel/collector/fluentd/conf.d/petclinic.conf
20
+
```
21
+
22
+
Copy and paste in the following configuration, this will read the file `/tmp/spring-petclinic.log` that will be configured in the next section.
17
23
18
24
```ini
19
25
<source>
@@ -29,28 +35,28 @@ Here's the sample FluentD configuration file (`petclinic.conf`, reading the file
29
35
</source>
30
36
```
31
37
32
-
So we need to create the file
33
-
34
-
```bash
35
-
sudo vi /etc/otel/collector/fluentd/conf.d/petclinic.conf
36
-
```
37
-
38
-
We also need to change permission and ownership of the petclinic.conf file
38
+
We now need to change permission and ownership of the petclinic.conf file so the agent can read it:
And paste the contents from the snippet above. Once the file is created, we need to restart the FluentD process
45
+
Now that we have created the new configuration and changed the permissions we need to restart the FluentD process:
46
46
47
47
```bash
48
48
sudo systemctl restart td-agent
49
49
```
50
50
51
51
## 3. Logback Settings
52
52
53
-
The Spring PetClinic application can be configure to use a number of different java logging libraries. In this scenario, we are using logback. Here's a sample logback configuration file:
53
+
The Spring PetClinic application can be configured to use a number of different java logging libraries. In this scenario, we are using logback. We just need to create a file named `logback.xml` in the configuration folder:
54
+
55
+
```bash
56
+
vi src/main/resources/logback.xml
57
+
```
58
+
59
+
Copy and paste the following XML content:
54
60
55
61
```xml
56
62
<?xml version="1.0" encoding="UTF-8"?>
@@ -69,7 +75,9 @@ The Spring PetClinic application can be configure to use a number of different j
This the end of the exercise and we have certainly covered a lot of ground. At this point you should have metrics, traces, logs, database query performance and code profiling being reported into Splunk Observability Cloud. **Congratulations**!
119
+
This the end of the exercise and we have certainly covered a lot of ground. At this point you should have metrics, traces (APM & RUM), logs, database query performance and code profiling being reported into Splunk Observability Cloud. **Congratulations**!
0 commit comments