The HTTP resource adaptor contains code for integration with Metaswitch Service Assurance Server (SAS), which is a platform for recording and viewing detailed call handling information.

Note

Rhino TAS 2.6 or later supports SAS tracing.

You can use the HTTP resource adaptor 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 to deploy the library.

For details about SAS tracing in Rhino TAS, see the SAS Facility section in the Rhino extended API document. For details about developing applications with the SAS tracing functionality, see the Rhino SAS API Development Guide.

The HTTP resource adaptor has two models for managing SAS trails, depending on whether it is handling incoming or outgoing requests.

Incoming requests

The resource adaptor creates a new SAS trail for every incoming request if it is configured to do so. After that, it logs the HTTP request with this trail.

The CreateIncomingSasTrail configuration property controls this trail creation behavior. For details, 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 uses it to log the HTTP request. It will never create a SAS trail. Therefore, if there is no trail attached to the outgoing HTTP request activity, the resource adaptor does not log the request to SAS.

Rhino TAS has a feature that automatically sets the trail for activities created within event handlers for activities that have a trail attached. To disable the tracing of outgoing HTTP requests in this scenario, set the SAS trail on the OutgoingHttpRequestActivity to null.

For details about automatic trail handling, see the Rhino SAS API Development Guide.

SAS events

The mini-bundle that the HTTP resource adaptor uses is as follows. As shown in the code, the following SAS events are defined:

  • INCOMING_MESSAGE

  • OUTGOING_MESSAGE

  • SENDING_MESSAGE

  • SENDING_MESSAGE_VIA_MESH

---
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] }}'
  SENDING_MESSAGE:
    summary: 'Sending HTTP {{ var_data[0] }} to {{ var_data[1] }}:{{ var_data[2] }}'
    details: |
      Attempting connection to {{ var_data[1] }}:{{ var_data[2] }}
    level: 40
  SENDING_MESSAGE_VIA_MESH:
    summary: 'Sending HTTP {{ var_data[0] }} to {{ var_data[1] }} via service mesh at {{ var_data[2] }}:{{ var_data[3] }}'
    details: |
      Attempting connection to {{ var_data[1] }} via service mesh at {{ var_data[2] }}:{{ var_data[3] }}
    level: 40

For details about the mini-bundle or the event fields, see the Rhino SAS API Development Guide.

Note

If SAS tracing is configured and enabled, when the resource adaptor logs a request or a response message, it also raises a GENERIC_CORRELATOR_MARKER SAS marker that contains the X-Span-ID HTTP header for trail correlation with other SAS-enabled products.

SAS example

For an example of how to log SAS events, see the HTTP example service source code.

Previous page Next page