Type to search.

Set up Azure Storage instrumentation

Serverless Observability

Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Stack

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

APM Agent .NET

The Elastic APM .NET agent enables you to trace the execution of operations in your .NET applications, sending performance metrics and errors to the Elastic APM server.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Package Supported versions
Azure.Storage.Blobs ≥12.8.0 <13.0.0
Azure.Storage.Queues ≥12.6.0 <13.0.0
Azure.Storage.Files.Shares ≥12.6.0 <13.0.0

For the full compatibility matrix including supported installation methods, refer to Azure Storage.

This page assumes the core agent is already set up. If not, see Set up the APM .NET Agent first.

Add the Elastic.Apm.Azure.Storage NuGet package to your project:

Shell
dotnet add package Elastic.Apm.Azure.Storage

Subscribe to diagnostic events using the appropriate subscriber for your storage service:

  • If the agent is included by referencing the Elastic.Apm.NetCoreAll package, the subscribers will be automatically subscribed with the agent, and no further action is required.

  • If you’re using Azure.Storage.Blobs, subscribe AzureBlobStorageDiagnosticsSubscriber with the agent

    C#
    using Elastic.Apm;
    using Elastic.Apm.Azure.Storage;
    
    Agent.Subscribe(new AzureBlobStorageDiagnosticsSubscriber());
    
  • If you’re using Azure.Storage.Queues, subscribe AzureQueueStorageDiagnosticsSubscriber with the agent

    C#
    using Elastic.Apm;
    using Elastic.Apm.Azure.Storage;
    
    Agent.Subscribe(new AzureQueueStorageDiagnosticsSubscriber());
    
  • If you’re using Azure.Storage.Files.Shares, subscribe AzureFileShareStorageDiagnosticsSubscriber with the agent

    C#
    using Elastic.Apm;
    using Elastic.Apm.Azure.Storage;
    
    Agent.Subscribe(new AzureFileShareStorageDiagnosticsSubscriber());
    

For Azure Queue storage,

  • A new transaction is created when one or more messages are received from a queue
  • A new span is created when there is a current transaction, and when a message is sent to a queue

For Azure Blob storage, a new span is created when there is a current transaction and when a request is made to blob storage.

For Azure File Share storage, a new span is created when there is a current transaction and when a request is made to file storage.