Table of Contents

Class ApplicationBuilderExtensions

Namespace
Elastic.Apm.NetCoreAll
Assembly
Elastic.Apm.NetCoreAll.dll
public static class ApplicationBuilderExtensions
Inheritance
ApplicationBuilderExtensions
Inherited Members

Methods

UseAllElasticApm(IApplicationBuilder, IConfiguration)

Adds the Elastic APM Middleware to the ASP.NET Core pipeline and enables Elastic.Apm.DiagnosticSource.HttpDiagnosticsSubscriber, Elastic.Apm.EntityFrameworkCore.EfCoreDiagnosticsSubscriber, Elastic.Apm.Instrumentations.SqlClient.SqlClientDiagnosticSubscriber, Elastic.Apm.Elasticsearch.ElasticsearchDiagnosticsSubscriber. Elastic.Apm.GrpcClient.GrpcClientDiagnosticSubscriber, Elastic.Apm.Azure.ServiceBus.AzureMessagingServiceBusDiagnosticsSubscriber, Elastic.Apm.Azure.ServiceBus.MicrosoftAzureServiceBusDiagnosticsSubscriber, Elastic.Apm.Azure.Storage.AzureBlobStorageDiagnosticsSubscriber, Elastic.Apm.Azure.Storage.AzureQueueStorageDiagnosticsSubscriber, Elastic.Apm.Azure.Storage.AzureFileShareStorageDiagnosticsSubscriber, Elastic.Apm.Azure.CosmosDb.AzureCosmosDbDiagnosticsSubscriber, and Elastic.Apm.MongoDb.MongoDbDiagnosticsSubscriber. This method turns on ASP.NET Core monitoring with every other related monitoring components, for example the agent will also automatically trace outgoing HTTP requests and database statements.

[Obsolete("This extension is maintained for backward compatibility. We recommend registering the agent via the IServiceCollection using the AddAllElasticApm extension method instead. This method may be removed in a future release.")]
public static IApplicationBuilder UseAllElasticApm(this IApplicationBuilder builder, IConfiguration configuration = null)

Parameters

builder IApplicationBuilder

Builder.

configuration IConfiguration

You can optionally pass the IConfiguration of your application to the Elastic APM Agent. The agent reads agent-related configuration from the IConfiguration instance, and uses it to configure the agent. If no IConfiguration is provided, the agent reads agent-related configuration from environment variables.

Returns

IApplicationBuilder

The application builder instance