Skip to content

Commit 615c72b

Browse files
committed
GH-6 - Add documentation section on observability.
1 parent ae692e3 commit 615c72b

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[[observability]]
2+
= Observing Application Modules
3+
:imagesdir: images
4+
5+
The interaction between application modules can be intercepted to create Micrometer spans to ultimately end up in traces you can visualize in tools like https://zipkin.io/[Zipkin].
6+
To activate the instrumentation add the following runtime dependency to your project:
7+
8+
[source, xml]
9+
----
10+
<dependency>
11+
<groupId>org.springframework.modulith</groupId>
12+
<artifactId>spring-modulith</artifactId>
13+
<version>{projectVersion}</version>
14+
<scope>runtime</scope
15+
</dependency
16+
----
17+
18+
This will cause all Spring components that are part of the application module's API being decorated with an aspect that will intercept invocations and create Micrometer spans for them.
19+
A sample invocation trace can be seen below:
20+
21+
.A sample module invocation trace
22+
image::observability.png[]
23+
24+
In this particular case, triggering the payment changes the state of the order which then causes an order completion event being triggered.
25+
This gets picked up asynchronously by the engine that triggers another state change on the order, works for a couple of seconds and triggers the final state change on the order in turn.
26+
80.3 KB
Loading

src/docs/asciidoc/index.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ include::50-moments.adoc[]
2525

2626
include::60-documentation.adoc[]
2727

28+
include::70-observability.adoc[]
29+
2830
include::90-appendix.adoc[]
2931

3032
:leveloffset: -1

0 commit comments

Comments
 (0)