Appdynamics IoT C++ SDK to monitor performance of embedded applications on connected devices
This repository contains AppDynamics IoT C++ SDK that can be used in embedded applications to monitor network perfomance, errors and business metrics.
sdk
- C++ SDK source and headerssample
- Sample Application showing how to use the SDK to capture and send eventstests
- Unit Tests to test functionality of SDKdocs
- SDK API document built in html format using Doxygen.Before building the sdk, check if cmake is installed. If not, you can get it using package manager
$ sudo apt-get install cmake
$ cmake -v
Also, ensure your system has all the tools (g++, make, libc, git etc) to build c++ code. If not, you can install them using
$ sudo apt-get install build-essential
$ sudo apt-get install git
$ sudo apt-get install lcov
Note: lcov
version 1.13 or higher is needed.
On 32 bit machines, you might also need multilib
$ sudo apt-get install gcc-multilib g++-multilib
You can install curl and its headers using below commands:
$ sudo apt-get install curl
$ sudo apt-get install libcurl4-gnutls-dev
SDK has been built and tested on below platforms.
SDK can be built on other platforms as long the compiler has support for ISO C++ standard C++98/C++03.
Below are the targets that can be built using this repository.
appdynamicsiotsdk
- SDK is built as a library(libappdynamicsiot) by default. The library and headers can be found in lib/ and include/ directories created when this target is built.sample
- Sample application is built as executable sample
by default.tests
- Tests are built as executable linking cgreen library.All the targets can be built from root directory using the below commands.
$ git clone https://github.com/Appdynamics/iot-cpp-sdk.git
$ cd iot-cpp-sdk
$ mkdir build
$ cd build
$ cmake ..
$ make
if build
directory is created outside of the root directory, then pass the path of root directory to cmake command.
Only sdk and sample targets are built by default. To build tests, run
$ cmake .. -DBUILD_TESTS=1
$ make
If you want to build tests and enable code coverage, run
$ cmake .. -DENABLE_COVERAGE=1
Code coverage has a dependency on gcov
, lcov
& genhtml
.
If you want to build a 32 bit library on a 64 bit machine, set the flag DBUILD_32BIT
$ cmake .. -DBUILD_32BIT=1
$ make
You can also build individual targets using below commands
$ make appdynamicsiotsdk
$ make sample
$ make tests
You can run tests from the build
folder by using commands below
$ make ./run-tests
You can run a report on code coverage from the build
folder by using commands below
$ sudo make run-code-coverage
You can view the code coverage report from the build
folder by opening theout/index.html
file
Best place to understand the usage of SDK is to run the sample application. Please refer README of sample application for steps to run.
Below are the steps to integrate and use SDK within your own application:
libappdynamicsiot
in lib/ folder once sdk target is built