From 06971298d934e168bf02277f812d9393c7469cd7 Mon Sep 17 00:00:00 2001 From: Evan Baker Date: Tue, 15 Mar 2022 19:04:38 +0000 Subject: [PATCH] add hostname and version in the correct field in ai logs Signed-off-by: Evan Baker --- aitelemetry/telemetrywrapper.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aitelemetry/telemetrywrapper.go b/aitelemetry/telemetrywrapper.go index 94749bc7dd..ac5dd96092 100644 --- a/aitelemetry/telemetrywrapper.go +++ b/aitelemetry/telemetrywrapper.go @@ -2,6 +2,7 @@ package aitelemetry import ( "fmt" + "os" "runtime" "time" @@ -24,6 +25,7 @@ const ( vmIDStr = "VMID" versionStr = "AppVersion" azurePublicCloudStr = "AzurePublicCloud" + hostNameKey = "hostname" defaultTimeout = 10 defaultBatchIntervalInSecs = 15 defaultBatchSizeInBytes = 32768 @@ -207,6 +209,8 @@ func (th *telemetryHandle) TrackLog(report Report) { trace.Tags.User().SetAuthUserId(runtime.GOOS) trace.Tags.Operation().SetId(report.Context) trace.Tags.Operation().SetParentId(th.appVersion) + trace.Tags.Application().SetVer(th.appVersion) + trace.Properties[hostNameKey], _ = os.Hostname() // copy app specified custom dimension for key, value := range report.CustomDimensions {