Categories:
KPI entity handler
Description of the KPI entity handler, a module in charge of calling aura-kpi-handler utility.
It is used by aura-authentication-api, aura-bot and aura-groot.
Introduction
One of the elements ready to be used across aura-bot is the kpi-handler, that is the aura-bot module in charge of calling aura-kpi-handler utility.
This kpi-handler is a singleton module that, during its initialization, starts a KpiHandler used to write the rows in the corresponding blob.
Methods
The kpi-handler provides a method to write each entity row that is used at the different stages of the activity processing: aura-bridge-outbound .
incomingMessage: generates aMessageEntitywith the information available when the message enters aura-bot, if the user is properly authenticated.extendedIncomingMessage: generates aExtendedMessageEntitywith the information available when the message enters aura-bot, if the user is properly authenticated.unauthenticatedIncomingMessage: generates aExtendedMessageEntitywith the information available when the message enters aura-bot, if there is any error during the user’s authentication.outgoingMessage: it is called once per activity returned by aura-bot as response of an incoming activity. It fills all the data generated during the activity processing.extendedOutgoingMessage: it is called once per activity returned by aura-bot as response of an incoming activity. It fills all the data generated during the activity processing.unauthenticatedOutgoingMessage: generates aMessageEntitywith the information available when *aura-bot sends the response, if there is any error during the user’s authentication.recognize: generates aRecognizerEntityrow with the information of the execution of every recognizer called during the activity processing, this kpi is written by both the aura-bot and the aura-groot.incomingGrootMessage: generates aGrootMessageEntitywith the information available when the message enters aura-groot.outgoingGrootMessage: it is called once per activity returned by aura-groot as response of an incoming activity. It fills all the data generated during the activity processing.
All the above-mentioned methods work following the same process:
- The information is gathered from their incoming parameters, from the
TurnContextand fromConversationStateandUserStage. - Data is converted into the values and formats needed by aura-kpi-handler.
- The corresponding event handled by aura-kpi-handler is emitted, that is in charge of writing the row in the corresponding blob.
- aura-kpi-handler receives the event, processes the data in the corresponding entity and pushes it to the entity buffer stream. This stream is appended to the corresponding BlobFile every 10 seconds (configurable).
- If the POD is stopped, all the content in the buffer stream is appended automatically to the log.
Last modified November 11, 2025: feat: Clean up of Living Apps related stuff #AURA-30761 [RTM] (c97ca748)