Skip to content

Commit 240c442

Browse files
committed
all files updated with grafana stack config
1 parent 9bc6d2e commit 240c442

File tree

94 files changed

+3716
-49
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+3716
-49
lines changed

api-gateway/docker/grafana/dashboard.json

Lines changed: 3295 additions & 0 deletions
Large diffs are not rendered by default.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"format":"vParquet2","blockID":"8f4753b5-3ce0-4e8c-9600-2b419dd39f16","minID":"ZtAfO7YMLjaw/fsKmjeJcg==","maxID":"ZtAmS7vu85+52QtiZCafhA==","tenantID":"single-tenant","startTime":"2024-08-29T07:11:55Z","endTime":"2024-08-29T07:42:03Z","totalObjects":570,"size":107254,"compactionLevel":0,"encoding":"none","indexPageSize":0,"totalRecords":1,"dataEncoding":"","bloomShards":1,"footerSize":9223}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"format":"vParquet2","blockID":"ee1bf1fe-a053-48d6-b757-8924693cd0ff","minID":"ZtAYLa4il+E0BFcn4GGwZQ==","maxID":"ZtAfOfgJzYo0any6Hj1zAQ==","tenantID":"single-tenant","startTime":"2024-08-29T06:41:49Z","endTime":"2024-08-29T07:11:53Z","totalObjects":684,"size":80684,"compactionLevel":0,"encoding":"none","indexPageSize":0,"totalRecords":1,"dataEncoding":"","bloomShards":1,"footerSize":9053}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"format":"vParquet2","blockID":"f3a917f7-7735-49c7-8bd8-bf9a375451d2","minID":"ZtAYLa4il+E0BFcn4GGwZQ==","maxID":"ZtAmS7vu85+52QtiZCafhA==","tenantID":"single-tenant","startTime":"2024-08-29T06:41:49Z","endTime":"2024-08-29T07:42:03Z","totalObjects":1254,"size":175100,"compactionLevel":1,"encoding":"none","indexPageSize":0,"totalRecords":1,"dataEncoding":"","bloomShards":1,"footerSize":9225}
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"UID":"b785ccfc-ff97-4570-911c-2c787e9504f5","created_at":"2024-08-29T06:40:04.166821123Z","version":{"version":"2.2.2","revision":"5e18d78ba","branch":"HEAD","buildUser":"","buildDate":"","goVersion":"go1.20.4"}}

api-gateway/pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,32 @@
6363
<groupId>org.springframework.cloud</groupId>
6464
<artifactId>spring-cloud-starter-circuitbreaker-resilience4j</artifactId>
6565
</dependency>
66+
<dependency>
67+
<groupId>com.github.loki4j</groupId>
68+
<artifactId>loki-logback-appender</artifactId>
69+
<version>1.3.2</version>
70+
</dependency>
71+
<dependency>
72+
<groupId>org.springframework.boot</groupId>
73+
<artifactId>spring-boot-starter-actuator</artifactId>
74+
</dependency>
75+
<dependency>
76+
<groupId>io.micrometer</groupId>
77+
<artifactId>micrometer-registry-prometheus</artifactId>
78+
<scope>runtime</scope>
79+
</dependency>
80+
<dependency>
81+
<groupId>io.micrometer</groupId>
82+
<artifactId>micrometer-tracing-bridge-brave</artifactId>
83+
</dependency>
84+
<dependency>
85+
<groupId>io.zipkin.reporter2</groupId>
86+
<artifactId>zipkin-reporter-brave</artifactId>
87+
</dependency>
88+
<dependency>
89+
<groupId>org.springframework.boot</groupId>
90+
<artifactId>spring-boot-starter-aop</artifactId>
91+
</dependency>
6692
</dependencies>
6793
<dependencyManagement>
6894
<dependencies>

api-gateway/src/main/java/com/nipundas/api_gateway/config/SecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
public class SecurityConfig {
1616

1717
private final String[] freeResourceUrls = {"/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**",
18-
"/swagger-resources/**", "/api-docs/**", "/aggregate/**"};
18+
"/swagger-resources/**", "/api-docs/**", "/aggregate/**", "/actuator/prometheus"};
1919

2020
@Bean
2121
public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity) throws Exception {

api-gateway/src/main/resources/application.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,9 @@ resilience4j.retry.configs.default.wait-duration=2s
3636
# if ext. service doesn't respond in 2s, it ig going to retry it 3 times
3737
# if retry also doesn't work, then timeout-duration will kick-in, and open the circuit breaker
3838

39+
40+
41+
management.metrics.distribution.percentiles-histogram.http.server.requests=true
42+
management.observations.key-values.application=product-service
43+
44+
management.tracing.sampling.probability=1.0
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configuration>
3+
<include resource="org/springframework/boot/logging/logback/base.xml"/>
4+
<springProperty scope="context" name="appName" source="spring.application.name"/>
5+
6+
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender">
7+
<http>
8+
<url>http://localhost:3100/loki/api/v1/push</url>
9+
</http>
10+
<format>
11+
<label>
12+
<pattern>application=${appName},host=${HOSTNAME},level=%level</pattern>
13+
</label>
14+
<message>
15+
<pattern>${FILE_LOG_PATTERN}</pattern>
16+
</message>
17+
<sortByTime>true</sortByTime>
18+
</format>
19+
</appender>
20+
21+
<root level="INFO">
22+
<appender-ref ref="LOKI"/>
23+
</root>
24+
</configuration>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

api-gateway/volume-data/mysql_keycloak_data/binlog.index

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@
77
./binlog.000008
88
./binlog.000009
99
./binlog.000010
10+
./binlog.000011
11+
./binlog.000012
12+
./binlog.000013
13+
./binlog.000014
14+
./binlog.000015

api-gateway/volume-data/mysql_keycloak_data/ib_buffer_pool

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
4294967294,471
2-
4294967278,277
1+
4294967294,472
2+
4294967278,283
33
4294967293,131
44
4294967293,130
55
4294967293,129
@@ -142,55 +142,54 @@
142142
4243767281,0
143143
4294967293,0
144144
4294967279,139
145-
4294967279,25
146-
4294967279,140
147145
4294967279,26
148-
4294967279,27
146+
4294967279,140
149147
4294967279,141
148+
4294967279,27
150149
4294967279,28
151150
4294967279,142
152-
4294967279,144
153151
4294967279,29
154152
4294967279,143
153+
4294967279,144
155154
4294967279,30
156-
4294967279,146
155+
4294967279,145
157156
4294967279,31
158157
4294967279,32
159-
4294967279,145
160-
4294967279,147
158+
4294967279,146
161159
4294967279,33
162-
4294967279,34
163-
4294967279,35
160+
4294967279,147
164161
4294967279,148
162+
4294967279,34
165163
4294967279,149
166-
4294967279,150
164+
4294967279,35
167165
4294967279,36
168-
4294967279,151
169166
4294967279,37
170-
4294967279,38
171-
4294967279,39
167+
4294967279,150
172168
4294967279,152
169+
4294967279,151
173170
4294967279,153
174-
4294967279,154
175-
4294967279,155
171+
4294967279,38
172+
4294967279,39
176173
4294967279,40
177174
4294967279,41
175+
4294967279,154
176+
4294967279,155
177+
4294967279,158
178+
4294967279,156
178179
4294967279,42
179180
4294967279,43
180-
4294967279,156
181-
4294967279,158
182181
4294967279,157
183182
4294967279,44
184183
4294967279,159
185-
4294967279,161
186184
4294967279,160
187185
4294967279,45
186+
4294967279,161
188187
4294967279,46
189188
4294967279,47
190-
4294967279,162
191189
4294967279,48
192-
4294967279,164
190+
4294967279,162
193191
4294967279,163
192+
4294967279,164
194193
4294967279,165
195194
4294967279,49
196195
4294967279,50
@@ -199,47 +198,49 @@
199198
4294967279,166
200199
4294967279,167
201200
4294967279,168
202-
4294967279,169
203201
4294967279,53
204202
4294967279,54
205203
4294967279,55
206-
4294967279,56
204+
4294967279,169
207205
4294967279,170
208206
4294967279,171
209-
4294967279,172
207+
4294967279,56
210208
4294967279,57
211-
4294967279,173
209+
4294967279,172
212210
4294967279,58
211+
4294967279,173
213212
4294967279,59
214-
4294967279,175
215213
4294967279,60
214+
4294967279,175
216215
4294967279,176
217216
4294967279,177
218-
4294967279,61
219217
4294967279,178
218+
4294967279,61
220219
4294967279,62
221220
4294967279,63
222-
4294967279,179
223221
4294967279,64
222+
4294967279,179
224223
4294967279,180
225224
4294967279,181
225+
4294967279,182
226226
4294967279,65
227227
4294967279,66
228-
4294967279,182
229228
4294967279,67
229+
4294967279,68
230230
4294967279,183
231231
4294967279,184
232-
4294967279,68
233232
4294967279,185
233+
4294967279,186
234234
4294967279,69
235235
4294967279,70
236236
4294967279,71
237-
4294967279,189
238-
4294967279,186
237+
4294967279,72
239238
4294967279,187
240239
4294967279,188
241-
4294967279,72
240+
4294967279,189
241+
4294967279,190
242242
4294967279,73
243243
4294967279,74
244244
4294967279,75
245-
4294967279,190
245+
4294967279,76
246+
4294967279,192
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

inventory-service/pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,32 @@
9292
<artifactId>springdoc-openapi-starter-webmvc-api</artifactId>
9393
<version>2.6.0</version>
9494
</dependency>
95+
<dependency>
96+
<groupId>com.github.loki4j</groupId>
97+
<artifactId>loki-logback-appender</artifactId>
98+
<version>1.3.2</version>
99+
</dependency>
100+
<dependency>
101+
<groupId>org.springframework.boot</groupId>
102+
<artifactId>spring-boot-starter-actuator</artifactId>
103+
</dependency>
104+
<dependency>
105+
<groupId>io.micrometer</groupId>
106+
<artifactId>micrometer-registry-prometheus</artifactId>
107+
<scope>runtime</scope>
108+
</dependency>
109+
<dependency>
110+
<groupId>io.micrometer</groupId>
111+
<artifactId>micrometer-tracing-bridge-brave</artifactId>
112+
</dependency>
113+
<dependency>
114+
<groupId>io.zipkin.reporter2</groupId>
115+
<artifactId>zipkin-reporter-brave</artifactId>
116+
</dependency>
117+
<dependency>
118+
<groupId>org.springframework.boot</groupId>
119+
<artifactId>spring-boot-starter-aop</artifactId>
120+
</dependency>
95121
</dependencies>
96122
<dependencyManagement>
97123
<dependencies>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package com.nipundas.inventory_service.config;
2+
3+
import io.micrometer.observation.ObservationRegistry;
4+
import io.micrometer.observation.aop.ObservedAspect;
5+
import org.springframework.context.annotation.Bean;
6+
import org.springframework.context.annotation.Configuration;
7+
8+
@Configuration
9+
public class ObservabilityConfig {
10+
@Bean
11+
ObservedAspect observedAspect(ObservationRegistry registry) {
12+
return new ObservedAspect(registry);
13+
}
14+
}

inventory-service/src/main/resources/application.properties

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,12 @@ spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
88
spring.flyway.baselineOnMigrate = true
99

1010
springdoc.swagger-ui.path=/swagger-ui.html
11-
springdoc.api-docs.path=/api-docs
11+
springdoc.api-docs.path=/api-docs
12+
13+
14+
management.endpoints.web.exposure.include=health, info, metrics, prometheus
15+
16+
management.metrics.distribution.percentiles-histogram.http.server.requests=true
17+
management.observations.key-values.application=inventory-service
18+
19+
management.tracing.sampling.probability=1.0
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<configuration>
3+
<include resource="org/springframework/boot/logging/logback/base.xml"/>
4+
<springProperty scope="context" name="appName" source="spring.application.name"/>
5+
6+
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender">
7+
<http>
8+
<url>http://localhost:3100/loki/api/v1/push</url>
9+
</http>
10+
<format>
11+
<label>
12+
<pattern>application=${appName},host=${HOSTNAME},level=%level</pattern>
13+
</label>
14+
<message>
15+
<pattern>${FILE_LOG_PATTERN}</pattern>
16+
</message>
17+
<sortByTime>true</sortByTime>
18+
</format>
19+
</appender>
20+
21+
<root level="INFO">
22+
<appender-ref ref="LOKI"/>
23+
</root>
24+
</configuration>

microservices-frontend/src/app/shared/header/header.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export class HeaderComponent implements OnInit {
1313
private readonly oidcSecurityService = inject(OidcSecurityService);
1414
isAuthenticated = false;
1515
username = "";
16+
1617

1718
ngOnInit(): void {
1819
this.oidcSecurityService.isAuthenticated$.subscribe(

microservices-frontend/src/styles.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* You can add global styles to this file, and also import other style files */
21
@tailwind base;
32
@tailwind components;
43
@tailwind utilities;

notification-service/pom.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,32 @@
9090
<artifactId>kafka</artifactId>
9191
<scope>test</scope>
9292
</dependency>
93+
<dependency>
94+
<groupId>com.github.loki4j</groupId>
95+
<artifactId>loki-logback-appender</artifactId>
96+
<version>1.3.2</version>
97+
</dependency>
98+
<dependency>
99+
<groupId>org.springframework.boot</groupId>
100+
<artifactId>spring-boot-starter-actuator</artifactId>
101+
</dependency>
102+
<dependency>
103+
<groupId>io.micrometer</groupId>
104+
<artifactId>micrometer-registry-prometheus</artifactId>
105+
<scope>runtime</scope>
106+
</dependency>
107+
<dependency>
108+
<groupId>io.micrometer</groupId>
109+
<artifactId>micrometer-tracing-bridge-brave</artifactId>
110+
</dependency>
111+
<dependency>
112+
<groupId>io.zipkin.reporter2</groupId>
113+
<artifactId>zipkin-reporter-brave</artifactId>
114+
</dependency>
115+
<dependency>
116+
<groupId>org.springframework.boot</groupId>
117+
<artifactId>spring-boot-starter-aop</artifactId>
118+
</dependency>
93119
</dependencies>
94120

95121
<build>

0 commit comments

Comments
 (0)