The Unified REST resource adaptors integrate 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.
Rhino versions 2.6 and later support SAS tracing. |
SAS tracing of incoming requests
The resource adaptor will create a new SAS trail for every incoming request, if configured to do so. This is the default behaviour. The incoming request will be recorded on this trail.
The CreateIncomingSasTrail configuration property controls this behaviour.
See Configuring the REST Resource Adaptor.
|
SAS tracing of outgoing requests
If there is a SAS trail attached to the OutgoingRestActivity
, the REST resource adaptor will use the SAS trail to record the outgoing request.
The REST resource adaptor will never create a SAS trail, so if there is no trail attached to the OutgoingRestActivity
,
then the request will not be recorded.
Rhino 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 OutgoingRestActivity
must be explicitly set to null
.
See the Rhino SAS Facility documentation for the details of this automatic trail handling behaviour.
SAS events
The REST resource adaptor raises a SAS marker for trail correlation with other SAS-enabled products when recording a request or response message.
It raises a GENERIC_CORRELATOR_MARKER
containing the X-Span-ID
HTTP header, if it is set.
The following SAS event mini-bundles define all the SAS event that are recorded by a Unified REST resource adaptor.
SAS Events at the HTTP layer
---
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] }}'
message_id: '{{ var_data[4] }}'
call_info_id: '{{ var_data[5] }}'
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] }}'
message_id: '{{ var_data[4] }}'
call_info_id: '{{ var_data[5] }}'
SAS Events at the REST layer
version: 1.0
events:
# General
NO_SERVICE_TO_HANDLE_REQUEST:
level: 20
summary: 'There is no service available to handle a REST request'
details: |
api: {{ var_data[0] }}
operation: {{ var_data[1] }}
event-type: {{ var_data[2] }}
NO_SBB_PROCESSED_REQUEST:
level: 20
summary: 'No SBB processed a REST request'
details: |
event-type: {{ var_data[0] }}
REQUEST_EVENT_FAILED_TO_BE_PROCESSED:
level: 20
summary: 'A REST request event failed to be processed'
details: |
event-type: {{ var_data[0] }}
NO_SERVICE_TO_HANDLE_RESPONSE:
level: 20
summary: 'There is no service available to handle a REST response'
details: |
event-type: {{ var_data[0] }}
status-code: {{ var_data[1] }}
NO_SBB_PROCESSED_RESPONSE:
level: 20
summary: 'No SBB processed a REST request'
details: |
event-type: {{ var_data[0] }}
status-code: {{ var_data[1] }}
flags: {{ var_data[2] }}
reason: {{ var_data[3] }}
RESPONSE_EVENT_FAILED_TO_BE_PROCESSED:
level: 20
summary: 'A REST response event failed to be processed'
details: |
event-type: {{ var_data[0] }}
flags: {{ var_data[1] }}
reason: {{ var_data[2] }}
UNKNOWN_REQUEST_EVENT:
level: 20
summary: 'Failed to deduce an event-id for an incoming request'
details: |
api: {{ var_data[0] }}
UNKNOWN_RESPONSE_EVENT:
level: 20
summary: 'Failed to deduce an event-id for an incoming response'
details: |
api: {{ var_data[0] }}
NO_AVAILABLE_REST_API:
level: 20
summary: 'There is no REST API available'
details: |
path: {{ var_data[0] }}
version: 1.0
events:
# Client API request/response
# Server API callback request/response
SEND_REST_REQUEST:
level: 60
summary: 'Sending {{ static_data[0] | enum: "REST_MESSAGE_TYPE" }}'
details: |
messageType: {{ static_data[0] | enum: "MessageType" }}
api: {{ var_data[0] }}
operationId: {{ var_data[1] }}
body: {{ var_data[2] | if_blank: "no body" }}
RECEIVE_REST_RESPONSE:
level: 60
summary: 'Receiving {{ static_data[0] | enum: "REST_MESSAGE_TYPE" }}'
details: |
messageType: {{ static_data[0] | enum: "MessageType" }}
api: {{ var_data[0] }}
operationId: {{ var_data[1] }}
status-code: {{ var_data[2] }}
body: {{ var_data[3] | if_blank: "no body" }}
# Server API request/response
# Client API callback request/response
RECEIVE_REST_REQUEST:
level: 60
summary: 'Receiving {{ static_data[0] | enum: "REST_MESSAGE_TYPE" }}'
details: |
messageType: {{ static_data[0] | enum: "MessageType" }}
api: {{ var_data[0] }}
operationId: {{ var_data[1] }}
body: {{ var_data[2] | if_blank: "no body" }}
SEND_REST_RESPONSE:
level: 60
summary: 'Sending {{ static_data[0] | enum: "REST_MESSAGE_TYPE" }}'
details: |
messageType: {{ static_data[0] | enum: "MessageType" }}
api: {{ var_data[0] }}
operationId: {{ var_data[1] }}
status-code: {{ var_data[2] }}
body: {{ var_data[3] | if_blank: "no body" }}
enums:
REST_MESSAGE_TYPE:
1: 'REST Request'
2: 'REST Response'
3: 'Callback REST Request'
4: 'Callback REST Response'