Welcome to TeiaCarePrometheus!
TeiaCarePrometheus is a C++ client library that implements the Prometheus Data Model.
This project uses git submodules so it is required to clone it using the –recursive flag in order to retrive the required submodules.
This project relies on venvpp2 (included as the scripts submodule) to manage the development environment based on Conan v2 and CMake v4 with CMakePresets as first class citizens.
Run the venvpp2 setup script from the project root. It creates a .venv at the project root, pins CONAN_HOME to ./.conan2 and installs the Python requirements (Conan, CMake, Ninja, pre-commit, etc.).
On subsequent sessions just re-activate the virtual environment created above.
When building from command line on Windows it is necessary to activate the Visual Studio Developer Command Prompt.
Depending on the version of Visual Studio compiler and on its install location it is required to run vcvars64.bat script the set the development environment properly.
Note: using Visual Studio IDE or the CMake extension for VSCode this step is already managed in the background, so no action is required.
Examples:
Configure the TeiaCare Artifactory remote to fetch 3rd party dependencies (only required for unit tests and examples).
Install Conan packages and generate CMakePresets.json together with the CMake toolchain file. Pick the profile that matches your platform (available profiles are under scripts/profiles/): linux-clang, linux-gcc, macos-arm64, macos-x64, windows-msvc.
Use the CMake presets generated by Conan to configure, build and install the library.
Replace conan-debug / build/Debug with conan-release / build/Release when building the Release configuration.
Examples are installed in $PWD/install/examples.
Note that code coverage is not available on Windows.
Unit tests results are available in $PWD/results/unit_tests. Coverage results are available in $PWD/results/coverage.
Note that Address Sanitizer is supported only on Linux.
Note that Thread Sanitizer is supported only on Linux.