applicationhealth-extension.../.devcontainer
Kevin Lugo b56f2ad074
Adding Kusto Telemetry to ApplicationHealthLinux v2 (#63)
* Adding internal/manifest package from Cross-Platform AppHealth Feature Branch

* Running go mod tidy and go mod vendor

* - Add manifest.xml to Extension folder
- Chaged Github workflow go version to Go 1.18
- Small refactor in setup function for bats tests.

* Update Go version to 1.18 in Dockerfile

* Add logging package with NopLogger implementation

* Add telemetry package for logging events

* - Add telemetry event Logging to main.go

* - Add new String() methods to vmWatchSignalFilters and vmWatchSettings structs
- Add telemetry event Logging to handlersettings.go

* - Add telemetry event Logging to reportstatus.go

* Add telemetry event Logging to health.go

* Refactor install handler in main/cmds.go to use telemetry event logging

* Refactor uninstall handler in main/cmds.go to use telemetry event logging

* Refactor enable handler function in main/cmds.go to use telemetry event logging

* Refactor vmWatch.go to use telemetry event logging

* Fix requestPath in extension-settings.json and updated 2 integration tests,  one in 2_handler-commands.bats and another in 7_vmwatch.bats

* ran go mod tidy && go mod vendor

* Update ExtensionManifest version to 2.0.9 on UT

* Refactor telemetry event sender to use EventLevel constants in main/telemetry.go

* Refactor telemetry event sender to use EventTasks constants that match with existing Windows Telemetry

* Update logging messages in 7_vmwatch.bats

* Moved telemetry.go to its package in internal/telemetry

* Update Go version to 1.22 in Dockerfile, go.yml, go.mod, and go.sum

* Update ExtensionManifest version to 2.0.9 on UT

* Add NopLogger documentation to pkg/logging/logging.go

* Added Documentation to Telemetry Pkg

* -Added a Wrapper to HandlerEnviroment to add Additional functionality like the String() func
- Added String() func to handlersettings struct, publicSettings struct, vmWatchSettings struct and
vmWatchSignalFilters struct
- Added Telemetry Event for HandlerSettings, and for HandlerEnviroment

* - Updated HandlerEnviroment String to use MarshallIndent Function.
- Updated HandlerSettings struct String() func to use MarshallIndent
- Fixed Failing UTs due to nil pointer in Embedded Struct inside HandlerEnviroment.

* - Updated vmWatchSetting String Func to use MarshallIdent

* Update ExtensionManifest version to 2.0.10 on Failing UT

* removed duplicated UT

* Removed String() func from VMWatchSignalFilters, publicSettings and protectedSettings
2024-05-01 23:46:04 -07:00
..
Dockerfile Adding Kusto Telemetry to ApplicationHealthLinux v2 (#63) 2024-05-01 23:46:04 -07:00
README.md Resource governance, heartbeat and dev container changes (#43) 2023-11-30 18:38:07 -08:00
devcontainer.env Resource governance, heartbeat and dev container changes (#43) 2023-11-30 18:38:07 -08:00
devcontainer.json Fixing bug to successfully kill AppHealth Gracefully & VMWatch. (#59) 2024-03-19 12:06:04 -07:00
extension-settings.json Adding Kusto Telemetry to ApplicationHealthLinux v2 (#63) 2024-05-01 23:46:04 -07:00

README.md

Dev Container Info

This directory contains files to support running the code in a dev container. This allows you build and debug the code locally, either on a PC, Mac or linux machine.

This works using VSCode's dev container support.

Requirements

  1. Docker – needed for building the docker image and for devcontainer workflow. Microsoft has an enterprise agreement with docker, details here

    • Windows Installer is here
    • Mac installer is here
  2. Dev Containers VSCode extension

    • installation info is here

Running In DevContainer

This works either on windows/mac machine or via a remote SSH session on a linux machine (this is the only way that the integration tests can reliably run, debugging works in all modes)

  1. Go to the root of the repo in a command window
  2. Open vscode using code .
  3. Click the Blue >< thing in thr bottom left of the screen and select reopen in container (the first time this runs it will take some time as it will build the docker container for the dev environment based on the dockerfile in the .devcontainer directory)
  4. Once it has opened, open a bash terminal in vscode
  5. run make devcontainer
  6. you are now ready to run and debug the extension

Debugging

  1. configure the appropriate settings in the file .devcontainer/extension-settings.json (the default one enables the simple and process tests for vmwatch but you can change it)
  2. click the debug icon on the left and select devcontainer run - enable target
    • you can add more in launch.json as needed
  3. set breakpoints as required
  4. hit f5 to launch the extension code