Skip to content

Back End Team Task #4: Develop Azure Function that transforms Base64 encoded JSON property and logs this in App Insights

hken920 edited this page Jan 27, 2020 · 17 revisions

Step 1:

Step2:

  • Copy encoded base64 from step #1 and paste to end of URL below

https://ken-fun-feat-usw2-task5.azurewebsites.net/api/base64decode?code=zDPBuJFjpO7FX7u1zPECPLa1x5IY5USgxi77/wwR44r1ioOzGgZueQ==&base64Decode=

 Example: https://ken-fun-feat-usw2-task5.azurewebsites.net/api/base64decode?code=zDPBuJFjpO7FX7u1zPECPLa1x5IY5USgxi77/wwR44r1ioOzGgZueQ==&base64Decode=<encoded base64 message here>
  • Output in web browser should show --> Output: decoded message

Step3.

  • sign in Azure portal > search and select Function Apps > ken-fun-feat-usw2-task5 > Monitor (located on the left).

Step4.

  • To see the logs for a particular function invocation, select the Date column link for that invocation.

Step5.

  • Under "Invocation Details" click Run in Applications Insights

Log should look something similar to this:

1/27/2020, 12:38:31.281 AM	Executing 'Functions.base64Decode' (Reason='This function was programmatically called via the host APIs.', Id=79110850-793b-479f-b353-d4c6bf06ab9f)	Information	
1/27/2020, 12:38:31.291 AM	Python HTTP trigger function processed a request.	Information	
1/27/2020, 12:38:31.294 AM	Base64 decode complete. Output: b'ken hsu north seattle college'	Information	
1/27/2020, 12:38:31.297 AM	Executed 'Functions.base64Decode' (Succeeded, Id=79110850-793b-479f-b353-d4c6bf06ab9f)	Information	
Clone this wiki locally