-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replaced opentelemetry with spring boot actuator, loki logback append…
…er and spring boot tempo integration
- Loading branch information
1 parent
b5f2cc5
commit 68bf7f7
Showing
7 changed files
with
115 additions
and
34 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
src/Services/Ordering/orderapi/src/main/resources/logback-spring.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<include resource="org/springframework/boot/logging/logback/base.xml" /> | ||
<springProperty scope="context" name="appName" source="spring.application.name" /> | ||
|
||
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender"> | ||
<http> | ||
<url>http://loki:3100/loki/api/v1/push</url> | ||
</http> | ||
<format> | ||
<label> | ||
<pattern>application=${appName},host=${HOSTNAME},level=%level</pattern> | ||
</label> | ||
<message> | ||
<pattern>${FILE_LOG_PATTERN}</pattern> | ||
</message> | ||
<sortByTime>true</sortByTime> | ||
</format> | ||
</appender> | ||
|
||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>${CONSOLE_LOG_PATTERN}</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="LOKI" /> | ||
<appender-ref ref="CONSOLE" /> | ||
</root> | ||
</configuration> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 35 additions & 1 deletion
36
src/Services/Ordering/ordering-backgroundtasks/src/main/resources/application.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,35 @@ | ||
spring.profiles.active: dev | ||
spring: | ||
application: | ||
name: ordering-backgroundtasks | ||
profiles: | ||
active: | ||
- dev | ||
|
||
#enable management endpoints | ||
management: | ||
metrics: | ||
distribution: | ||
percentiles-histogram: | ||
http: | ||
server: | ||
requests: true | ||
tracing: | ||
sampling: | ||
probability: 1.0 | ||
|
||
endpoints: | ||
web: | ||
exposure: | ||
include: "*" | ||
endpoint: | ||
health: | ||
show-details: always | ||
|
||
prometheus: | ||
metrics: | ||
export: | ||
enabled: true | ||
|
||
zipkin: | ||
tracing: | ||
endpoint: http://tempo:9411/api/v2/spans |
32 changes: 32 additions & 0 deletions
32
src/Services/Ordering/ordering-backgroundtasks/src/main/resources/logback-spring.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<include resource="org/springframework/boot/logging/logback/base.xml" /> | ||
<springProperty scope="context" name="appName" source="spring.application.name" /> | ||
|
||
<appender name="LOKI" class="com.github.loki4j.logback.Loki4jAppender"> | ||
<http> | ||
<url>http://loki:3100/loki/api/v1/push</url> | ||
</http> | ||
<format> | ||
<label> | ||
<pattern>application=${appName},host=${HOSTNAME},level=%level</pattern> | ||
</label> | ||
<message> | ||
<pattern>${FILE_LOG_PATTERN}</pattern> | ||
</message> | ||
<sortByTime>true</sortByTime> | ||
</format> | ||
</appender> | ||
|
||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> | ||
<encoder> | ||
<pattern>${CONSOLE_LOG_PATTERN}</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="LOKI" /> | ||
<appender-ref ref="CONSOLE" /> | ||
</root> | ||
</configuration> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters