Class ComponentStatsManager

    • Field Detail

      • metricsLabels

        protected java.lang.String[] metricsLabels
      • scheduledFuture

        protected java.util.concurrent.ScheduledFuture<?> scheduledFuture
      • EMPTY_QUEUE

        protected final com.google.common.collect.EvictingQueue EMPTY_QUEUE
      • USER_METRIC_PREFIX

        public static final java.lang.String USER_METRIC_PREFIX
        See Also:
        Constant Field Values
      • metricsLabelNames

        public static final java.lang.String[] metricsLabelNames
      • exceptionMetricsLabelNames

        protected static final java.lang.String[] exceptionMetricsLabelNames
    • Constructor Detail

      • ComponentStatsManager

        public ComponentStatsManager​(FunctionCollectorRegistry collectorRegistry,
                                     java.lang.String[] metricsLabels,
                                     java.util.concurrent.ScheduledExecutorService scheduledExecutorService)
    • Method Detail

      • getStatsManager

        public static ComponentStatsManager getStatsManager​(FunctionCollectorRegistry collectorRegistry,
                                                            java.lang.String[] metricsLabels,
                                                            java.util.concurrent.ScheduledExecutorService scheduledExecutorService,
                                                            org.apache.pulsar.functions.proto.Function.FunctionDetails.ComponentType componentType)
      • reset

        public abstract void reset()
      • incrTotalReceived

        public abstract void incrTotalReceived()
      • incrTotalProcessedSuccessfully

        public abstract void incrTotalProcessedSuccessfully()
      • incrSysExceptions

        public abstract void incrSysExceptions​(java.lang.Throwable sysException)
      • incrUserExceptions

        public abstract void incrUserExceptions​(java.lang.Throwable userException)
      • incrSourceExceptions

        public abstract void incrSourceExceptions​(java.lang.Throwable userException)
      • incrSinkExceptions

        public abstract void incrSinkExceptions​(java.lang.Throwable userException)
      • setLastInvocation

        public abstract void setLastInvocation​(long ts)
      • processTimeStart

        public abstract void processTimeStart()
      • processTimeEnd

        public abstract void processTimeEnd()
      • getTotalProcessedSuccessfully

        public abstract double getTotalProcessedSuccessfully()
      • getTotalRecordsReceived

        public abstract double getTotalRecordsReceived()
      • getTotalSysExceptions

        public abstract double getTotalSysExceptions()
      • getTotalUserExceptions

        public abstract double getTotalUserExceptions()
      • getLastInvocation

        public abstract double getLastInvocation()
      • getAvgProcessLatency

        public abstract double getAvgProcessLatency()
      • getTotalProcessedSuccessfully1min

        public abstract double getTotalProcessedSuccessfully1min()
      • getTotalRecordsReceived1min

        public abstract double getTotalRecordsReceived1min()
      • getTotalSysExceptions1min

        public abstract double getTotalSysExceptions1min()
      • getTotalUserExceptions1min

        public abstract double getTotalUserExceptions1min()
      • getAvgProcessLatency1min

        public abstract double getAvgProcessLatency1min()
      • getLatestUserExceptions

        public abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestUserExceptions()
      • getLatestSystemExceptions

        public abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestSystemExceptions()
      • getLatestSourceExceptions

        public abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestSourceExceptions()
      • getLatestSinkExceptions

        public abstract com.google.common.collect.EvictingQueue<org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation> getLatestSinkExceptions()
      • getStatsAsString

        public java.lang.String getStatsAsString()
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • getExceptionInfo

        protected org.apache.pulsar.functions.proto.InstanceCommunication.FunctionStatus.ExceptionInformation getExceptionInfo​(java.lang.Throwable th,
                                                                                                                               long ts)
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable