azureazure-functionsazure-application-insightsazure-monitoring

Writing custom trace messages to Application Insight from Azure Function App


I working on Azure Function App and would like to add custom messages/traces which can aid in debugging and improving performance. This is my code that I am using:

var telemetry = new Microsoft.ApplicationInsights.TelemetryClient();
telemetry.TrackTrace("Alert Button Pressed by Device ->" + CloudObject.A, SeverityLevel.Warning, new Dictionary<string, string> { { "IoT Object", IOTMESSAGE } });

But when I go to Application Insight and Query traces(All) I do not see the trace message I am setting.

Am I doing something wrong?


Solution

  • It is still not working. I am getting this warning, could this be an issue?

    I have set a sampling and data ap on application insight, I am hoping custom trace messages ignore those set limits

    enter image description here