...
Please see the WORKING WITH ... pages for further information of how the http timer can be used to monitor and diagnose your system.
Configuration
Configuration
...
basics
Using the UI configuration interface no configuration is required at all as method sensor types are activated automatically if a profile defines such sensor assignment.
Configuration using configuration file(s)
The http sensor needs to be defined in order to use it. This definition is already available within the sample inspectIT configuration file. In addition to just defining the sensor type, you can configure which data the http sensor should capture.
...
...
method-sensor-type http info.novatec.inspectit.agent.sensor.method.http.HttpSensor MAX
Enabling session attribute capturing
...
The HTTP session capturing setting is available under Sensor options part in the Environment configuration.
Configuration using configuration file(s)
In order to activate this capturing you need to specify the "sessioncapture" configuration setting to true.
Code Block |
---|
method-sensor-type http info.novatec.inspectit.agent.sensor.method.http.HttpSensor MAX sessioncapture=true
|
Sensor assignment
Usually you do not need to change the assignment of the http sensor as inspectIT provides an out-of-the-box assignment for the http sensor. You can have a look at this instrumentation at the file http.cfg in the Out-of-the-box instrumentation or in the HTTP Common profile if you are using UI configuration. If you want to make additional assignments, please be aware of the following rules:
- The http sensor assumes that it is attached to methods that provide a ServletRequest object as first parameter. It will check if the given parameter is in fact also realizing HttpServletRequest as only this will provide the necessary http information. If the object does not realize this interface, nothing will be done
- If you attach the sensor to a method that does not provide a HttpServletRequest (as runtime class of the object) within the first parameter, the sensor will never provide any information at all.
Other options
Regular expression URI modification
from version 1.5
Warning |
---|
Not available under UI based configuration interface. |
...
Expand | ||
---|---|---|
| ||
The HTTP sensor definition brings the possibility to define the regular expression that can be used to transform the URI during the analysis in the User interface. The following example extracts the second part of the URI |
...
With following settings, when activated in the User interface, following URI transformation occur:
From above we can conclude that all the dvd actions have been grouped to one single group.
Defining Templates[DEPRECATED] Configuration using configuration file(s)It is also possible to define the template that will be displayed in combination with the transformed URI. For example, the following settings:
will substitute the $1$ marker with the first extracted group from the regular expression transformation. The same set of URI from the previous example, would now look like this:
It is also possible to extract more groups with the regular expression and combine them into more meaningful transformation output. Since the first part of the example URIs we have |
...
is dvdstore, it is clear that that represents the name of our application. Thus, with following settings:
We would extract both first and second part of the URI and with defined template, the example results would look like this:
|
Other options
String length
from version 1.3
This sensor enables the limitations of the string values collected. The HTTP sensor concretely can limit the maximum size of the strings collected as request parameters, attributes and headers, as well as session attributes collected.. The following definition will, for example, limit all the strings collected by the sensor to 500 characters:
Code Block | ||
---|---|---|
| ||
method-sensor-type http info.novatec.inspectit.agent.sensor.method.http.HttpSensor MAX stringLength=500
|
You
Configuration using UI configuration interface
The string length configuration for all sensors is available in the Environment configuration. You can read more about string length limitations on Sensor type definition page.https://jira.novatec-gmbh.de/browse/INSPECTIT-439limitations Environment configuration page.