class StreamsMetricsImpl implements StreamsMetrics {

    @Override
    public Sensor addLatencyAndThroughputSensor(final String scopeName,
                                                final String entityName,
                                                final String operationName,
                                                final Sensor.RecordingLevel recordingLevel,
                                                final String... tags) {
        final Map<String, String> tagMap = constructTags(scopeName, entityName, tags);
        final Map<String, String> allTagMap = constructTags(scopeName, "all", tags);

        // first add the global operation metrics if not yet, with the global tags only
        final Sensor parent = metrics.sensor(sensorName(operationName, null), recordingLevel);
        addLatencyAndThroughputMetrics(scopeName, parent, operationName, allTagMap);

        // add the operation metrics with additional tags
        final Sensor sensor = metrics.sensor(sensorName(operationName, entityName), recordingLevel, parent);
        addLatencyAndThroughputMetrics(scopeName, sensor, operationName, tagMap);

        parentSensors.put(sensor, parent);

        return sensor;
    }

    public  StreamsMetricsImpl(final Metrics metrics, final String groupName, final Map<String, String> tags);

}