Cowborg
Cowborg

Reputation: 2871

Cant activate Applicaion Insight (nor Live Stream Metrics)

Im running a web app on an Azure App Service.

I go to --> Settings --> App insight First time it said that I needed to restart my web app along with a button that I clicked. It took a while, but now I get the message "Your app is currently offline. Visit it to enable Live Stream". enter image description here

When I click "VIEW MORE IN APPLICATION INSIGHT" I get to a step-by-step-guide on how to install Application Insight in VS (which I have followed)

My web app is running, I can visit it and on the overview page for my app service it says Status : "Running"

Upvotes: 1

Views: 913

Answers (1)

Janley Zhang
Janley Zhang

Reputation: 1577

This is an article about how to open Live Stream in portal. And you could could check these ways if you want to use Live Stream.

1.Copy the InstrumentationKey from application insight service.Add it in ApplicationInsights.config in your project:

 <InstrumentationKey>your key</InstrumentationKey>

2.Add some custom telemetry data to test.

  public ActionResult Index()
        {
            Trace.TraceInformation("my trace info Home/Index");
            var telemetry = new Microsoft.ApplicationInsights.TelemetryClient();
            RequestTelemetry requestTelemetry = new RequestTelemetry();
            telemetry.TrackTrace("Home/Index Main");
            telemetry.TrackPageView("Home/Index");
            return View();
        }

3.Run your project in debug mode.

4.Click Live Stream in overview in application insight service.

Then you could see the telemetry data in Live Stream:

enter image description here

Upvotes: 2

Related Questions