public abstract class ComponentStatsManager extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
protected FunctionCollectorRegistry |
collectorRegistry |
protected com.google.common.collect.EvictingQueue |
EMPTY_QUEUE |
protected static String[] |
exceptionMetricsLabelNames |
static String[] |
metricsLabelNames |
protected String[] |
metricsLabels |
protected ScheduledFuture<?> |
scheduledFuture |
static String |
USER_METRIC_PREFIX |
| Constructor and Description |
|---|
ComponentStatsManager(FunctionCollectorRegistry collectorRegistry,
String[] metricsLabels,
ScheduledExecutorService scheduledExecutorService) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
abstract double |
getAvgProcessLatency() |
abstract double |
getAvgProcessLatency1min() |
protected org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation |
getExceptionInfo(Throwable th,
long ts) |
abstract double |
getLastInvocation() |
abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> |
getLatestSinkExceptions() |
abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> |
getLatestSourceExceptions() |
abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> |
getLatestSystemExceptions() |
abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> |
getLatestUserExceptions() |
String |
getStatsAsString() |
static ComponentStatsManager |
getStatsManager(FunctionCollectorRegistry collectorRegistry,
String[] metricsLabels,
ScheduledExecutorService scheduledExecutorService,
org.apache.pulsar.functions.proto.Function.FunctionDetails.ComponentType componentType) |
abstract double |
getTotalProcessedSuccessfully() |
abstract double |
getTotalProcessedSuccessfully1min() |
abstract double |
getTotalRecordsReceived() |
abstract double |
getTotalRecordsReceived1min() |
abstract double |
getTotalSysExceptions() |
abstract double |
getTotalSysExceptions1min() |
abstract double |
getTotalUserExceptions() |
abstract double |
getTotalUserExceptions1min() |
abstract void |
incrSinkExceptions(Throwable userException) |
abstract void |
incrSourceExceptions(Throwable userException) |
abstract void |
incrSysExceptions(Throwable sysException) |
abstract void |
incrTotalProcessedSuccessfully() |
abstract void |
incrTotalReceived() |
abstract void |
incrUserExceptions(Throwable userException) |
abstract void |
processTimeEnd() |
abstract void |
processTimeStart() |
abstract void |
reset() |
abstract void |
setLastInvocation(long ts) |
protected String[] metricsLabels
protected ScheduledFuture<?> scheduledFuture
protected final FunctionCollectorRegistry collectorRegistry
protected final com.google.common.collect.EvictingQueue EMPTY_QUEUE
public static final String USER_METRIC_PREFIX
public static final String[] metricsLabelNames
protected static final String[] exceptionMetricsLabelNames
public ComponentStatsManager(FunctionCollectorRegistry collectorRegistry, String[] metricsLabels, ScheduledExecutorService scheduledExecutorService)
public static ComponentStatsManager getStatsManager(FunctionCollectorRegistry collectorRegistry, String[] metricsLabels, ScheduledExecutorService scheduledExecutorService, org.apache.pulsar.functions.proto.Function.FunctionDetails.ComponentType componentType)
public abstract void reset()
public abstract void incrTotalReceived()
public abstract void incrTotalProcessedSuccessfully()
public abstract void incrSysExceptions(Throwable sysException)
public abstract void incrUserExceptions(Throwable userException)
public abstract void incrSourceExceptions(Throwable userException)
public abstract void incrSinkExceptions(Throwable userException)
public abstract void setLastInvocation(long ts)
public abstract void processTimeStart()
public abstract void processTimeEnd()
public abstract double getTotalProcessedSuccessfully()
public abstract double getTotalRecordsReceived()
public abstract double getTotalSysExceptions()
public abstract double getTotalUserExceptions()
public abstract double getLastInvocation()
public abstract double getAvgProcessLatency()
public abstract double getTotalProcessedSuccessfully1min()
public abstract double getTotalRecordsReceived1min()
public abstract double getTotalSysExceptions1min()
public abstract double getTotalUserExceptions1min()
public abstract double getAvgProcessLatency1min()
public abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestUserExceptions()
public abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestSystemExceptions()
public abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestSourceExceptions()
public abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestSinkExceptions()
public String getStatsAsString() throws IOException
IOExceptionprotected org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation getExceptionInfo(Throwable th, long ts)
public void close()
close in interface AutoCloseableCopyright © 2017–2021 Apache Software Foundation. All rights reserved.