Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Image Added

The currently existing sensor types in inspectIT are:

 

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: Image Added.

Info
titleAnnotation class not needed on the class-path

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

Examples

This chapter provides examples of how instrumentation can be done.

...

Instrumentation Configuration

...

Description

...

Image Removed

...

A sensor of the type Image RemovedTimer sensor is defined on the method msg with the parameter java.lang.String of the class novatec.SubTest.

...

Image Removed

...

Image RemovedTimer sensor is added to the method msg with the parameter type int for all classes that match the class expression novatec.Sub* which will hold true for novatec.Sub andnovatec.Sub2 but also for novatec.Sub.some.other.package.SomeClass.

...

Image Removed

...

Image RemovedTimer sensor is added to the method msg with a parameter type matching the expression *String of the class novatec.SubTest. So the method msg(java.lang.String) and the method msg(my.own.String) and msg(my.own.SuperString) will be instrumented.

...

Image Removed

...

This example shows different usages of wild-card.

...

Image Removed

...

This example shows how to instrument classes based on their status that they implement some interface. So this test will instrument all methods of all classes that implement the interface novatec.ITest.

...

Image Removed

...

A sensor is defined on methods that start with the character m and have exactly one parameter whose type match the expression *String of all classes that extend a class matching the classpattern nova*.Te*. (quite powerful isn't it :))

...

Image Removed

...

A Image RemovedTimer sensor that starts invocation is defined on novatec.SubTest class on msg(int) method. The interesting part here is the minduration definition, which is specified so that all invocations taking less than 10 ms will be discarded.

...

Image Removed

...

Instruments all public methods which name starts with 'do' in classes that implement the novatec.ITest interface

...

Image Removed

...

Instruments all public methods in classes that have been annotated with novatec.annotation.ClassAnnotation and are in package novatec.*

...

Image Removed

...

This sensor instruments all constructors of the class novatec.SubTest

...

Image Removed

...

A specific constructor is instrumented here: The method signature has to contain one single parameter of type java.lang.String.

...

Image Removed

...

Starts invocation

Applies to Timer sensor

As already mentioned the Image AddedInvocation Sequence sensor can not be applied directly to sensor assignment. Instead of this you can mark any Image AddedTimer 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.

Image Added

If the starts invocation is active the Options column of the sensor assignment table will display this icon: Image Added.

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:

Image Added

If the charting option is active the Options column of the sensor assignment table will display this icon: Image Added.

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.