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
{ | |
"data": { | |
"baseData": { | |
"application_Version": "9.0.0.2090", | |
"properties": { | |
"orgName": "test.crm.dynamics.com", | |
"source": "Microsoft Flow" | |
}, | |
"severityLevel": null, | |
"ver": 2, |
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
{ | |
"data": { | |
"baseData": { | |
"application_Version": "9.0.0.2090", | |
"dependencies": null, | |
"exceptions": null, | |
"measurements": null, | |
"message": null, | |
"metrics": [ | |
{ |
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
{ | |
"data": { | |
"baseData": { | |
"application_Version": "9.0.0.2090", | |
"dependencies": null, | |
"exceptions": null, | |
"measurements": { | |
"SomethingTrackableNumber": 100 | |
}, | |
"message": null, |
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
{ | |
"data": { | |
"baseData": { | |
"application_Version": "9.0.0.2090", | |
"dependencies": null, | |
"exceptions": null, | |
"measurements": null, | |
"message": "Hello world", | |
"metrics": null, | |
"properties": { |
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
public void Execute(IServiceProvider serviceProvider) | |
{ | |
ITracingService tracer = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); | |
MethodTimeLogger.Tracer = tracer; | |
// What manually setting up method timing might look like | |
ManualTimer(tracer); | |
// What using IL weaving to inject logging looks like |
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
string vaultName = "https://myvaulttest.vault.azure.net"; | |
string secretName = "MyPassword"; | |
//Retrieve the latest version of a secret by name | |
var getKeyByNameTask = Task.Run(async () => await GetSecretByName(token, vaultName, secretName)); | |
Task.WaitAll(getKeyByNameTask); | |
if (getKeyByNameTask.Result == null) | |
throw new InvalidPluginExecutionException("Error retrieving secret versions from key vault"); | |
var retrievedSecretUrl = getKeyByNameTask.Result; | |
// Retrieve a secret by its url |
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
string secretUrl = "https://myvaulttest.vault.azure.net/secrets/MyPassword/00000000000000000000000000000000"; | |
//Retrieve a secret by its url | |
var getKeyByUrlTask1 = Task.Run(async () => await GetSecretByUrl(token, secretUrl)); | |
Task.WaitAll(getKeyByUrlTask1); | |
if (getKeyByUrlTask1.Result == null) | |
throw new InvalidPluginExecutionException("Error retrieving secret value from key vault"); | |
//Deserialize the vault response to get the secret | |
GetSecretResponse getSecretResponse1 = DeserializeResponse<GetSecretResponse>(getKeyByUrlTask1.Result); | |
//returnedValue is the Azure Key Vault Secret |
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
string clientId = "00000000-0000-0000-0000-000000000000"; | |
string clientSecret = "00000000000000000000000000000000000000000000"; | |
string tenantId = "00000000-0000-0000-0000-000000000000"; | |
//Retrieve the access token required for authentication | |
var getTokenTask = Task.Run(async () => await GetToken(clientId, clientSecret, tenantId)); | |
Task.WaitAll(getTokenTask); | |
if (getTokenTask.Result == null) | |
throw new InvalidPluginExecutionException("Error retrieving access token"); | |
//Deserialize the token response to get the access token |