/** * {@inheritDoc} */ protected void applyAssignment(AgentConfig agentConfiguration, SensorInstrumentationPoint sensorInstrumentationPoint) { // first deal with sensor id MethodSensorTypeConfig methodSensorTypeConfig = getSensorTypeConfigFromConfiguration(agentConfiguration, environment, methodSensorAssignment); long sensorId = methodSensorTypeConfig.getId(); // set to rsc sensorInstrumentationPoint.addSensorId(sensorId, methodSensorTypeConfig.getPriority()); // add all settings sensorInstrumentationPoint.addSettings(methodSensorAssignment.getSettings()); }
/** * {@inheritDoc} */ protected void applyAssignment(AgentConfig agentConfiguration, SensorInstrumentationPoint sensorInstrumentationPoint) { // there can be only one exception sensor so I just take the id ExceptionSensorTypeConfig exceptionSensorTypeConfig = agentConfiguration.getExceptionSensorTypeConfig(); long sensorId = exceptionSensorTypeConfig.getId(); // set to rsc sensorInstrumentationPoint.addSensorId(sensorId, exceptionSensorTypeConfig.getPriority()); // add all settings sensorInstrumentationPoint.addSettings(exceptionSensorAssignment.getSettings()); }