The HTTP resource adaptor is integrated with the Metaswitch Service Assurance Server (SAS). SAS provides a mechanism to record and search detailed end-to-end tracing of call handling.
See the SAS Facility section in the Rhino extended API documentation for more information about SAS tracing.
SAS tracing is supported on Rhino versions 2.6 and later. The HTTP resource adaptor can be used with earlier Rhino versions if the Rhino API Compatibility SLEE library is deployed. The script that deploys the HTTP Ping service included in the resource adaptor package has an example of how the library is deployed. |
The HTTP resource adaptor has two models for managing SAS trails, depending on whether it is handing incoming or outgoing requests.
Incoming requests
The resource adaptor will create a new SAS trail for every incoming request, if configured to do so. The HTTP request will then be logged on this trail.
The CreateIncomingSasTrail
configuration property controls this behaviour.
See Configuring the HTTP Resource Adaptor.
Outgoing requests
For outgoing HTTP requests, if there is a SAS trail attached to the OutgoingHttpRequestActivity
, the resource adaptor will use it to log the HTTP request.
It will never create a SAS trail, so if there is no trail attached to the OutgoingHttpRequestActivity
, then the request will not be logged to SAS.
Rhino has a feature that automatically sets the trail for activities created within event handlers for activities that have a trail attached.
To disable tracing of outgoing HTTP requests in this scenario, the SAS trail on the OutgoingHttpRequestActivity
must be explicitly set to null
.
See the Rhino SAS Facility documentation for the details of this automatic trail handling behaviour.
SAS events
When logging a request or response messages, the resource adaptor will also raise a SAS marker for trail correlation with other SAS-enabled products.
It raises a GENERIC_CORRELATOR_MARKER
containing the X-Span-ID
HTTP header, if it is set.
---
version: 1.0
events:
INCOMING_MESSAGE:
summary: 'Received HTTP {{ var_data[3] }} from {{ var_data[2] }}'
details: |
Received HTTP message from {{ var_data[2] }}:{{ static_data[1] }} on {{ var_data[1] }}:{{ static_data[0] }}
<sas:fixed-width-font>{{ var_data[0] }}</sas:fixed-width-font>
level: 60
call_flow:
caption: '{{ var_data[3] }}'
data: '{{ var_data[0] }}'
protocol: HTTP
direction: in
local_address: '{{ var_data[1] }}:{{ static_data[0] }}'
remote_address: '{{ var_data[2] }}:{{ static_data[1] }}'
OUTGOING_MESSAGE:
summary: 'Sent HTTP {{ var_data[3] }} to {{ var_data[2] }}'
details: |
Sent HTTP message to {{ var_data[2] }}:{{ static_data[1] }} from {{ var_data[1] }}:{{ static_data[0] }}
<sas:fixed-width-font>{{ var_data[0] }}</sas:fixed-width-font>
level: 60
call_flow:
caption: '{{ var_data[3] }}'
data: '{{ var_data[0] }}'
protocol: HTTP
direction: out
local_address: '{{ var_data[1] }}:{{ static_data[0] }}'
remote_address: '{{ var_data[2] }}:{{ static_data[1] }}'