Versions Compared

Key

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

What is sensor assignment

...

  • Timer sensor
  • HTTP sensor
  • Exception sensor
  • JDBC Connection sensor
  • JDBC Statement sensor
  • JDBC Prepared Statement sensor
  • JDBC Prepared Parameter sensor
  • Logging sensor for log4j
  • Image ModifiedInvocation sequence sensor (although this senor type exists it can not assigned directly, please check the Advanced sensor options below for more information) 

...

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

...

Don't forget to check the Examples page for concrete examples on sensor assignment configuration.