Skip to content
Docs Try Aspire

AzureApplicationInsightsExtensions Methods

Class Methods 4 members
Provides extension methods for adding the Azure ApplicationInsights resources to the application model.
AddAzureApplicationInsights(IDistributedApplicationBuilder, string) Section titled AddAzureApplicationInsights(IDistributedApplicationBuilder, string) extension IResourceBuilder<AzureApplicationInsightsResource>
Adds an Azure Application Insights resource to the application model.
public static class AzureApplicationInsightsExtensions
{
public static IResourceBuilder<AzureApplicationInsightsResource> AddAzureApplicationInsights(
this IDistributedApplicationBuilder builder,
string name)
{
// ...
}
}
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder.
name string The name of the resource. This name will be used as the connection string name when referenced in a dependency.
IResourceBuilder<AzureApplicationInsightsResource> A reference to the ApplicationModel.IResourceBuilder`1.
AddAzureApplicationInsights(IDistributedApplicationBuilder, string, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>) Section titled AddAzureApplicationInsights(IDistributedApplicationBuilder, string, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>) extension IResourceBuilder<AzureApplicationInsightsResource>
Adds an Azure Application Insights resource to the application model.
public static class AzureApplicationInsightsExtensions
{
public static IResourceBuilder<AzureApplicationInsightsResource> AddAzureApplicationInsights(
this IDistributedApplicationBuilder builder,
string name,
IResourceBuilder<AzureLogAnalyticsWorkspaceResource>? logAnalyticsWorkspace)
{
// ...
}
}
builder IDistributedApplicationBuilder The Hosting.IDistributedApplicationBuilder.
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.
IResourceBuilder<AzureApplicationInsightsResource> A reference to the ApplicationModel.IResourceBuilder`1.
WithLogAnalyticsWorkspace(IResourceBuilder<AzureApplicationInsightsResource>, BicepOutputReference) Section titled WithLogAnalyticsWorkspace(IResourceBuilder<AzureApplicationInsightsResource>, BicepOutputReference) extension IResourceBuilder<AzureApplicationInsightsResource>
Configures the Application Insights resource to use an existing Log Analytics Workspace via a Azure.BicepOutputReference.
public static class AzureApplicationInsightsExtensions
{
public static IResourceBuilder<AzureApplicationInsightsResource> WithLogAnalyticsWorkspace(
this IResourceBuilder<AzureApplicationInsightsResource> builder,
BicepOutputReference workspaceId)
{
// ...
}
}
builder IResourceBuilder<AzureApplicationInsightsResource> The resource builder for AzureApplicationInsightsResource.
workspaceId BicepOutputReference The Azure.BicepOutputReference for the Log Analytics Workspace resource id.
IResourceBuilder<AzureApplicationInsightsResource> The ApplicationModel.IResourceBuilder`1 for chaining.
WithLogAnalyticsWorkspace(IResourceBuilder<AzureApplicationInsightsResource>, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>) Section titled WithLogAnalyticsWorkspace(IResourceBuilder<AzureApplicationInsightsResource>, IResourceBuilder<AzureLogAnalyticsWorkspaceResource>) extension IResourceBuilder<AzureApplicationInsightsResource>
Configures the Application Insights resource to use the specified Log Analytics Workspace resource.
public static class AzureApplicationInsightsExtensions
{
public static IResourceBuilder<AzureApplicationInsightsResource> WithLogAnalyticsWorkspace(
this IResourceBuilder<AzureApplicationInsightsResource> builder,
IResourceBuilder<AzureLogAnalyticsWorkspaceResource> logAnalyticsWorkspace)
{
// ...
}
}
builder IResourceBuilder<AzureApplicationInsightsResource> The resource builder for AzureApplicationInsightsResource.
logAnalyticsWorkspace IResourceBuilder<AzureLogAnalyticsWorkspaceResource> The resource builder for the Azure.AzureLogAnalyticsWorkspaceResource.
IResourceBuilder<AzureApplicationInsightsResource> The ApplicationModel.IResourceBuilder`1 for chaining.