microsoft / windows-container-tools

Collection of tools to improve the Windows Containers experience
MIT License
240 stars 68 forks source link

Integrating OpenTel in LogMonitor for Telemetry Collection #113

Closed bobsira closed 5 months ago

bobsira commented 1 year ago

Steps for reviewing this PR:

Install VCPKG from here: https://vcpkg.io/en/getting-started.html These are the steps from the link above:

Step 1: Clone the vcpkg repo Make sure you are in the directory you want the tool installed to before doing this. we recommend a short install path like: C:\src\vcpkg or C:\dev\vcpkg git clone https://github.com/Microsoft/vcpkg.git

Step 2: Run the bootstrap script to build vcpkg .\vcpkg\bootstrap-vcpkg.bat

Step 3: Using vcpkg with MSBuild / Visual Studio (may require elevation) vcpkg integrate install

After this you should be able to use vcpkg within Visual Studio

Next install OpenTelemetry using VCPKG

vcpkg install opentelemetry-cpp:x64-windows-static

N/B: we are using x64-windows-static triplet because Log Monitor is built statically and without this, you will run into compiler mismatch issues.

This is all the installation required. You should be set and the project should work on your end.

Have a simple config file or just have it empty we are not really interested in it. C:\LogMonitor\LogMonitorConfig.json contents:

{
  "LogConfig":{
     "sources":[
     ]
  }
}

Run the code, at the moment you should see the following output. I've attached a sample pic. This should report system information from the registry key. telemetry_message

iankingori commented 1 year ago

Please provide a sample of the information collected in the description to aid with review

lucillex commented 1 year ago

Along the lines of what Ian mentioned about a sample of the information being collected, will the data be aggregated?

bobsira commented 1 year ago

@lucillex we need to set-up a meeting to discuss the privacy involved with the data that we are planning to collect.

Also the data will be aggerated. The plan is to sent is to Geneva as a backend and use Microsoft tools like Kusto, Flow, Power BI for querying, creating reports and dashboards as needed.