none
Application Insights for Cloud Service Worker Role RRS feed

  • Question

  • Is Application Insights still for Cloud Service Web Role only? I would like to use it in Worker Role.
    Monday, May 5, 2014 10:30 PM

Answers

  • Hi Deva, you can configure App Insights for worker role just like in the example that you referenced. Add Application Insights API nuget to your application, update the instrumentation key in the config to match the one from you AI resource, then you can

    TelemetryClient telemetryClient = new TelemetryClient();

    and use methods such as TrackTrace, TraceRequest, TrackMetric/Event etc.

    I just verified that it is working for a worker role.

    Sunday, December 14, 2014 7:04 AM
  • Yes, it's still available only for the web roles.
    Worker roles are still on our radar and their support definitely will be in some visible future.
    Monday, May 5, 2014 10:50 PM
    Moderator

All replies

  • Yes, it's still available only for the web roles.
    Worker roles are still on our radar and their support definitely will be in some visible future.
    Monday, May 5, 2014 10:50 PM
    Moderator
  • Is there any prerelease way of configuring this to get it to work for worker roles?  Is this still the case?

    I tried the link below, and verified the proper keys were in place, but I did not see any telemetry data for my worker roles come over on the portal, any other ideas?  

    As always any help is appreciated.

    -Deva

    http://stackoverflow.com/questions/26505483/appinsights-for-wpf-application/26641583#26641583



    Deva Wijewickrema

    Tuesday, December 9, 2014 2:13 PM
  • Hi Deva, you can configure App Insights for worker role just like in the example that you referenced. Add Application Insights API nuget to your application, update the instrumentation key in the config to match the one from you AI resource, then you can

    TelemetryClient telemetryClient = new TelemetryClient();

    and use methods such as TrackTrace, TraceRequest, TrackMetric/Event etc.

    I just verified that it is working for a worker role.

    Sunday, December 14, 2014 7:04 AM
  • Hi,

    It doesn't seem to work properly with TrackException, the exception is not always sent and I don't know why.

    Also the buffer is not properly cleared when the role is stopped/recycled. That's an issue especially for uncaught exceptions.

    Thursday, December 18, 2014 3:24 PM
  • Hi Guill4ume,

    Can you describe how you are using TrackException, i.e. where are you adding this call? Why do you thin the buffer is not properly cleared, are you getting events from the previous session when the role starts up? Also are you losing your TrackException telemetry only in the scenario when you catch unhandled, call TrackException and then rethrow?

    Thanks,

    Alex


    Couple of months to GA and the journey is just starting: https://careers.microsoft.com/jobdetails.aspx?jid=166735. Interested? Please email your resume to albulank at microsoft.com.

    Thursday, December 18, 2014 5:23 PM
  • Hi Alex,

    I'm calling TrackException from an AppDomain.UnhandledException event handler. I think the buffer might be unsent because I took a look at TelemetryClient assemblies and it seems to handle AppDomain unload which is not raised for the main AppDomain.

    Friday, January 2, 2015 10:19 AM
  • Both web and worker roles are supported: please see

    https://azure.microsoft.com/en-us/documentation/articles/app-insights-cloudservices/

    Wednesday, July 1, 2015 11:07 PM
  • Please try making an explicit call to Flush() to force the send.
    Thursday, July 2, 2015 4:59 PM