Skip to content

Commit

Permalink
Merge pull request #10 from lawrencegripper/fix/time-unit
Browse files Browse the repository at this point in the history
Added explicit time unit to request duration
  • Loading branch information
jjcollinge authored Dec 6, 2017
2 parents 0f38c20 + 7e038a0 commit 06def33
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,8 @@ func startWatchdog(config types.Configuration) {
event := <-healthChan
publishToAppInsights(event, config)
if config.Debug {

fmt.Println(prettyPrintStruct(event))
}
fmt.Println(prettyPrintStruct(event))
}
}

Expand All @@ -82,7 +81,7 @@ func publishToAppInsights(event types.StatsEvent, config types.Configuration) {
telemetry.SetProperty("source", event.Source)
telemetry.SetProperty("instanceID", config.InstanceID) //Duplicated for discoverability
telemetry.SetProperty("isSuccess", strconv.FormatBool(event.IsSuccess))
telemetry.SetProperty("requestDuration", event.RequestDuration.String())
telemetry.SetProperty("requestDurationInNs", strconv.FormatInt(event.RequestDuration.Nanoseconds(), 10))
if !event.IsSuccess {
telemetry.SetProperty("errorDetails", event.ErrorDetails)
}
Expand Down

0 comments on commit 06def33

Please sign in to comment.