You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Spring Data MongoDB currently has the most up-to-date code to support Observability in your MongoDB application.
16
7
These changes, however, haven't been picked up by Spring Boot (yet).
17
8
Until those changes are applied, if you wish to use Spring Data MongoDB's flavor of Observability, you must carry out the following steps.
18
9
19
-
. First of all, you must opt into Spring Data MongoDB's configuration settings by adding the `@EnableMongoObservability` to either your `@SpringBootApplication` class or one of your configuration classes.
20
-
. Your project must include *Spring Boot Actuator*.
21
-
. Next you must add one of the following bean definitions based on whether you're using non-reactive or reactive Spring Data MongoDB.
10
+
. First of all, you must opt into Spring Data MongoDB's configuration settings by customizing `MongoClientSettings` through either your `@SpringBootApplication` class or one of your configuration classes.
22
11
+
23
-
.Registering a synchronous (non-reactive) MongoDB Micrometer setup
. Your project must include *Spring Boot Actuator*.
80
27
. Disable Spring Boot's autoconfigured MongoDB command listener and enable tracing manually by adding the following properties to your `application.properties`
81
28
+
82
29
.Custom settings to apply
@@ -92,3 +39,11 @@ Be sure to add any other relevant settings needed to configure the tracer you ar
92
39
====
93
40
94
41
This should do it! You are now running with Spring Data MongoDB's usage of Spring Observability's `Observation` API.
42
+
43
+
include::{root-target}_conventions.adoc[]
44
+
45
+
include::{root-target}_metrics.adoc[]
46
+
47
+
include::{root-target}_spans.adoc[]
48
+
49
+
See also https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/database/#mongodb[OpenTelemetry Semantic Conventions] for further reference.
0 commit comments