public boolean shouldRecord() {
        return this.recordingLevel.shouldRecord(config.recordLevel().id);
    }
@Test
    public void testShouldRecordForTraceLevelSensor() {
        Sensor traceSensor = new Sensor(null, "traceSensor", null, INFO_CONFIG, Time.SYSTEM,
             0, Sensor.RecordingLevel.TRACE);
        assertFalse(traceSensor.shouldRecord());

        traceSensor = new Sensor(null, "traceSensor", null, DEBUG_CONFIG, Time.SYSTEM,
             0, Sensor.RecordingLevel.TRACE);
        assertFalse(traceSensor.shouldRecord());

        traceSensor = new Sensor(null, "traceSensor", null, TRACE_CONFIG, Time.SYSTEM,
             0, Sensor.RecordingLevel.TRACE);
        assertTrue(traceSensor.shouldRecord());
    }