What is sensor assignment
Sensor assignment specifies the process of mapping/assigning an already existing sensor type to a concrete method of a certain class. The sensor type itself is the definition of what needs to be measured. Sensor assignment thus defines what should be monitored.
The currently existing sensor types in inspectIT are:
- Timer sensor
- HTTP sensor
- Exception sensor
- JDBC Connection sensor
- JDBC Statement sensor
- JDBC Prepared Statement sensor
- JDBC JDBC Prepared Parameter sensor
- Logging sensor for log4j
- Invocation sequence Sequence sensor (although this senor sensor type exists it can not be assigned directly, please check the Advanced sensor options below for more information)
Configuration
Sensor assignment configuration is done on done in the Sensor Definitions page of the profileAssignment profile type. The sensor definition page offers the Add, Remove and Duplicate sensor assignment options. When adding new sensor assignment to the profile, first step is to select sensor type you want to use in the given assignment:
...
In addition exact parameters of the method can be specified, which can be helpful in filtering when the class has many method with the same name. If parameters are left out then all methods with the given name will be instrumented, regardless on number/type of parameters. Note that parameter oder order is taken into account.
The following example show a instrumentation configuration for the constructor of the class novatec.SubTest that has boolean and java.lang.String as parameters:
...
Annotation based instrumentation can be combined with all other instrumentation options. If the annotation option is used the Options column of the sensor assignment table will display this icon: .
Info | ||
---|---|---|
| ||
The annotation class that is used in the instrumentation does not need to be on the class-path in order for instrumentation to work. |
Sensor specific options
Starts invocation
Applies to Timer sensor
As already mentioned the Invocation Sequence sensor can not be applied directly to sensor assignment. Instead of this you can mark any Timer sensor assignment to start the invocation as well as capturing the timing information. This is done by activating the Starts invocation option in the assignment sensor specific options. It's possible to optionally also set the minimum duration property. This property defines the minimum time an invocation has to consume in order to be saved and transmitted to the server. This helps in reducing the data load from the Agent to the CMR and is a good filter for not so important invocations.
If the starts invocation is active the Options column of the sensor assignment table will display this icon: .
Charting
Applies to Timer and HTTP sensor
With the charting option it is possible to define what data should be considered as the long-term data available for charting in inspectIT User interface. This data is additionally saved to the database, thus even when the CMR is shutdown or buffer is cleared the data will be available via charts. With this approach it is possible to define exactly what methods performance data should be considered as long-term.
The configuration of the charting option is defined in the sensor assignment for Timer and HTTP sensor:
If the charting option is active the Options column of the sensor assignment table will display this icon: .
Context capturing
Applies to Timer sensor
Please visit the Context capturing in sensor assignment for more information on context capturing option.
Examples
Don't forget to check the Examples page for concrete examples on sensor assignment configuration.
...