Class FunctionStatsManager
java.lang.Object
org.apache.pulsar.functions.instance.stats.ComponentStatsManager
org.apache.pulsar.functions.instance.stats.FunctionStatsManager
- All Implemented Interfaces:
AutoCloseable
Function stats.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final StringDeclare metric names.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.apache.pulsar.functions.instance.stats.ComponentStatsManager
collectorRegistry, emptyQueue, EXCEPTION_METRICS_LABEL_NAMES, METRICS_LABEL_NAMES, metricsLabels, scheduledFuture, USER_METRIC_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionFunctionStatsManager(FunctionCollectorRegistry collectorRegistry, String[] metricsLabels, ScheduledExecutorService scheduledExecutorService) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddoubledoubledoublecom.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation>com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation>doubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoubledoublevoidvoidvoidincrSysExceptions(Throwable sysException) voidvoidvoidincrUserExceptions(Throwable userException) voidprocessTimeEnd(long startTime) voidreset()voidsetLastInvocation(long ts) Methods inherited from class org.apache.pulsar.functions.instance.stats.ComponentStatsManager
close, getExceptionInfo, getLatestSystemExceptions, getLatestUserExceptions, getStatsAsString, getStatsManager
-
Field Details
-
PULSAR_FUNCTION_METRICS_PREFIX
- See Also:
-
PROCESSED_SUCCESSFULLY_TOTAL
Declare metric names.- See Also:
-
SYSTEM_EXCEPTIONS_TOTAL
- See Also:
-
USER_EXCEPTIONS_TOTAL
- See Also:
-
SOURCE_EXCEPTIONS_TOTAL
- See Also:
-
SINK_EXCEPTIONS_TOTAL
- See Also:
-
PROCESS_LATENCY_MS
- See Also:
-
LAST_INVOCATION
- See Also:
-
RECEIVED_TOTAL
- See Also:
-
PROCESSED_SUCCESSFULLY_TOTAL_1min
- See Also:
-
SYSTEM_EXCEPTIONS_TOTAL_1min
- See Also:
-
USER_EXCEPTIONS_TOTAL_1min
- See Also:
-
SOURCE_EXCEPTIONS_TOTAL_1min
- See Also:
-
SINK_EXCEPTIONS_TOTAL_1min
- See Also:
-
PROCESS_LATENCY_MS_1min
- See Also:
-
RECEIVED_TOTAL_1min
- See Also:
-
-
Constructor Details
-
FunctionStatsManager
public FunctionStatsManager(FunctionCollectorRegistry collectorRegistry, String[] metricsLabels, ScheduledExecutorService scheduledExecutorService)
-
-
Method Details
-
addUserException
-
addSystemException
-
incrTotalReceived
public void incrTotalReceived()- Specified by:
incrTotalReceivedin classComponentStatsManager
-
incrTotalProcessedSuccessfully
public void incrTotalProcessedSuccessfully()- Specified by:
incrTotalProcessedSuccessfullyin classComponentStatsManager
-
incrSysExceptions
- Specified by:
incrSysExceptionsin classComponentStatsManager
-
incrUserExceptions
- Specified by:
incrUserExceptionsin classComponentStatsManager
-
incrSourceExceptions
- Specified by:
incrSourceExceptionsin classComponentStatsManager
-
incrSinkExceptions
- Specified by:
incrSinkExceptionsin classComponentStatsManager
-
setLastInvocation
public void setLastInvocation(long ts) - Specified by:
setLastInvocationin classComponentStatsManager
-
processTimeEnd
public void processTimeEnd(long startTime) - Specified by:
processTimeEndin classComponentStatsManager
-
getTotalProcessedSuccessfully
public double getTotalProcessedSuccessfully()- Specified by:
getTotalProcessedSuccessfullyin classComponentStatsManager
-
getTotalRecordsReceived
public double getTotalRecordsReceived()- Specified by:
getTotalRecordsReceivedin classComponentStatsManager
-
getTotalSysExceptions
public double getTotalSysExceptions()- Specified by:
getTotalSysExceptionsin classComponentStatsManager
-
getTotalUserExceptions
public double getTotalUserExceptions()- Specified by:
getTotalUserExceptionsin classComponentStatsManager
-
getLastInvocation
public double getLastInvocation()- Specified by:
getLastInvocationin classComponentStatsManager
-
getAvgProcessLatency
public double getAvgProcessLatency()- Specified by:
getAvgProcessLatencyin classComponentStatsManager
-
getProcessLatency50P
public double getProcessLatency50P() -
getProcessLatency90P
public double getProcessLatency90P() -
getProcessLatency99P
public double getProcessLatency99P() -
getProcessLatency99_9P
public double getProcessLatency99_9P() -
getTotalProcessedSuccessfully1min
public double getTotalProcessedSuccessfully1min()- Specified by:
getTotalProcessedSuccessfully1minin classComponentStatsManager
-
getTotalRecordsReceived1min
public double getTotalRecordsReceived1min()- Specified by:
getTotalRecordsReceived1minin classComponentStatsManager
-
getTotalSysExceptions1min
public double getTotalSysExceptions1min()- Specified by:
getTotalSysExceptions1minin classComponentStatsManager
-
getTotalUserExceptions1min
public double getTotalUserExceptions1min()- Specified by:
getTotalUserExceptions1minin classComponentStatsManager
-
getAvgProcessLatency1min
public double getAvgProcessLatency1min()- Specified by:
getAvgProcessLatency1minin classComponentStatsManager
-
getLatestSourceExceptions
public com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestSourceExceptions()- Specified by:
getLatestSourceExceptionsin classComponentStatsManager
-
getLatestSinkExceptions
public com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestSinkExceptions()- Specified by:
getLatestSinkExceptionsin classComponentStatsManager
-
getProcessLatency50P1min
public double getProcessLatency50P1min() -
getProcessLatency90P1min
public double getProcessLatency90P1min() -
getProcessLatency99P1min
public double getProcessLatency99P1min() -
getProcessLatency99_9P1min
public double getProcessLatency99_9P1min() -
reset
public void reset()- Specified by:
resetin classComponentStatsManager
-