Skip to content

Commit e371fb8

Browse files
authored
Merge pull request #13 from data-platform-hq/auto-instrumentation
feat: add auto-instrumentation for Java
2 parents 22e425a + 1ed0a49 commit e371fb8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

main.tf

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@ resource "azurerm_monitor_diagnostic_setting" "this" {
4040

4141
locals {
4242
app_settings = {
43-
WEBSITES_ENABLE_APP_SERVICE_STORAGE = "true"
44-
WEBSITE_ENABLE_SYNC_UPDATE_SITE = "true"
45-
JAVA_OPTS = "-Dlog4j2.formatMsgNoLookups=true"
46-
LOG4J_FORMAT_MSG_NO_LOOKUPS = "true"
47-
WEBSITE_USE_PLACEHOLDER = "0"
48-
AZURE_LOG_LEVEL = "info"
49-
APPINSIGHTS_INSTRUMENTATIONKEY = var.enable_appinsights ? azurerm_application_insights.this[0].instrumentation_key : ""
43+
WEBSITES_ENABLE_APP_SERVICE_STORAGE = "true"
44+
WEBSITE_ENABLE_SYNC_UPDATE_SITE = "true"
45+
JAVA_OPTS = "-Dlog4j2.formatMsgNoLookups=true"
46+
LOG4J_FORMAT_MSG_NO_LOOKUPS = "true"
47+
WEBSITE_USE_PLACEHOLDER = "0"
48+
AZURE_LOG_LEVEL = "info"
49+
APPINSIGHTS_INSTRUMENTATIONKEY = var.enable_appinsights ? azurerm_application_insights.this[0].instrumentation_key : null
50+
ApplicationInsightsAgent_EXTENSION_VERSION = var.enable_appinsights && var.application_type == "java" ? "~3" : null
5051
}
5152
application_stack_struct = {
5253
docker_image = null

0 commit comments

Comments
 (0)