Skip to content

Commit

Permalink
feat(KUI-1306): switch from deprecated instrumentationKey to connecti…
Browse files Browse the repository at this point in the history
…on string for app insights
  • Loading branch information
Karl Andin authored and karlandindrakryggen committed May 14, 2024
1 parent 4983a8c commit f97924d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .azure/prod.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"API_KEYS_4",
"API_KEYS_5",
"API_KEYS_6",
"APPINSIGHTS_INSTRUMENTATIONKEY",
"APPLICATIONINSIGHTS_CONNECTION_STRING",
"MONGODB_URI"
]
},
Expand Down
2 changes: 1 addition & 1 deletion .azure/ref.parameters.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"API_KEYS_3",
"API_KEYS_4",
"API_KEYS_5",
"APPINSIGHTS_INSTRUMENTATIONKEY",
"APPLICATIONINSIGHTS_CONNECTION_STRING",
"MONGODB_URI"
]
},
Expand Down
2 changes: 1 addition & 1 deletion .env.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
MONGODB_URI=[Connection String from Azure, how to change it read in Readme, https://github.com/KTH/kurs-pm-data-api/blob/master/README.md#prepara-database-in-azure]
API_KEYS_0=?name=kursinfo-web&apiKey=[generate a password for public pages]&scope=read
API_KEYS_1=?name=kurs-pm-data-admin-web&apiKey=[generate a password for public pages]&scope=write&scope=read
APPINSIGHTS_INSTRUMENTATIONKEY=[Azure, Application insights, Instrumentation Key, can be found in Overview]
APPLICATIONINSIGHTS_CONNECTION_STRING=[Azure, Application insights, connection string, can be found in Overview]
USE_COSMOS_DB=true
LOGGING_ACCESS_LOG=debug
SERVER_PORT=3001 [if you want to change port]
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Secrets during local development are ALWAYS stored in a `.env`-file in the root
MONGODB_URI=mongodb://kurs-pm-data-api-stage-mongodb-kthse:[password, specified in Azure]==@kurs-pm-data-api-stage-mongodb-kthse.documents.azure.com:[port, specified in Azure]/kursinfo?ssl=true&authSource=kursinfo
API_KEYS_0=?name=kursinfo-web&apiKey=[generate a password for public pages]&scope=read
API_KEYS_1=?name=kurs-pm-data&apiKey=[generate a password for admin page]&scope=write&scope=read
APPINSIGHTS_INSTRUMENTATIONKEY=[Azure, Application insights, Instrumentation Key, can be found in Overview]
APPLICATIONINSIGHTS_CONNECTION_STRING=[Azure, Application insights, connection string, can be found in Overview]
USE_COSMOS_DB='true'
LOGGING_ACCESS_LOG=debug
SERVER_PORT=3001 [if you want to change port]
Expand Down Expand Up @@ -122,7 +122,7 @@ Password find in gsv-key vault
MONGODB_URI=mongodb://kurs-pm-data-api-mongodb-kthse:[password, specified in Azure]==@kurs-pm-data-api-mongodb-kthse.documents.azure.com:[port, specified in Azure]/kursinfo?ssl=true&authSource=kursinfo
API_KEYS_0=?name=kursinfo-web&apiKey=[generate a password for public pages]&scope=read
API_KEYS_1=?name=kurs-pm-data-admin-web&apiKey=[generate a password for admin page]&scope=write&scope=read
APPINSIGHTS_INSTRUMENTATIONKEY=[Azure, Application insights, Instrumentation Key, can be found in Overview]
APPLICATIONINSIGHTS_CONNECTION_STRING=[Azure, Application insights, connection string, can be found in Overview]
```

## Author
Expand Down
5 changes: 0 additions & 5 deletions config/serverSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,4 @@ module.exports = {
useAccessLog: safeGet(() => getEnv('LOGGING_ACCESS_LOG'), 'true') === 'true',
},
},

// Azure Application Insights
appInsights: {
instrumentationKey: getEnv('APPINSIGHTS_INSTRUMENTATIONKEY'),
},
}

0 comments on commit f97924d

Please sign in to comment.