コード例 #1
0
        private static Sensor ThroughputSensor(string threadId,
                                               TaskId taskId,
                                               string processorNodeId,
                                               string metricNamePrefix,
                                               string metricDescription,
                                               string descriptionOfRate,
                                               string descriptionOfCount,
                                               MetricsRecordingLevel recordingLevel,
                                               StreamMetricsRegistry metricsRegistry)
        {
            Sensor sensor =
                metricsRegistry.NodeLevelSensor(threadId, taskId, processorNodeId, metricNamePrefix, metricDescription,
                                                recordingLevel);
            var tags = metricsRegistry.NodeLevelTags(threadId, taskId.ToString(), processorNodeId);

            SensorHelper.AddInvocationRateAndCountToSensor(
                sensor,
                StreamMetricsRegistry.PROCESSOR_NODE_LEVEL_GROUP,
                tags,
                metricNamePrefix,
                descriptionOfRate,
                descriptionOfCount
                );
            return(sensor);
        }
コード例 #2
0
        public static Sensor ProcessSensor(string threadId, TaskId taskId, StreamMetricsRegistry metricsRegistry)
        {
            Sensor sensor = metricsRegistry.TaskLevelSensor(threadId, taskId, PROCESS, PROCESS_DESCRIPTION, MetricsRecordingLevel.DEBUG);

            SensorHelper.AddInvocationRateAndCountToSensor(
                sensor,
                StreamMetricsRegistry.TASK_LEVEL_GROUP,
                metricsRegistry.TaskLevelTags(threadId, taskId.ToString()),
                PROCESS,
                PROCESS_RATE_DESCRIPTION,
                PROCESS_TOTAL_DESCRIPTION
                );
            return(sensor);
        }
コード例 #3
0
        private static Sensor InvocationRateAndCountSensor(string threadId,
                                                           TaskId taskId,
                                                           string metricName,
                                                           string metricDescription,
                                                           string descriptionOfRate,
                                                           string descriptionOfCount,
                                                           MetricsRecordingLevel recordingLevel,
                                                           StreamMetricsRegistry streamsMetrics)
        {
            Sensor sensor =
                streamsMetrics.TaskLevelSensor(threadId, taskId, metricName, metricDescription, recordingLevel);

            SensorHelper.AddInvocationRateAndCountToSensor(
                sensor,
                StreamMetricsRegistry.TASK_LEVEL_GROUP,
                streamsMetrics.TaskLevelTags(threadId, taskId.ToString()),
                metricName,
                descriptionOfRate,
                descriptionOfCount
                );

            return(sensor);
        }
コード例 #4
0
        public static Sensor ExpiredWindowRecordDropSensor(TaskId taskId,
                                                           string storeType,
                                                           string storeName,
                                                           StreamMetricsRegistry streamsMetrics)
        {
            Sensor sensor = streamsMetrics.StoreLevelSensor(
                GetThreadId(),
                taskId,
                storeName,
                EXPIRED_WINDOW_RECORD_DROP,
                EXPIRED_WINDOW_RECORD_DROP_DESCRIPTION,
                MetricsRecordingLevel.INFO
                );

            SensorHelper.AddInvocationRateAndCountToSensor(
                sensor,
                "stream-" + storeType + "-metrics",
                streamsMetrics.StoreLevelTags(GetThreadId(), taskId.ToString(), storeName, storeType),
                EXPIRED_WINDOW_RECORD_DROP,
                EXPIRED_WINDOW_RECORD_DROP_RATE_DESCRIPTION,
                EXPIRED_WINDOW_RECORD_DROP_TOTAL_DESCRIPTION
                );
            return(sensor);
        }