Logging data to the invoke monitor
In order to log service invokes to the invoke_monitor
database and Solr core, you must configure
monitor rules in your instance. Once you have rules setup, incoming service invokes are logged,
provided that they match with any of your rules.
Log all service invokes
To log all service invocations, set the application property monitor.log-all
to true
.
Invoke document discrepancies
There will be slight variations amongst invoke documents, depending on how a service is invoked. The invoke document of a service called by a Martini endpoint and the invoke document of a service called via an HTTP request differ by a small subset of unique fields each. In this section, we will take a look at these discrepancies.
To give you get a head start, here are snippets from a Solr search response that will let you compare the contents of each invoke document:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
trackerId
trackerId
only gets set when the service is configured to log calls to Tracker.
endpointName
- This property is only present in services triggered by Martini endpoints.
endpointName
will be set to the name of the Martini endpoint which called the service.
endpointType
- If the call was triggered by an HTTP request,
endpointType
will have the value ofhttp
. - If the call was from a Martini endpoint instead,
endpointType
will be set to the type of Martini endpoint (e.g.scheduler
,email
,ftp-server
) that triggered the service invoke.
serviceName
-
For Groovy services invoked through a RESTful HTTP request1 or the service invoker,
serviceName
will be set to the name of the method that handled the call in the format:1
groovy:<fully qualified class name>/<method signature>
-
For Services invoked through a Gloop API endpoint, ad hoc service endpoint, or the service invoker,
serviceName
would be the namespace of the service that was invoked. The namespace will be in the format:1
gloop:<fully qualified service name>/<fully qualified service name>
-
For Martini endpoints,
serviceName
will be the namespace of the service invoked.
url
- Only set if the service was called via an HTTP request.
url
's value will be the URL mapped to the invoked service.
remoteAddress
- Only set if the service was called via an HTTP request.
- The IP address of the service caller.
country
- Only set if the service was called via an HTTP request.
- Only set if the MaxMind GeoIP database is installed in Martini.
Martini uses this database to obtain the country where the invocation was made from
remoteAddress
.
location
- Only set if the service was called via an HTTP request.
- Only set if the MaxMind GeoIP database is installed in Martini.
Martini uses this database to obtain the coordinates where the invocation was made from
remoteAddress
.
responseCode
- Only set if the service call was triggered by an HTTP request.
userAgent
- Only set if the service call was triggered by an HTTP request.
- If the user agent can't be identified, it will use the value of the
User-Agent
request header.
userPlatform
- Only set if the service call was triggered by an HTTP request.
- Value derived from the
User-Agent
request header. - Not set if Martini is unable to identify the platform used.
-
Exposed through Spring annotations. ↩