- 16.1. Metrics- 1. AppOptics
- 2. Atlas
- 3. Azure
- 4. Amazon CloudWatch
- 5. Datadog
- 6. Dropwizard
- 7. Dynatrace
- 8. Elastic
- 9. Ganglia
- 10. Graphite
- 11. Humio
- 12. Influx
- 13. JMX
- 14. Kairos
- 15. NewRelic
- 16. Prometheus
- 17. SingnalFx
- 18. Stackdriver
- 19. Statsd
- 20. Wavefront
- Config
- Configuration metrics
- Metrics per Redis node.
- Metrics per RRemoteService object
- Metrics per RExecutorService object
- Metrics per RMap object
- Metrics per RMapCache object
- Metrics per RClusteredMapCache object
- Metrics per RLocalCachedMap object
- Metrics per RClusteredLocalCachedMap object
- Metrics per RLocalCachedMapCache object
- Metrics per RClusteredLocalCachedMapCache object
- Metrics per RTopic object
- Metrics per RBucket object
- Metrics per JCache object
 
- 16.2. Tracing
16.1. Metrics
This feature is available only in Redisson PRO
Redisson provides integration the most popular monitoring systems through Micrometer framework.
1. AppOptics
| Class | org.redisson.config.metrics.AppOpticsMeterRegistryProvider | 
| Params | uri- AppOptics host urihostTag- tag mapped to hostapiToken- AppOptics api tokennumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-appoptics | 
2. Atlas
| Class | org.redisson.config.metrics.AtlasMeterRegistryProvider | 
| Params | uri- Atlas host uriconfigUri- Atlas LWC endpoint uri to retrieve current subscriptionsevalUri- Atlas LWC endpoint uri to evaluate the data for a subscriptionnumThreads- number of threads used by scheduler (default is 4)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 10000) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-atlas | 
3. Azure
| Class | org.redisson.config.metrics.AzureMonitorMeterRegistryProvider | 
| Params | instrumentationKey- instrumentation keynumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-azure-monitor | 
4. Amazon CloudWatch
| Class | org.redisson.config.metrics.CloudWatchMeterRegistryProvider | 
| Params | accessKey- AWS access keysecretKey- AWS secret access keynamespace- namespace valuenumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-cloudwatch | 
5. Datadog
| Class | org.redisson.config.metrics.DatadogMeterRegistryProvider | 
| Params | uri- Datadog host urihostTag- tag mapped to hostapiKey- api keynumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-datadog | 
6. Dropwizard
| Class | org.redisson.config.metrics.DropwizardMeterRegistryProvider | 
| Params | sharedRegistryName- name used to store instance inSharedMetricRegistriesnameMapper- custom implementation ofio.micrometer.core.instrument.util.HierarchicalNameMapper | 
7. Dynatrace
| Class | org.redisson.config.metrics.DynatraceMeterRegistryProvider | 
| Params | uri- Dynatrace host uriapiToken- api tokendeviceId- device idnumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-dynatrace | 
8. Elastic
| Class | org.redisson.config.metrics.ElasticMeterRegistryProvider | 
| Params | host- Elasticsearch host uriuserName- user namepassword- passwordnumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-elastic | 
9. Ganglia
| Class | org.redisson.config.metrics.GangliaMeterRegistryProvider | 
| Params | host- Ganglia host addressport- Ganglia portnumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-ganglia | 
10. Graphite
| Class | org.redisson.config.metrics.GraphiteMeterRegistryProvider | 
| Params | host- Graphite host addressport- Graphite port | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-graphite | 
11. Humio
| Class | org.redisson.config.metrics.HumioMeterRegistryProvider | 
| Params | uri- Humio host urirepository- repository nameapiToken- api tokennumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-humio | 
12. Influx
| Class | org.redisson.config.metrics.InfluxMeterRegistryProvider | 
| Params | uri- Influx host uridb- db nameuserName- user namepassword- passwordnumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-influx | 
13. JMX
| Class | org.redisson.config.metrics.JmxMeterRegistryProvider | 
| Params | domain- domain namesharedRegistryName- name used to store instance inSharedMetricRegistries | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-jmx | 
14. Kairos
| Class | org.redisson.config.metrics.KairosMeterRegistryProvider | 
| Params | uri- Kairos host uriuserName- user namepassword- passwordnumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-kairos | 
15. NewRelic
| Class | org.redisson.config.metrics.NewRelicMeterRegistryProvider | 
| Params | uri- NewRelic host uriapiKey- api keyaccountId- account idnumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-new-relic | 
16. Prometheus
| Class | org.redisson.config.metrics.MeterRegistryWrapper | 
| Params | registry- instance ofPrometheusMeterRegistryobject | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-prometheus | 
17. SingnalFx
| Class | org.redisson.config.metrics.SingnalFxMeterRegistryProvider | 
| Params | apiHost- SingnalFx host uriaccessToken- access tokensource- application instance idnumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 10 secs)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-signalfx | 
18. Stackdriver
| Class | org.redisson.config.metrics.StackdriverMeterRegistryProvider | 
| Params | projectId- project idnumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-stackdriver | 
19. Statsd
| Class | org.redisson.config.metrics.StatsdMeterRegistryProvider | 
| Params | host- Statsd host addressport- Statsd portflavor- metrics format ETSY/DATADOG/TELEGRAF/SYSDIG | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-statsd | 
20. Wavefront
| Class | org.redisson.config.metrics.WavefrontMeterRegistryProvider | 
| Params | uri- Wavefront host urisource- application instance idapiToken- api tokennumThreads- number of threads used by scheduler (default is 2)step- update interval in ISO-8601 format (default is 1 min)batchSize- number of measurements sent per request (default is 500) | 
| Dependency | groupId: io.micrometerartifactId: micrometer-registry-wavefront | 
Config
Config config = ... // Redisson PRO config object
// JMX
JmxMeterRegistryProvider provider = new JmxMeterRegistryProvider();
provider.setDomain("appStats");
config.setMeterRegistryProvider(provider);
// Prometheus
PrometheusMeterRegistry registry = ...
config.setMeterRegistryProvider(new MeterRegistryWrapper(registry));
// Dynatrace
DynatraceMeterRegistryProvider p = new DynatraceMeterRegistryProvider();
p.setApiToken("Hg3M0iadsQC2Pcjk6QIW0g");
p.setUri("https://qtd9012301.live.dynatrace.com/");
p.setDeviceId("myHost");
config.setMeterRegistryProvider(p);
// Influx
InfluxMeterRegistryProvider provider = new InfluxMeterRegistryProvider();
provider.setUri("http://localhost:8086/");
provider.setDb("myinfluxdb");
provider.setUserName("admin");
provider.setPassword("admin");
config.setMeterRegistryProvider(provider);
YAML config is appended to Redisson config:
JMX:
meterRegistryProvider: !<org.redisson.config.metrics.JmxMeterRegistryProvider>
domain: "appStats"
Dynatrace:
meterRegistryProvider: !<org.redisson.config.metrics.DynatraceMeterRegistryProvider>
apiToken: "Hg3M0iadsQC2Pcjk6QIW0g"
uri: "https://qtd9012301.live.dynatrace.com"
deviceId: "myHost"
Influx:
meterRegistryProvider: !<org.redisson.config.metrics.InfluxMeterRegistryProvider>
uri: "http://localhost:8086/"
db: "myinfluxdb"
userName: "admin"
password: "admin"
The following metrics are available:
Configuration metrics
- redisson.license.expiration-year- A Gauge of the number of the license expiration year
- redisson.license.expiration-month- A Gauge of the number of the license expiration month
- redisson.license.expiration-day- A Gauge of the number of the license expiration day
- redisson.license.active-instances- A Gauge of the number of active Redisson PRO clients
- redisson.executor-pool-size- A Gauge of the number of executor threads pool size
- redisson.netty-pool-size- A Gauge of the number of netty threads pool size
- netty.eventexecutor.tasks.pending- Number of pending tasks in Netty event executor
Metrics per Redis node.
Base name: redisson.redis.<host>:<port>
- status- A Gauge of the number value of Redis node status [1 = connected, -1 = disconnected]
- type- A Gauge of the number value of Redis node type [1 = MASTER, 2 = SLAVE, 3 = SENTINEL]
- total-response-bytes- A Meter of the total amount of bytes received from Redis
- response-bytes- A Histogram of the number of bytes received from Redis
- total-request-bytes- A Meter of the total amount of bytes sent to Redis
- request-bytes- A Histogram of the number of bytes sent to Redis
- connections.active- A Counter of the number of busy connections
- connections.free- A Counter of the number of free connections
- connections.max-pool-size- A Counter of the number of maximum connection pool size
- connections.reconnected- A Counter of the number of reconnected connections
- connections.total- A Counter of the number of total connections in pool
- operations.total- A Meter of the number of total executed operations
- operations.total-failed- A Meter of the number of total failed operations
- operations.total-successful- A Meter of the number of total successful operations
- operations.latency- A Histogram of the number of operations latency in milliseconds
- operations.retry-attempt- A Histogram of the number of operations attempt
- publish-subscribe-connections.active- A Counter of the number of active publish subscribe connections
- publish-subscribe-connections.free- A Counter of the number of free publish subscribe connections
- publish-subscribe-connections.max-pool-size- A Counter of the number of maximum publish subscribe connection pool size
- publish-subscribe-connections.total- A Counter of the number of total publish subscribe connections in pool
Metrics per RRemoteService object
Base name: redisson.remote-service.<name>
- invocations.total- A Meter of the number of total executed invocations
- invocations.total-failed- A Meter of the number of total failed to execute invocations
- invocations.total-successful- A Meter of the number of total successful to execute invocations
Metrics per RExecutorService object
Base name: redisson.executor-service.<name>
- tasks.submitted- A Meter of the number of submitted tasks
- tasks.executed- A Meter of the number of executed tasks
- workers.active- A Gauge of the number of busy task workers
- workers.free- A Gauge of the number of free task workers
- workers.total- A Gauge of the number of total task workers
- workers.tasks-executed.total- A Meter of the number of total executed tasks by workers
- workers.tasks-executed.total-failed- A Meter of the number of total failed to execute tasks by workers
- workers.tasks-executed.total-successful- A Meter of the number of total successful to execute tasks by workers
Metrics per RMap object
Base name: redisson.map.<name>
- hits- A Meter of the number of get requests for data contained in cache
- misses- A Meter of the number of get requests for data not contained in cache
- puts- A Meter of the number of puts to the cache
- removals- A Meter of the number of removals from the cache
Metrics per RMapCache object
Base name: redisson.map-cache.<name>
- hits- A Meter of the number of get requests for data contained in cache
- misses- A Meter of the number of get requests for data not contained in cache
- puts- A Meter of the number of puts to the cache
- removals- A Meter of the number of removals from the cache
Metrics per RClusteredMapCache object
Base name: redisson.clustered-map-cache.<name>
- hits- A Meter of the number of get requests for data contained in cache
- misses- A Meter of the number of get requests for data not contained in cache
- puts- A Meter of the number of puts to the cache
- removals- A Meter of the number of removals from the cache
Metrics per RLocalCachedMap object
Base name: redisson.local-cached-map.<name>
- hits- A Meter of the number of get requests for data contained in cache
- misses- A Meter of the number of get requests for data not contained in cache
- puts- A Meter of the number of puts to the cache
- removals- A Meter of the number of removals from the cache
- local-cache.hits- A Meter of the number of get requests for data contained in local cache
- local-cache.misses- A Meter of the number of get requests for data contained in local cache
- local-cache.evictions- A Meter of the number of evictions for data contained in local cache
- local-cache.size- A Gauge of the number of local cache size
Metrics per RClusteredLocalCachedMap object
Base name: redisson.clustered-local-cached-map.<name>
- hits- A Meter of the number of get requests for data contained in cache
- misses- A Meter of the number of get requests for data not contained in cache
- puts- A Meter of the number of puts to the cache
- removals- A Meter of the number of removals from the cache
- local-cache.hits- A Meter of the number of get requests for data contained in local cache
- local-cache.misses- A Meter of the number of get requests for data contained in local cache
- local-cache.evictions- A Meter of the number of evictions for data contained in local cache
- local-cache.size- A Gauge of the number of local cache size
Metrics per RLocalCachedMapCache object
Base name: redisson.local-cached-map-cache.<name>
- hits- A Meter of the number of get requests for data contained in cache
- misses- A Meter of the number of get requests for data not contained in cache
- puts- A Meter of the number of puts to the cache
- removals- A Meter of the number of removals from the cache
- local-cache.hits- A Meter of the number of get requests for data contained in local cache
- local-cache.misses- A Meter of the number of get requests for data contained in local cache
- local-cache.evictions- A Meter of the number of evictions for data contained in local cache
- local-cache.size- A Gauge of the number of local cache size
Metrics per RClusteredLocalCachedMapCache object
Base name: redisson.clustered-local-cached-map-cache.<name>
- hits- A Meter of the number of get requests for data contained in cache
- misses- A Meter of the number of get requests for data not contained in cache
- puts- A Meter of the number of puts to the cache
- removals- A Meter of the number of removals from the cache
- local-cache.hits- A Meter of the number of get requests for data contained in local cache
- local-cache.misses- A Meter of the number of get requests for data contained in local cache
- local-cache.evictions- A Meter of the number of evictions for data contained in local cache
- local-cache.size- A Gauge of the number of local cache size
Metrics per RTopic object
Base name: redisson.topic.<name>
- messages-sent- A Meter of the number of messages sent for topic
- messages-received- A Meter of the number of messages received for topic
Metrics per RBucket object
Base name: redisson.bucket.<name>
- gets- A Meter of the number of get operations executed for bucket object
- sets- A Meter of the number of set operations executed for bucket object
Metrics per JCache object
Base name: redisson.JCache.<name>
- cache.evictions- A Meter of the number of evictions for data contained in JCache
- cache.puts- A Meter of the number of puts to the JCache
- hit.cache.gets- A Meter of the number of get requests for data contained in JCache
- miss.cache.gets- A Meter of the number of get requests for data contained in JCache
16.2. Tracing
This feature is available only in Redisson PRO
Redisson provides integration with the most popular tracer libraries through Micrometer Observation API and Micrometer Tracing framework. This feature allows to gather extra statistics about invoked Redisson methods: name, arguments, invocation path, duration and frequency.
Configuration metrics per Tracing event.
- invocation- Redisson method with arguments. Arguments are included only if- includeArgsset- true
- object_name- Redisson object name
- address- Redis server address
- username- username used to connect to Redis server
1. OpenZipkin Brave
Configuration example:
OkHttpSender sender = OkHttpSender.create("http://localhost:9411/api/v2/spans");
AsyncZipkinSpanHandler zipkinSpanHandler = AsyncZipkinSpanHandler.create(sender);
StrictCurrentTraceContext braveCurrentTraceContext = StrictCurrentTraceContext.create();
Tracing tracing = Tracing.newBuilder()
.localServiceName("myservice")
.currentTraceContext(braveCurrentTraceContext)
.sampler(Sampler.ALWAYS_SAMPLE)
.addSpanHandler(zipkinSpanHandler)
.build();
config.setTracingProvider(new BraveTracingProvider(tracing));
Required dependencies:
groupId: io.zipkin.reporter2, artifactId: zipkin-sender-okhttp3
groupId: io.zipkin.reporter2, artifactId: zipkin-reporter-brave
2. OpenTelemetry
Configuration example:
SpanExporter spanExporter = new ZipkinSpanExporterBuilder()
.setSender(URLConnectionSender.create("http://localhost:9411/api/v2/spans"))
.build();
SdkTracerProvider sdkTracerProvider = SdkTracerProvider.builder()
.addSpanProcessor(BatchSpanProcessor.builder(spanExporter).build())
.build();
OpenTelemetrySdk openTelemetrySdk = OpenTelemetrySdk.builder()
.setPropagators(ContextPropagators.create(B3Propagator.injectingSingleHeader()))
.setTracerProvider(sdkTracerProvider)
.build();
io.opentelemetry.api.trace.Tracer otelTracer = openTelemetrySdk.getTracerProvider().get("io.micrometer.micrometer-tracing");
config.setTracingProvider(new OtelTracingProvider(otelTracer, openTelemetrySdk.getPropagators()));
Required dependencies:
groupId: io.opentelemetry, artifactId: opentelemetry-exporter-zipkin
groupId: io.zipkin.reporter2, artifactId: zipkin-sender-urlconnection
 我的书签
 我的书签
                                 添加书签
 添加书签 移除书签
 移除书签