To make the events and trails for a single call appear in a single trace and searchable, you can attach markers to trails.

Markers can associate trails. If you use the same value for an association marker, such as GENERIC_CORRELATOR_MARKER, on multiple trails, SAS associates those trails to give its users a comprehensive view of the trace. Markers can also make trails searchable. If you add a value to a searchable marker, such as CALLING_DN_MARKER, which is attached to a trail, SAS users can use that value to search for the trail once it is sent through.

Note A marker can serve multiple purposes. For example, you can use a marker to both search for a trail and associate multiple trails.

The following code example illustrates the steps for adding an association marker and sending the data out:

1
2
3
4
MarkerMessage associationMarker = trail.marker(Markers.IMS_CHARGING_ID_MARKER);
associationMarker.traceScope();
associationMarker.varParam(icid);
associationMarker.report();

The following code example illustrates the steps for adding a searchable marker and sending the data out:

1
2
3
4
MarkerMessage searchableMarker = trail.marker(Markers.CALLING_DN_MARKER);
searchableMarker.noneScope();
searchableMarker.varParam(fromAddress);
searchableMarker.report();

As shown in these examples, sending marker data takes these steps:

  1. Add a marker to the trail with a MarkerMessage object.

    As shown in line 1 of the examples, the marker() method is used to respectively add the IMS_CHARGING_ID_MARKER marker and the CALLING_DN_MARKER to the trails.

  2. Define the scope of the marker.

    For association markers, you must define an appropriate scope. SAS only associates markers that have the same scope. A scope can be a branch of a call leg or a trace. In line 2 of the examples, the traceScope() method specifies that the scope of the marker is the trace, while the noneScope() method specifies that the marker isn’t an association marker.

  3. Add values to the marker.

    To add the values, use the staticParam() method for static data and the varParam() method for variable data. As shown in line 3 of the examples, the values of the icid and the fromAddress variables are respectively added to the IMS_CHARGING_ID_MARKER and the CALLING_DN_MARKER markers.

  4. Send the marker out.

    Once the marker message object is ready with appropriate marker, scope, and values, you can use the report() method of the object to send the marker data out.

    You can also use the report() method of the Trail object to send the data out. For example, in the first example, you can change the last line to trail.report(associationMarker).

For the best practices in using markers, see the Best practices sections.

Previous page Next page