none
Telemetry data being sent, but not logged in AI RRS feed

  • Question

  • I am using an IIS hosted WCF service along with AI (Microsoft.AI.Wcf) to capture the basic telemetry data. When I run the service locally from Visual Studio 2015, I can see the telemetry calls in VS 2015 as well as in Fiddler. I can also see the data logged in AI.

    When I deploy the same service to Azure as web app, it does not log any telemetry data. If I debug (remote debug) the Azure deployed version from local VS, I can see the telemetry calls in VS output window. But, none of them are available in AI portal. Tried the troubleshooting steps as in https://goo.gl/S1R6Uq, but no luck.

    Any help to troubleshoot the issue will be really appreciated.

    Tuesday, March 8, 2016 9:51 PM

Answers

  • Hi Alex,

    Thanks a lot for the help fixing the issue! For everybody's benefit, following is what I did with help of Alex.

    1) Turned on AI verbose logging by updating AI config file:

        <Add Type="Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule, Microsoft.ApplicationInsights" >
          <DiagnosticsInstrumentationKey>[YOUR_I_KEY]</DiagnosticsInstrumentationKey>
          <Severity>Verbose</Severity>
        </Add>

    2) Run the app from Visual Studio and check it's output window for error.

    3) In my case, found following:

    TransmissionSendingFailed. TransmissionId: RGbUcxsUEIo=. Message: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888
       at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)

    ........

    So, it was trying to send telemetry data, but was failing in HTTP request.

    Well I had this in my web.config:

      <system.net>
        <defaultProxy enabled="true" useDefaultCredentials="true">
          <proxy autoDetect="False" bypassonlocal="False" proxyaddress="http://127.0.0.1:8888" usesystemdefault="False" />
        </defaultProxy>
      </system.net>

    I was using Fiddler to troubleshoot some other aspect of my code. So, AI could actually send the data only when I had Fiddler running on my machine. Certainly in Azure all those calls were failing...

    After removing this config entry, now AI works like a charm and is flooded with information! :-)

    So, anybody else running into similar issue, try turning on the verbose logging and then take the action as applicable for your case.

    • Marked as answer by Arijit D Friday, March 11, 2016 3:46 PM
    Friday, March 11, 2016 3:46 PM

All replies

  • Can you please include the AI payload that your are seeing in VS output window when remote debugging your Azure web app. (Please also hide the ikey). Thanks!
    Alex

    www.twitter.com/bulankou

    Wednesday, March 9, 2016 5:31 AM
  • These are couple of such telemetry calls:

    Application Insights Telemetry (filtered by SamplingTelemetryProcessor): {"name":"Microsoft.ApplicationInsights._ikey_XXXXXXXXXXXXXXX.Request","time":"2016-03-08T21:37:49.0815671Z","sampleRate":50,"iKey":"_ikey_XXXXXXXXXXXXXXX","tags":{"ai.operation.id":"6u3wazF5qZ0=","ai.internal.sdkVersion":"wcf: 0.20.0.59754","ai.device.roleInstance":"RD00155D592A09","ai.operation.name":"IUserAction.FrequentActionSearch","ai.location.ip":"137.116.77.16","ai.operation.parentId":"N+OawGZgmdA="},"data":{"baseType":"RequestData","baseData":{"ver":2,"id":"6u3wazF5qZ0=","name":"IUserAction.FrequentActionSearch","startTime":"2016-03-08T21:37:49.0815671+00:00","duration":"00:00:00.0213875","success":true,"responseCode":"200","url":"http://m.d.p.azurewebsites.net/UserActionBpl.Svc","httpMethod":"POST","properties":{"Protocol":"http"}}}}
    Application Insights Telemetry: {"name":"Microsoft.ApplicationInsights._ikey_XXXXXXXXXXXXXXX.Request","time":"2016-03-08T21:37:49.0798933Z","sampleRate":50,"iKey":"_ikey_XXXXXXXXXXXXXXX","tags":{"ai.location.ip":"xx.xx.xx.16","ai.operation.id":"N+OawGZgmdA=","ai.internal.sdkVersion":"web: 2.0.0.454","ai.device.roleInstance":"RD00155D592A09","ai.operation.name":"POST /UserActionBpl.Svc"},"data":{"baseType":"RequestData","baseData":{"ver":2,"id":"N+OawGZgmdA=","name":"POST /UserActionBpl.Svc","startTime":"2016-03-08T21:37:49.0798933+00:00","duration":"00:00:00.0249441","success":true,"responseCode":"200","url":"http://m.d.p.azurewebsites.net/UserActionBpl.Svc","httpMethod":"POST"}}}

    Some information (ikey, ip, URI) are masked.

    Thursday, March 10, 2016 4:15 PM
  • Did the data ever come up? That looks reasonably right to me, but there is sometimes a bit of a delay before events are processed on the backend.

    I do notice that you seem to have both the Microsoft.ApplicationInsights.Web and Microsoft.ApplicationInsights.Wcf packages installed and both are generating the request events, so not sure if that might be causing an issue. Could you try disabling the Web Http Module and see if that makes any difference?


    http://winterdom.com/

    Thursday, March 10, 2016 7:26 PM
  • No this data never came up in portal. Other data that was logged while running it locally did show up within few minutes / seconds.

    I tried removing the Web HTTP module, but no luck. I also tried to log it with a different 'iKey', assuming some issue with this instance of App Insight, but again no luck!


    Thursday, March 10, 2016 9:13 PM
  • Thanks Arijit. The sample request you included above is filtered out by sampling (see filtered by SamplingTelemetryProcessor) so it is not getting sent. Can you please include an example of request that is not getting filtered by sampling. Thanks!

    www.twitter.com/bulankou

    Thursday, March 10, 2016 9:17 PM
  • Thanks Alex, I did not know that SamplingTelemetryProcessor do not actually send the telemetry data.

    These are few more telemetry calls, without SamplingTelemetryProcessor:

    Application Insights Telemetry: {"name":"Microsoft.ApplicationInsights._ikey_XXXXXXXXXXXXXXX.Request","time":"2016-03-08T21:37:49.0248330Z","sampleRate":50,"iKey":"_ikey_XXXXXXXXXXXXXXX","tags":{"ai.location.ip":"xx.xx.xx.16","ai.operation.id":"MMo+6Oy2DWc=","ai.internal.sdkVersion":"web: 2.0.0.454","ai.device.roleInstance":"RD00155DXXXA09","ai.operation.name":"POST /UserActionBpl.Svc"},"data":{"baseType":"RequestData","baseData":{"ver":2,"id":"MMo+6Oy2DWc=","name":"POST /UserActionBpl.Svc","startTime":"2016-03-08T21:37:49.0248330+00:00","duration":"00:00:00.0280899","success":true,"responseCode":"200","url":"http://m.d.p.azurewebsites.net/UserActionBpl.Svc","httpMethod":"POST"}}}
    Application Insights Telemetry: {"name":"Microsoft.ApplicationInsights._ikey_XXXXXXXXXXXXXXX.RemoteDependency","time":"2016-03-08T21:37:49.0150271Z","sampleRate":50,"iKey":"_ikey_XXXXXXXXXXXXXXX","tags":{"ai.internal.sdkVersion":"rddf: 2.0.0.454","ai.device.roleInstance":"RD00155DXXXA09"},"data":{"baseType":"RemoteDependencyData","baseData":{"ver":2,"name":"tcp:10.0.0.136 | XXXX_MT | [schema].[procName]","id":"ya5i+61cPeU=","value":46.8334,"dependencyKind":0,"success":true}}}
    Application Insights Telemetry: {"name":"Microsoft.ApplicationInsights._ikey_XXXXXXXXXXXXXXX.Request","time":"2016-03-08T21:37:49.0013085Z","sampleRate":50,"iKey":"_ikey_XXXXXXXXXXXXXXX","tags":{"ai.operation.id":"VawjVxomxFM=","ai.internal.sdkVersion":"wcf: 0.20.0.59754","ai.device.roleInstance":"RD00155DXXXA09","ai.operation.name":"ITransaction.TransactionSearch","ai.location.ip":"xx.xx.xx.16","ai.operation.parentId":"jHFftsEH1Kc="},"data":{"baseType":"RequestData","baseData":{"ver":2,"id":"VawjVxomxFM=","name":"ITransaction.TransactionSearch","startTime":"2016-03-08T21:37:49.0013085+00:00","duration":"00:00:00.0662026","success":true,"responseCode":"200","url":"http://m.d.p.azurewebsites.net/TBpl.Svc","httpMethod":"POST","properties":{"Protocol":"http"}}}}
    Application Insights Telemetry: {"name":"Microsoft.ApplicationInsights._ikey_XXXXXXXXXXXXXXX.Request","time":"2016-03-08T21:37:48.9962768Z","sampleRate":50,"iKey":"_ikey_XXXXXXXXXXXXXXX","tags":{"ai.location.ip":"xx.xx.xx.16","ai.operation.id":"jHFftsEH1Kc=","ai.internal.sdkVersion":"web: 2.0.0.454","ai.device.roleInstance":"RD00155DXXXA09","ai.operation.name":"POST /TBpl.Svc"},"data":{"baseType":"RequestData","baseData":{"ver":2,"id":"jHFftsEH1Kc=","name":"POST /TBpl.Svc","startTime":"2016-03-08T21:37:48.9962768+00:00","duration":"00:00:00.0731821","success":true,"responseCode":"200","url":"http://m.d.p.azurewebsites.net/TBpl.Svc","httpMethod":"POST"}}}

    Thursday, March 10, 2016 9:25 PM
  • Looked at the last set of samples you pasted above. I'm seeing that they are too old (from 3/8) but if I change the date to 3/10 and change ikey to a valid ikey I can send them successfully, i.e. I get successful response from our data collection service.

    If you would like us to check your ikey in our internal system (to see what data it was receiving recently), can you please email it me at albulank@microsoft.com

    Thanks!

    Alex


    www.twitter.com/bulankou

    Thursday, March 10, 2016 10:19 PM
  • Hi Alex,

    I have sent the details to you in email.

    Thanks for the help!

    Thursday, March 10, 2016 10:41 PM
  • Hi Alex,

    Thanks a lot for the help fixing the issue! For everybody's benefit, following is what I did with help of Alex.

    1) Turned on AI verbose logging by updating AI config file:

        <Add Type="Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing.DiagnosticsTelemetryModule, Microsoft.ApplicationInsights" >
          <DiagnosticsInstrumentationKey>[YOUR_I_KEY]</DiagnosticsInstrumentationKey>
          <Severity>Verbose</Severity>
        </Add>

    2) Run the app from Visual Studio and check it's output window for error.

    3) In my case, found following:

    TransmissionSendingFailed. TransmissionId: RGbUcxsUEIo=. Message: System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:8888
       at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)

    ........

    So, it was trying to send telemetry data, but was failing in HTTP request.

    Well I had this in my web.config:

      <system.net>
        <defaultProxy enabled="true" useDefaultCredentials="true">
          <proxy autoDetect="False" bypassonlocal="False" proxyaddress="http://127.0.0.1:8888" usesystemdefault="False" />
        </defaultProxy>
      </system.net>

    I was using Fiddler to troubleshoot some other aspect of my code. So, AI could actually send the data only when I had Fiddler running on my machine. Certainly in Azure all those calls were failing...

    After removing this config entry, now AI works like a charm and is flooded with information! :-)

    So, anybody else running into similar issue, try turning on the verbose logging and then take the action as applicable for your case.

    • Marked as answer by Arijit D Friday, March 11, 2016 3:46 PM
    Friday, March 11, 2016 3:46 PM