Versions Compared

Key

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

...

You can use this feature to add context information about the running transaction or to get detailed information about problems (usually applications do log problems). In addition to that you can jump from a logging output back to the invocation sequence and analyze the complete request as your user executed it.

...

Configuration

Please note that the easiest way to get the default configuration is to use the configuration entries within the default inspectit-agent.cfg, which includes concrete logging configurations from the common folder:

Code Block
## Logging information
######################
$include common/logging-log4j.cfg

Configuring the logging level of captured messages

The logging level of captured messages can be configured with the method-sensor-type of the logging realization. In this example I show the configuration for log4j (other technologies work similarly).

In [config_root]/common/ you find logging-log4j.cfg. In this file you find the definition of the logging sensor.

Code Block
method-sensor-type log4jlogger info.novatec.inspectit.agent.sensor.method.logging.Log4JLoggingSensor MIN minlevel=WARN

Use the minlevel parameter to define the minimum severity level a logging message must have to be captured.

Realization status

Currently the logging sensor is provided for the log4j framework (

Jira Legacy
serverJIRA (inspectit-performance.atlassian.net)
serverId025b869f-b613-3685-8211-0d54499d8708
keyINSPECTIT-1971
). Additional technologies are integrated in new tickets (if you need another technology, please let us know or Vote for an existing technology):

  • java.util.logging 
    Jira Legacy
    serverJIRA (inspectit-performance.atlassian.net)
    serverId025b869f-b613-3685-8211-0d54499d8708
    keyINSPECTIT-2003
  • slf4j logging 
    Jira Legacy
    serverJIRA (inspectit-performance.atlassian.net)
    serverId025b869f-b613-3685-8211-0d54499d8708
    keyINSPECTIT-2004

 

 

 

CONTINUE HERE!

 

The invocation sequence sensor can be used for example in the following application areas:

  • Methods that perform slow infrequently as the invocation sequence sensor will provide all invocations independent of each other and thus allows the user to find the slow running method invocation.
  • It is useful to see how a call traverses a (sub-)system in order to find problems and bugs or to verify the correct behavior.
  • Inspecting the method flow during development
  • inspecting if a defined architecture is really used by the developers

Configuration

Definition of the method sensor type

The method sensor type definition is necessary to specify that a certain sensor is available to inspectIT. Based on this configuration the concrete methods that should be monitored using the invocation sequence tracer can be specified.

Code Block
method-sensor-type isequence info.novatec.inspectit.agent.sensor.method.invocationsequence.InvocationSequenceSensor INVOC
Info

Compared to other method sensor types, the INVOC priority is mandatory here and reserved for an invocation sequence sensor.

Associating a method with an invocation sequence

The association of a method with the invocation sequence sensor can be done like with all other method sensor definitions (see the Agent Configuration for the concrete documentation on the possibilities of setting method sensors).

Code Block
sensor isequence info.novatec.inspectitsamples.calculator.Calculator actionPerformed

Sensor specific options

The invocation sequence sensor provides the following sensor specific options

Option

Description

Type

Example

minduration

define 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

optional

sensor isequence novatec.SubTest msg(int) [INSPECTIT16:name] minduration=10.0

Example

Code Block
method-sensor-type timer info.novatec.inspectit.agent.sensor.method.timer.TimerSensor MAX mode=aggregated
method-sensor-type isequence info.novatec.inspectit.agent.sensor.method.invocationsequence.InvocationSequenceSensor INVOC

sensor isequence info.novatec.inspectitsamples.calculator.Calculator actionPerformed
sensor timer * *

What will inspectIT do with this configuration:

  • The actionPerformed method is defined as the starting point of the invocation sequence sensor, thus everytime this method is called, it will record a trace
  • The timer sensor type is instrumented in the whole application (this is only due to understand the system better, it is never good to instrument everything!)
  • Every time the invocation sensor is started, all timer measurements are stored in this context so that the relation between the measurements and the invocation can be reconstructed in the user interface

String length

from version 1.3

This sensor enables the limitations of the string values collected. The invocation sensor concretely can limit the maximum size of the strings collected as context parameters. The following definition will, for example, limit all the strings collected by the sensor to 500 characters:

Code Block
titleString length option configuration
method-sensor-type isequence info.novatec.inspectit.agent.sensor.method.invocationsequence.InvocationSequenceSensor INVOC stringLength=500

...

The logging information is right now only available within Invocation Sequences but not as an own view. With 

Jira Legacy
serverJIRA (inspectit-performance.atlassian.net)
serverId025b869f-b613-3685-8211-0d54499d8708
keyINSPECTIT-2005
 a new aggregation component will be provided.