GH-6 - Add documentation section on observability.
This commit is contained in:
26
src/docs/asciidoc/70-observability.adoc
Normal file
26
src/docs/asciidoc/70-observability.adoc
Normal file
@@ -0,0 +1,26 @@
|
||||
[[observability]]
|
||||
= Observing Application Modules
|
||||
:imagesdir: images
|
||||
|
||||
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].
|
||||
To activate the instrumentation add the following runtime dependency to your project:
|
||||
|
||||
[source, xml]
|
||||
----
|
||||
<dependency>
|
||||
<groupId>org.springframework.modulith</groupId>
|
||||
<artifactId>spring-modulith</artifactId>
|
||||
<version>{projectVersion}</version>
|
||||
<scope>runtime</scope
|
||||
</dependency
|
||||
----
|
||||
|
||||
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.
|
||||
A sample invocation trace can be seen below:
|
||||
|
||||
.A sample module invocation trace
|
||||
image::observability.png[]
|
||||
|
||||
In this particular case, triggering the payment changes the state of the order which then causes an order completion event being triggered.
|
||||
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.
|
||||
|
||||
BIN
src/docs/asciidoc/images/observability.png
Normal file
BIN
src/docs/asciidoc/images/observability.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 80 KiB |
@@ -25,6 +25,8 @@ include::50-moments.adoc[]
|
||||
|
||||
include::60-documentation.adoc[]
|
||||
|
||||
include::70-observability.adoc[]
|
||||
|
||||
include::90-appendix.adoc[]
|
||||
|
||||
:leveloffset: -1
|
||||
|
||||
Reference in New Issue
Block a user