module
Version:
v1.5.0
Opens a new window with list of versions in this module.
Published: Apr 10, 2023
License: MIT
Opens a new window with license information.
README
¶
To Consume the Go module
- Use go get to fetch the module with latest verison
go get github.com/Azure/azure-migrate-discovery-extension-events
.
- For module with specific commit/version use
go get go get github.com/Azure/azure-migrate-discovery-extension-events@<commit-id>
.
*Usage
Import in your respective file
discoveryextensionevents "github.com/Azure/azure-migrate-discovery-extension-events/go"
In your reconciler
azureLogger := discoveryextensionevents.AzureLogger(ctx, cr.GetAnnotations())
For error event logging
tt := discoveryextensionevents.NullReferenceErrorEvent("adavv")
azureLogger.LogErrorEvent(tt)
For telemetry event logging
ee := discoveryextensionevents.EntityDiscoveredTelemetryEvent("mybersion", "applicationname", "adad", "adad", "ad")
azureLogger.LogTelemetryEvent(ee)
For metric event logging
To add new Events
-
Add new events in the Telemetry.xml, Error.xml or Metrics.xml in AzureMigrate-ClusterExtensionCommon repo (https://msazure.visualstudio.com/One/_git/AzureMigrate-ClusterExtensionCommon?path=/src/DiscoveryClusterExtension/EventXml).
-
Kick off official build after PR merge.
-
Get the artifiact of name Gomodule from drop_build_main\codegen and download it in your local machine.
-
Raise the PR in this Git Repo.
-
Consume the Go module in respective discovery cluster extension.
North Star Goal
Directories
¶
Click to show internal directories.
Click to hide internal directories.