Our company wants to encrypt the Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString value in the cscfg file. I understand that if we do this we won't be able to fully use the black magic of Azure Diagnostics, but from what I can find it seems like we lose much of it's help if we don't use all of it, or if we deviate from its canned use case at all.
Ideally I expected that we'd have to disable the automatic starting of the diagnostic monitor. And in our OnStart, I'd get the encrypted connection string and decrypt it. Call some method to get a DiagnosticMonitorConfiguration object from my diagnostics.wadcfg file, and start the DiagnosticMonitor passing in my decrypted connection string and configuration.
But it seems as though there is no methods exposed to read the diagnostics.wadcfg file. I don't want to write my own reader for this, or write my own configuration file. But I don't want to hardcode my configuration, which seems to be what everyone does who is starting the DiagnosticMonitor manually.
Is there a class that would read this configuration? Or is there some other mechanism where I can reuse most of the Diagnostics magic, but just inject the connection string manually? I expected this to be very easy, but it's looking like Microsoft didn't really think about making this framework very robust.