-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Changed to add workspace-based application insights * update document * Change where monitor is defined * fixed library version
- Loading branch information
1 parent
67e7dbf
commit cc05bab
Showing
9 changed files
with
98 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
5.internal-document-search/infra/core/monitor/applicationinsights.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
param name string | ||
param location string = resourceGroup().location | ||
param tags object = {} | ||
param workspaceId string | ||
|
||
resource applicationInsights 'Microsoft.Insights/components@2020-02-02' = { | ||
name: name | ||
location: location | ||
tags: tags | ||
kind: 'web' | ||
properties: { | ||
Application_Type: 'web' | ||
WorkspaceResourceId: workspaceId | ||
} | ||
} | ||
|
||
output connectionString string = applicationInsights.properties.ConnectionString | ||
output instrumentationKey string = applicationInsights.properties.InstrumentationKey | ||
output name string = applicationInsights.name |
12 changes: 12 additions & 0 deletions
12
5.internal-document-search/infra/core/monitor/loganalytics.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
param workspaceName string = '' | ||
param location string = resourceGroup().location | ||
param tags object = {} | ||
|
||
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2020-03-01-preview' = { | ||
name: workspaceName | ||
location: location | ||
tags: tags | ||
} | ||
|
||
|
||
output wokspaceId string = logAnalyticsWorkspace.id |
28 changes: 28 additions & 0 deletions
28
5.internal-document-search/infra/core/monitor/monitoring.bicep
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
param applicationInsightsName string | ||
param workspaceName string | ||
param location string = resourceGroup().location | ||
param tags object = {} | ||
|
||
module locanalytics 'loganalytics.bicep' = { | ||
name: 'loganalytics' | ||
params: { | ||
workspaceName: workspaceName | ||
location: location | ||
tags: tags | ||
} | ||
} | ||
|
||
module applicationInsights 'applicationinsights.bicep' = { | ||
name: 'applicationinsights' | ||
params: { | ||
name: applicationInsightsName | ||
location: location | ||
tags: tags | ||
workspaceId: locanalytics.outputs.wokspaceId | ||
} | ||
} | ||
|
||
output applicationInsightsConnectionString string = applicationInsights.outputs.connectionString | ||
output applicationInsightsInstrumentationKey string = applicationInsights.outputs.instrumentationKey | ||
output applicationInsightsName string = applicationInsights.outputs.name | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters