Build your own Monitor & Recorder
Prerequisites:
We will use the samples provided in the Get-started folder of HeexSDK and customize them.
In this documentation, we will focus on the C++ version available in the /cpp subfolder, but a Python version is also available in the /python subfolder
Customize the sample monitor
-
Navigate to the sample
-
Edit your getStartedMonitor.cpp file
- Retrieve monitorUuid value by the UUID of your Monitor in the Web platform
- Replace the monitorUuid value on this line by the UUID of your monitor you have copied in your clipboard:
Overriding of Agent Interfaces
generateRequestedValues()
The generateRequestedValues method should add the recorded value to contextualize your metadata. First navigate to the generateRequestedValues method and notice the two commented parameters.
-
Uncomment both query and contextValues parameters by removing the
/*
and*/
-
Replace the
return true;
statement with the following lines to provide position and custom contextual values to your metadata:
-
Uncomment both query and contextValues parameters by removing the
/*
and*/
-
Replace the
return true;
statement with the following lines to provide position and custom contextual values to your metadata:
- Replace the
return true;
statement with the following lines to provide position and custom contextual values to your metadata:
You can personnalize the GPS location by choosing the ones of a place you like. You can use google maps to help you find the coordinates. Just right click where you like and click on the coordinates and the location is in your clipboard.
generateRequestedFilePaths()
The generateRequestedFilePaths method must return the path of the file your recorder generates. We can simulate it like so:
-
Create a event recording by creating a file like so:
-
Uncomment the parameters query and filepath by removing the
/*
and*/
-
Change the return line in your generateRequestedFilePaths method with the absolute path of your file.txt file:
-
Create a event recording by creating a file like so:
-
Uncomment the parameters query and filepath by removing the
/*
and*/
-
Change the return line in your generateRequestedFilePaths method with the absolute path of your file.txt file:
- Create a event recording by creating a file like so:
- Change the return line in your generateRequestedFilePaths method with the absolute path of your file.txt file:
💡 Tip: 🎉 CONGRATULATIONS!
You have completed the Recorder phase!
For python agents, directly go to step 4.
Compile your monitor & recorder
-
Make sure you are still located in the right folder
-
Compile
For faster builds, specify the —jobs flag for multiple parrallel jobs. By default, it uses 1 job.
💡 Tip:
./heex sdk build —build-examples —jobs n
-
Check if you see your Monitor and Recorder executables
-
If yes, you can change the status of your monitor and recorder to Deployed in the web platform:
-
The status of your System is now
Ready
(after reloading the page)