Azure-Samples / azure-batch-samples

Azure Batch and HPC Code Samples
Other
261 stars 487 forks source link

Suggestions to improve Application Insights C# sample #244

Closed dlepow closed 5 years ago

dlepow commented 6 years ago

Comment from @gardnerjr in https://github.com/MicrosoftDocs/azure-docs/issues/8009:

This sample code could be even better, and enable more application insights features, if it used more examples of custom properties and custom metrics. For example, the number of words found could be either another TrackMetric call itself, or could be sent in the customMetric parameter for the TrackEvent call. I see that the TrackMetric call passes this.CommonProperties as the properties for the metric, but doesn't appear to pass those same properties for all the other TrackTrace/TrackEvent calls? Likewise, If it isn't hooked up implicitly, using this.taskId as the telemetry client's operation.id field (and possibly the task's name as the operation.name field) would enable all of the telemetry in that one task to be correlated together in various places.