You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing around with docker compose to start Business Central container, and wanted to add the InstrumentationString.
This failed as the Instrumentation string itself consists out of several key/value pairs split by a '=' ... the function to set customSettings can not handle this.
so I was wondering if it would make sense to replace that logic with something like :
functionSet-ConfigSetting { ...}
foreach ($customSettingin$customSettingsArray) {
# not so good:# $customSettingArray = $customSetting -split "="# $customSettingKey = $customSettingArray[0]# $customSettingValue = $customSettingArray[1]# maybe better ?!: mind the double assignment and the ,2$customSettingKey,$customSettingValue=$customSetting-split"=",2
OutPut old code:
ApplicationInsightsConnectionString
InstrumentationKey (<- this is what it actually set on the ST Server)
GUUUUUIDDDD;IngestionEndpoint
https://SOME.applicationinsights.azure.com;LiveEndpoint
https://SOME.monitor.azure.com;ApplicationId
MOREGUUUID
You are right, that if the key or the value contains a = - then the logic doesn't work and since the key never contains a =, your suggestion should be fine.
Feel free to create a PR with this. I will deploy a preview version and it will be included in the next update (around mid september)
Hi,
I was playing around with docker compose to start Business Central container, and wanted to add the InstrumentationString.
This failed as the Instrumentation string itself consists out of several key/value pairs split by a '=' ... the function to set customSettings can not handle this.
so I was wondering if it would make sense to replace that logic with something like :
OutPut old code:
Outpu new code:
Which looks more correct
The text was updated successfully, but these errors were encountered: