Adding Kusto Telemetry to ApplicationHealthLinux v2 #63
Merged
klugorosado merged 33 commits intofeature/v2/bootstrapVMWatchfrom May 2, 2024
Merged
Adding Kusto Telemetry to ApplicationHealthLinux v2 #63klugorosado merged 33 commits intofeature/v2/bootstrapVMWatchfrom
klugorosado merged 33 commits intofeature/v2/bootstrapVMWatchfrom
Conversation
- Chaged Github workflow go version to Go 1.18 - Small refactor in setup function for bats tests.
…s structs - Add telemetry event Logging to handlersettings.go
…tests, one in 2_handler-commands.bats and another in 7_vmwatch.bats
dpoole73
reviewed
Apr 18, 2024
zmyzheng
reviewed
Apr 18, 2024
…h with existing Windows Telemetry
dpoole73
approved these changes
Apr 29, 2024
zmyzheng
approved these changes
Apr 29, 2024
… 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 HandlerSettings struct String() func to use MarshallIndent - Fixed Failing UTs due to nil pointer in Embedded Struct inside HandlerEnviroment.
…o feature/v2/bootstrapVMWatch-Telemetry
frank-pang-msft
approved these changes
May 1, 2024
klugorosado
added a commit
that referenced
this pull request
May 15, 2024
* 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
This Pull request contains a series of changes aimed at adding Kusto Telemetry to AppHealthLinux v2, the most significant changes include:
LogStdOutAndEventWithSenderthat returns A function that when used it will log to the event to StdOut then publish the event.[Main, AppHealth, AppHealthProbe, AppHealthStatus, VMWatch, VMWatchSetup, VMWatchStatus]Copilot Summary
Dockerfile and Workflow Modifications:
.devcontainer/Dockerfile: Updated the Go version from 1.21-bullseye to 1.18-bullseye..github/workflows/go.yml: Added steps to set up Bats libraries and test the Bats installation, and changed thecontinue-on-errorvalue fromtruetofalsein the Unit Tests step. [1] [2]File and Dependency Updates:
.vscode/extensions.json: Removed the "golang.go" and "ms-vscode-remote.remote-ssh" extensions, and added the "github.copilot", "ms-azuretools.vscode-docker", and "github.vscode-pull-request-github" extensions..devcontainer/extension-settings.json: Changed the "requestPath" value from "health" to "/health".go.mod: Updated the module path from "github.com/Azure/run-command-extension-linux" to "github.com/Azure/applicationhealth-extension-linux", and updated several dependencies.Testing Improvements:
integration-test/test/test_helper.bash: Made changes to thebuild_docker_imageandverify_state_change_timestampsfunctions, and added the_load_bats_libsfunction. [1] [2] [3]integration-test/test/parallel/7_vmwatch.bats: Added a call to_load_bats_libsin thesetupfunction, and made changes to theteardownfunction and several tests. [1] [2] [3]Newly Added Files:
internal/handlerenv/handlerenv.go: Newly added file that sets up the handler environment.internal/manifest/extensionmanifest.go: Newly added file that sets up the extension manifest.internal/manifest/extensionmanifest_linux_test.go: Newly added file that tests the extension manifest on Linux.internal/manifest/extensionmanifest_test.go: Newly added file that tests the extension manifest.