A mini-bundle is a yaml file in which you define events that you use in your processing logic and the enumerated values that the events use. For each component with SAS tracing support in your application, you usually create a separate mini-bundle.

From each mini-bundle file, you can generate a Java enums file that contains enums representing the events and the data that the events use. All the mini-bundle files in your application, together with the bundle mapping file, are used to generate a resource bundle file, which you will need to import in SAS.

By convention, the mini-bundle file is named sas-bundle.yaml and located in a nested subdirectory under the resources/sas-bundles directory of the corresponding module. The path to the mini-bundle file must match the Java package for the module. For example, if the package is com.abc.feature.xyz, the path of the mini-bundle file should be resources/sas-bundles/com/abc/feature/xyz/. You will need the path and name of the mini-bundle file when you generate the Java enum file from it.

The fields in a mini-bundle are as follows:

version: <file-version> 1
events: 2
    <EVENT_NAME_1>:
        ...
    <EVENT_NAME_N>:
        ...

enums: 3
    <ENUM_NAME_1>:
        ...
    <ENUM_NAME_N>:
        ...
1 The version field specifies the version of the mini-bundle.
2 The events section contains event definitions. For more information, see Define events in a mini-bundle.
3 The enums section contains definitions of the enums that the events use.
Tip

Use enums for known sets of values in an event. For example, you can use enums to represent the reasons for a call diversion or the types of a timer. This can reduce the amount of data sent to SAS and therefore save network bandwidth and storage space, because for enums, you are sending integers rather than objects.

For example, the following mini-bundle file contains the definition of the SETTING_TIMER event and the TIMER_TYPES enum that the event uses:

version: 1.0
events:
    SETTING_TIMER:
        level: 20
        summary: 'Set {{ static_data[0] | enum: "TIMER_TYPES" }} timer for {{ static_data[1] }} seconds'

enums:
    TIMER_TYPES:
        1: 'No reply'
        2: 'Forward to voicemail'
Note In this example, enum is a Liquid filter that SAS provides for getting the relevant value from the enumeration variable. For more information, see Predefined Liquid filters.

To make sure that SAS uses the correct version of an event or enum, follow these guidelines when you update the mini-bundle for a new version of the application:

  • Increment the version number appropriately.

  • Don’t remove old events that you no longer need.

  • Don’t change the meaning or order of events or enum values.

Previous page Next page