MSOACC
MSOACC

Reputation: 3675

View TraceWriter.Info() logs in Azure Function without Application Insights

My Azure Function app uses the TraceWriter.Info() method to write logs. Very simple to use and it used to be very simply to view:

public static void Run([TimerTrigger("0 0 22 * * *", RunOnStartup = false)]TimerInfo myTimer, TraceWriter log)
{
   log.Info("My log!");
}

However, now when I go to the portal and click the "Monitor" tab, which used to show the output in a console-like window, it demands that I setup Application Insights whilst giving me an error:

enter image description here

I cannot click the "Configure" button to set it up. As far as I know my app specifies nothing about Application Insights, yet the error seems to suggest that it does.

My questions:

Upvotes: 0

Views: 1581

Answers (1)

Joey Cai
Joey Cai

Reputation: 20127

Is it possible to get the old console window back?

As Thomas said, I add the APPINSIGHTS_INSTRUMENTATIONKEY in Application settings of function and could reproduce your problem. So, after deleting the APPINSIGHTS_INSTRUMENTATIONKEY, you will get the old console window back. enter image description here

Failing that, why can I not configure app insights?

After deleting that attribute you will configure app insight successfully. And it will generate a specific app insight for your function app.

Upvotes: 1

Related Questions