| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Monitoring & Instrumentation for ReactiveMongo
This library expose ReactiveMongo metrics through JMX.
libraryDependencies += "org.reactivemongo" %% "reactivemongo-jmx" % VERSIONSee documentation
This library expose ReactiveMongo metrics using Kamon.
libraryDependencies += "org.reactivemongo" %% "reactivemongo-kamon" % VERSIONSpans/Events: (tagged by pool name)
Pool metrics: (tagged by pool name)
Node metrics: (tagged by pool & node)
This library expose ReactiveMongo metrics using StatD integration for Datadog.
Events: (tagged by pool name)
Pool metrics: (tagged by pool name)
Node metrics: (tagged by pool & node)
The application using the driver must configure the Datadog monitoring using a file application.conf (or reference.conf), that must be found in the classpath.
The following settings are mandatory.
If reactivemongo.datadog.hostname is missing, the monitoring is not started.
Minimal configuration sample:
reactivemongo {
datadog {
hostname = "localhost"
port = 8125
}
}
The following settings are optional (see documentation).
Datadog metric collection is always set in non-blocking mode.
See complete example
Troubleshooting:
This can be debuged using Netcat, using an alternative port (e.g. 8126), to ensure the monitoring is properly started: nc -u -l 8126 | grep reactivemongo; Must display StatsD entries as bellow.
_e{40,461}:reactivemongo.reactivemongo.pool-created|MongoConnectionOptions { appName: Supervisor-1/Connection-1, authenticationMechanism: SCRAM-SHA-1, nbChannelsPerNode: 10, maxInFlightRequestsPerChannel: 200, minIdleChannelsPerNode: 1, heartbeatFrequencyMS: 10000ms, connectTimeoutMS: 0ms, maxIdleTimeMS: 0ms, tcpNoDelay: false, keepAlive: false, sslEnabled: false, sslAllowsInvalidCert: false, writeConcern: WriteConcern(WaitForAcknowledgments(1),false,false,None), readPreference: Primary, readConcern: local }|d:1605894402|h:myapp|k:Supervisor-1|t:info|s:reactivemongo|#Supervisor-1.Connection-1,Supervisor-1_e{26,113}:reactivemongo.pool-updated|{{NodeSet None Node[localhost:32770: Unknown (0/1 available connections), latency=9223372036854775807, auth=0] }}|d:1605894403|h:myapp|k:Supervisor-1|t:info|s:reactivemongo|#Supervisor-1.Connection-1,Supervisor-1reactivemongo.awaitingRequests:0|g|#Supervisor-1.Connection-1,Supervisor-1
reactivemongo.maxAwaitingRequestsPerChannel:0|g|#Supervisor-1.Connection-1,Supervisor-1
reactivemongo.numberOfNodes:1|g|#Supervisor-1.Connection-1,Supervisor-1
reactivemongo.hasPrimary:0|g|#Supervisor-1.Connection-1,Supervisor-1
reactivemongo.hasNearest:0|g|#Supervisor-1.Connection-1,Supervisor-1
reactivemongo.isMongos:0|g|#Supervisor-1.Connection-1,Supervisor-1
reactivemongo.numberOfSecondaries:0|g|#Supervisor-1.Connection-1,Supervisor-1
reactivemongo.nodeChannels:1|g|#localhost:32770,Supervisor-1.Connection-1,Supervisor-1
reactivemongo.connectedChannels:0|g|#localhost:32770,Supervisor-1.Connection-1,Supervisor-1
reactivemongo.authenticatedChannels:0|g|#localhost:32770,Supervisor-1.Connection-1,Supervisor-1
reactivemongo.pingTime:9223372036854775|g|#localhost:32770,Supervisor-1.Connection-1,Supervisor-1_e{26,113}:reactivemongo.pool-updated|{{NodeSet None Node[localhost:32770: Unknown (1/1 available connections), latency=9223372036854775807, auth=1] }}|d:1605894403|h:myapp|k:Supervisor-1|t:info|s:reactivemongo|#Supervisor-1.Connection-1,Supervisor-1
reactivemongo.awaitingRequests:0|g|#Supervisor-1.Connection-1,Supervisor-1
...
The mandatory setting reactivemongo.datadog.hostname must correspond to the accessible network address or hostname of the Datadog agent (e.g. localhost if the application and the agent are on the same machine).
Also the setting reactivemongo.datadog.port must match the way the Datadog agent is configured for StatD (e.g 8125 in the following example).
First, edit datadog.yml and add the following settings:
use_dogstatsd: true
dogstatsd_port: 8125 # UDPAfter the agent is restarted, this can be tested from shell.
while true; do ((echo -n "custom.metric.name:$RANDOM|c" | nc -4u -w1 ${DATADOGD_UDP_HOST} ${DATADOGD_UDP_PORT}) && sleep 1s); doneReactiveMongo BSON libraries can be built from this source repository.
sbt publishLocal
To run the tests, use:
sbt test
| Back | FazBrowse Home | New Git URL |