Reputation: 11
I d'like to add custom properties to metrics taken by Application Insights to each type of telemetry log of my app. Which is
Want to map Evn name for each and every activity which is logged in the Application Insights
To help out and filter logs no the basis of Env tag for ex QA, UAT and Prod
Am is to log all the environment log into single AI instance and use them and query filtering via log
Using .Enrich.WithProperty(env, 'QA')
property did not workout for all type of log events.
Upvotes: 0
Views: 1126
Reputation: 2440
Below is the Sample code for adding custom events in Telemetry event.
var request = new RequestTelemetry();
var client = new TelemetryClient();
request.Name = "My Request";
client.TrackRequest(request);
For cmplete information you can refer this So thread which has related discussions.
Also, as suggested by DeepDave-MT even this Microsoft Document will also help.
Upvotes: 0