Package io.micrometer.elastic
Class ElasticMeterRegistry
- java.lang.Object
-
- io.micrometer.core.instrument.MeterRegistry
-
- io.micrometer.core.instrument.push.PushMeterRegistry
-
- io.micrometer.core.instrument.step.StepMeterRegistry
-
- io.micrometer.elastic.ElasticMeterRegistry
-
public class ElasticMeterRegistry extends io.micrometer.core.instrument.step.StepMeterRegistry
MeterRegistry
for Elasticsearch.- Since:
- 1.1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ElasticMeterRegistry.Builder
-
Constructor Summary
Constructors Modifier Constructor Description ElasticMeterRegistry(ElasticConfig config, io.micrometer.core.instrument.Clock clock)
protected
ElasticMeterRegistry(ElasticConfig config, io.micrometer.core.instrument.Clock clock, java.util.concurrent.ThreadFactory threadFactory, io.micrometer.core.ipc.http.HttpSender httpClient)
Create a new instance with given parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ElasticMeterRegistry.Builder
builder(ElasticConfig config)
protected java.lang.String
generateTimestamp()
Return formatted current timestamp.protected java.util.concurrent.TimeUnit
getBaseTimeUnit()
protected java.lang.String
indexName()
Return index name.protected void
publish()
void
start(java.util.concurrent.ThreadFactory threadFactory)
-
Methods inherited from class io.micrometer.core.instrument.step.StepMeterRegistry
defaultHistogramConfig, newCounter, newDistributionSummary, newFunctionCounter, newFunctionTimer, newGauge, newLongTaskTimer, newMeter, newTimer
-
Methods inherited from class io.micrometer.core.instrument.push.PushMeterRegistry
close, start, stop
-
Methods inherited from class io.micrometer.core.instrument.MeterRegistry
clear, config, counter, counter, find, forEachMeter, gauge, gauge, gauge, gauge, gaugeCollectionSize, gaugeMapSize, get, getConventionName, getConventionTags, getMeters, isClosed, more, newTimeGauge, remove, remove, summary, summary, timer, timer
-
-
-
-
Constructor Detail
-
ElasticMeterRegistry
public ElasticMeterRegistry(ElasticConfig config, io.micrometer.core.instrument.Clock clock)
-
ElasticMeterRegistry
protected ElasticMeterRegistry(ElasticConfig config, io.micrometer.core.instrument.Clock clock, java.util.concurrent.ThreadFactory threadFactory, io.micrometer.core.ipc.http.HttpSender httpClient)
Create a new instance with given parameters.- Parameters:
config
- configuration to useclock
- clock to usethreadFactory
- thread factory to usehttpClient
- http client to use- Since:
- 1.2.1
-
-
Method Detail
-
builder
public static ElasticMeterRegistry.Builder builder(ElasticConfig config)
-
start
public void start(java.util.concurrent.ThreadFactory threadFactory)
- Overrides:
start
in classio.micrometer.core.instrument.push.PushMeterRegistry
-
publish
protected void publish()
- Specified by:
publish
in classio.micrometer.core.instrument.push.PushMeterRegistry
-
indexName
protected java.lang.String indexName()
Return index name.- Returns:
- index name.
- Since:
- 1.2.0
-
generateTimestamp
protected java.lang.String generateTimestamp()
Return formatted current timestamp.- Returns:
- formatted current timestamp
- Since:
- 1.2.0
-
getBaseTimeUnit
@NonNull protected java.util.concurrent.TimeUnit getBaseTimeUnit()
- Specified by:
getBaseTimeUnit
in classio.micrometer.core.instrument.MeterRegistry
-
-