Freigeben über


AzureApplicationInsightsExtensions.AddAzureApplicationInsights Method

Definition

Overloads

AddAzureApplicationInsights(IDistributedApplicationBuilder, String)

Adds an Azure Application Insights resource to the application model.

AddAzureApplicationInsights(IDistributedApplicationBuilder, String, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>)

Adds an Azure Application Insights resource to the application model.

AddAzureApplicationInsights(IDistributedApplicationBuilder, String, Action<IResourceBuilder<AzureApplicationInsightsResource>,ResourceModuleConstruct, ApplicationInsightsComponent>)

Adds an Azure Application Insights resource to the application model.

AddAzureApplicationInsights(IDistributedApplicationBuilder, String, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>, Action<IResourceBuilder<AzureApplicationInsightsResource>, ResourceModuleConstruct,ApplicationInsightsComponent>)

Adds an Azure Application Insights resource to the application model.

AddAzureApplicationInsights(IDistributedApplicationBuilder, String)

Source:
AzureApplicationInsightsExtensions.cs
Source:
AzureApplicationInsightsExtensions.cs

Adds an Azure Application Insights resource to the application model.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource> AddAzureApplicationInsights (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name);
static member AddAzureApplicationInsights : Aspire.Hosting.IDistributedApplicationBuilder * string -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource>
<Extension()>
Public Function AddAzureApplicationInsights (builder As IDistributedApplicationBuilder, name As String) As IResourceBuilder(Of AzureApplicationInsightsResource)

Parameters

name
String

The name of the resource. This name will be used as the connection string name when referenced in a dependency.

Returns

A reference to the IResourceBuilder<T>.

Applies to

AddAzureApplicationInsights(IDistributedApplicationBuilder, String, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>)

Source:
AzureApplicationInsightsExtensions.cs
Source:
AzureApplicationInsightsExtensions.cs

Adds an Azure Application Insights resource to the application model.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource> AddAzureApplicationInsights (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureLogAnalyticsWorkspaceResource>? logAnalyticsWorkspace);
static member AddAzureApplicationInsights : Aspire.Hosting.IDistributedApplicationBuilder * string * Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureLogAnalyticsWorkspaceResource> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource>
<Extension()>
Public Function AddAzureApplicationInsights (builder As IDistributedApplicationBuilder, name As String, logAnalyticsWorkspace As IResourceBuilder(Of AzureLogAnalyticsWorkspaceResource)) As IResourceBuilder(Of AzureApplicationInsightsResource)

Parameters

name
String

The name of the resource. This name will be used as the connection string name when referenced in a dependency.

logAnalyticsWorkspace
IResourceBuilder<AzureLogAnalyticsWorkspaceResource>

A resource builder for the log analytics workspace.

Returns

A reference to the IResourceBuilder<T>.

Applies to

AddAzureApplicationInsights(IDistributedApplicationBuilder, String, Action<IResourceBuilder<AzureApplicationInsightsResource>,ResourceModuleConstruct, ApplicationInsightsComponent>)

Source:
AzureApplicationInsightsExtensions.cs

Adds an Azure Application Insights resource to the application model.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource> AddAzureApplicationInsights (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource>,Aspire.Hosting.ResourceModuleConstruct,Azure.Provisioning.ApplicationInsights.ApplicationInsightsComponent>? configureResource);
static member AddAzureApplicationInsights : Aspire.Hosting.IDistributedApplicationBuilder * string * Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource>, Aspire.Hosting.ResourceModuleConstruct, Azure.Provisioning.ApplicationInsights.ApplicationInsightsComponent> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource>
<Extension()>
Public Function AddAzureApplicationInsights (builder As IDistributedApplicationBuilder, name As String, configureResource As Action(Of IResourceBuilder(Of AzureApplicationInsightsResource), ResourceModuleConstruct, ApplicationInsightsComponent)) As IResourceBuilder(Of AzureApplicationInsightsResource)

Parameters

builder
IDistributedApplicationBuilder

The builder for the distributed application.

name
String

The name of the resource.

configureResource
Action<IResourceBuilder<AzureApplicationInsightsResource>,ResourceModuleConstruct,ApplicationInsightsComponent>

Optional callback to configure the Application Insights resource.

Returns

Applies to

AddAzureApplicationInsights(IDistributedApplicationBuilder, String, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>, Action<IResourceBuilder<AzureApplicationInsightsResource>, ResourceModuleConstruct,ApplicationInsightsComponent>)

Source:
AzureApplicationInsightsExtensions.cs

Adds an Azure Application Insights resource to the application model.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource> AddAzureApplicationInsights (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureLogAnalyticsWorkspaceResource>? logAnalyticsWorkspace, Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource>,Aspire.Hosting.ResourceModuleConstruct,Azure.Provisioning.ApplicationInsights.ApplicationInsightsComponent>? configureResource);
static member AddAzureApplicationInsights : Aspire.Hosting.IDistributedApplicationBuilder * string * Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureLogAnalyticsWorkspaceResource> * Action<Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource>, Aspire.Hosting.ResourceModuleConstruct, Azure.Provisioning.ApplicationInsights.ApplicationInsightsComponent> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.Azure.AzureApplicationInsightsResource>
<Extension()>
Public Function AddAzureApplicationInsights (builder As IDistributedApplicationBuilder, name As String, logAnalyticsWorkspace As IResourceBuilder(Of AzureLogAnalyticsWorkspaceResource), configureResource As Action(Of IResourceBuilder(Of AzureApplicationInsightsResource), ResourceModuleConstruct, ApplicationInsightsComponent)) As IResourceBuilder(Of AzureApplicationInsightsResource)

Parameters

builder
IDistributedApplicationBuilder

The builder for the distributed application.

name
String

The name of the resource.

logAnalyticsWorkspace
IResourceBuilder<AzureLogAnalyticsWorkspaceResource>

A resource builder for the log analytics workspace.

configureResource
Action<IResourceBuilder<AzureApplicationInsightsResource>,ResourceModuleConstruct,ApplicationInsightsComponent>

Optional callback to configure the Application Insights resource.

Returns

Applies to