ApplicationInsights-node.js icon indicating copy to clipboard operation
ApplicationInsights-node.js copied to clipboard

ApplicationInsights does not track the blob storage dependency

Open mdv27 opened this issue 3 years ago • 3 comments

As per the documentation blob storage interaction should be tracked, however application map in Application insights does not for me. I have added custom setup as below which also does not work.

import * as appInsights from 'applicationinsights';

        appInsights.setup(mykeyValue)
            .setAutoDependencyCorrelation(true)
            .setAutoCollectRequests(true)
            .setAutoCollectPerformance(true, true)
            .setAutoCollectExceptions(true)
            .setAutoCollectDependencies(true)
            .setAutoCollectConsole(true, false)
            .setUseDiskRetryCaching(true)
            .setAutoCollectPreAggregatedMetrics(true)
            .setSendLiveMetrics(false)
            .setInternalLogging(false, true)
            .setDistributedTracingMode(appInsights.DistributedTracingModes.AI_AND_W3C)
            .start();

Is there any option to setup manually tracking of dependencies?

mdv27 avatar Jul 19 '22 02:07 mdv27

I was able to see the interaction with Azure blob storage on the Application Map and in the Application Insights logs. Can I confirm that you're on the latest version of Application Insights and the Azure SDK?

JacksonWeber avatar Jul 20 '22 20:07 JacksonWeber

I was able to see the interaction with Azure blob storage on the Application Map and in the Application Insights logs. Can I confirm that you're on the latest version of Application Insights and the Azure SDK?

Hi @JacksonWeber, I have below versions. When manually tracked dependency, it does populate the application Map with blob storage entries. It would be good if that happens automatically as azure sdk is used for blob storage interaction.

  • Dependency versions: "@azure/storage-blob": "^12.5.0" "applicationinsights": "^2.3.1"

  • Manual tracking: appInsights.TelemetryClient.trackDependency()

  • Blob storage accessed as :

private getContainerClient(containerName): ContainerClient {
        const blobClientService = BlobServiceClient.fromConnectionString(this.azureConnection);
        const containerClient = blobClientService.getContainerClient(containerName);
        return containerClient;
    }
const containerClient = getContainerClient(containerName);
containerClient.listBlobsFlat({ includeTags: true });
containerClient.getBlockBlobClient(blobName);
containerClient.deleteBlob(blobName);

mdv27 avatar Jul 30 '22 06:07 mdv27

@mdv27 I was able to get the Application Map to populate the dependencies without manual tracking just using the standard appInsights.setup() statement. What happens for you without adding the manual tracking statements?

If nothing is being displayed when the manual tracking statement is removed in the application map, could you update the applicationinsights and azure blob storage dependencies?

JacksonWeber avatar Aug 01 '22 18:08 JacksonWeber