none
TelemetryClient.TrackDependency - How is the commandName parameter used?

    Question

  • I'm using TelemetryClient.TrackDependency Method (String, String, DateTimeOffset, TimeSpan, Boolean) to track the amount time it takes to open a Service Bus Relay channel in my web role and I'm wonder how the commandName parameter is used in the data shown in the Azure portal. Currently I set the dependencyName: "ServiceBusRelay" and commandName: "ChannelOpened" but when I look in the portal I don't see any reference to the commandName. In the portal I noticed that there is a "Dependency" and "Dependency Base Name" columns. For example, when a Azure table is queried the Dependency is "Azure table: GET sometable" and the Dependency Base Name is "myazurestorageaccount.table.core.windows.net".

    I'm wondering how to do something similar to better organize my Service Bus Relay related dependencies.

    Thursday, June 23, 2016 12:10 AM

Answers

  • I reported the issue to the team.

    Right now you can use a workaround: you can mark your dependency as SQL dependency and command will be preserved.

    TelemetryClient client = new TelemetryClient();
    DependencyTelemetry telemetry = new DependencyTelemetry("name", "command", DateTimeOffset.UtcNow, TimeSpan.FromMilliseconds(10), true);
    
    telemetry.DependencyKind = "SQL";
    
    client.Track(telemetry);


    Anastasia

    Friday, June 24, 2016 8:50 PM
    Moderator

All replies

  • Alsmost the same question for me

    I am experimenting with the use of TelemetryClient.TrackDependency to measure the durations of SQL calls from our c# class libraries. As the commandName argument I pass the SqlCommand.CommandText but in the Azure Portal as well as in the application Insights pane in Visual studio I nowhere find that value.

    Thursday, June 23, 2016 8:48 AM
  • I will report the issue to the team and write back when I get a confirmation.

    Anastasia


    Thursday, June 23, 2016 7:41 PM
    Moderator
  • I reported the issue to the team.

    Right now you can use a workaround: you can mark your dependency as SQL dependency and command will be preserved.

    TelemetryClient client = new TelemetryClient();
    DependencyTelemetry telemetry = new DependencyTelemetry("name", "command", DateTimeOffset.UtcNow, TimeSpan.FromMilliseconds(10), true);
    
    telemetry.DependencyKind = "SQL";
    
    client.Track(telemetry);


    Anastasia

    Friday, June 24, 2016 8:50 PM
    Moderator
  • Is there a way I can track this issue so I can remove this workaround once a fix is implemented?
    Thursday, July 7, 2016 7:14 PM
  • There is no publicly available issue right now. You create one here: https://github.com/Microsoft/ApplicationInsights-dotnet-server

    Anastasia

    Thursday, July 7, 2016 7:24 PM
    Moderator