Skip to content

Commit

Permalink
GH-6 - Add documentation section on observability.
Browse files Browse the repository at this point in the history
  • Loading branch information
odrotbohm committed Oct 17, 2022
1 parent ae692e3 commit 615c72b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/docs/asciidoc/70-observability.adoc
Original file line number Diff line number Diff line change
@@ -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.

Binary file added src/docs/asciidoc/images/observability.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions src/docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ include::50-moments.adoc[]

include::60-documentation.adoc[]

include::70-observability.adoc[]

include::90-appendix.adoc[]

:leveloffset: -1

0 comments on commit 615c72b

Please sign in to comment.