-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reference doc update for mongodb (#4594)
- Loading branch information
1 parent
66c6b09
commit d959d9b
Showing
4 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
[[overview]] | ||
= MongoDB Metrics Instrumentation | ||
|
||
https://www.mongodb.com/[MongoDB] is a modern database that supports transactional, search, analytics, and mobile use cases with a flexible document data model and a unified query interface. | ||
|
||
Below you can find an example of how to instrument MongoDb with Micrometer. | ||
|
||
TIP: To add more capabilities such as distributed tracing, please consider using https://docs.spring.io/spring-data/mongodb/reference/observability/observability.html[Spring Data MongoDb] which uses https://docs.micrometer.io/micrometer/reference/observation.html[Micrometer Observation] under the hood. | ||
|
||
Below you can find an example of metrics for command execution. | ||
|
||
[source,java,subs=+attributes] | ||
----- | ||
// Setting up instrumentation | ||
include::{include-core-test-java}/io/micrometer/core/instrument/binder/mongodb/MongoMetricsCommandListenerTest.java[tags=setup, indent=0] | ||
// Usage example | ||
include::{include-core-test-java}/io/micrometer/core/instrument/binder/mongodb/MongoMetricsCommandListenerTest.java[tags=example, indent=0] | ||
----- | ||
|
||
Below you can find an example of metrics of the connection pool. | ||
|
||
[source,java,subs=+attributes] | ||
----- | ||
// Setting up instrumentation | ||
include::{include-core-test-java}/io/micrometer/core/instrument/binder/mongodb/MongoMetricsConnectionPoolListenerTest.java[tags=setup, indent=0] | ||
// Usage example | ||
include::{include-core-test-java}/io/micrometer/core/instrument/binder/mongodb/MongoMetricsConnectionPoolListenerTest.java[tags=example, indent=0] | ||
----- |
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