Leon Welicki: Hello there and thank you very much for
joining us today in this new Azure Portal How To video.
Although we are working from home, we are still working
hard, and we wanted to share all the awesome new stuff
that is coming in the portal to make complex
things easy.
Today I’m joined by Byron Tardif, who’s also joining us
from his home, and he’s going to show us how to monitor
Azure Functions.
So, thank you very much for joining us, Byron.
Byron Tardif: Thank you very, Leon. Hello, everybody at
home. What we’re going to show today is basically the
GA’ing of the new portal experience for Azure Functions.
And specifically, we’re going to dial into the monitoring
aspects of how to monitor a function, how to see what’s
going on, even when you’re not in the portal.
So with that, we’re going to dive right into the demo.
In this Azure How To video, I’m going to show you how to
monitor an Azure Function. We’re going to dive right in by
clicking into this function.
And the first thing we’re going to
notice is that this is the new GA experience for managing
functions in the Azure
Portal. It’s a lot more consistent
with the rest of the Azure Portal, including metrics in the
overview blade. So, this is something that’s new for
functions. We have the ability to show you metrics that are
collecting all of the information
for all of the individual
functions that exist within your function app.
So in this case, I have multiple functions deployed to this
function app, so I can see an aggregate of all the
executions, an aggregate of the memory that is being
consumed by these individual functions. I can also jump
into the specific function
that I want to look at, and I will
get the metrics that are in this case scoped to this
specific function.
As with any other resource in Azure, you can now click
directly into the monitoring view, where you can basically
customize this query and query for any of the different
metrics that are supported for an Azure Function.
I can also go over here to the code editor. And one of the
things that we were working on is first giving you the
ability to have more control over your real estate,
so now this basically conforms to the browser window.
I don’t get a bunch of different scroll bars. And what you’ll
see is that I can basically run this and get logs directly
here in the portal. In the old experience, we didn’t have
the ability to provide this log streaming functionality for all
the different combinations of flavors for Azure Functions.
But now it doesn’t matter if you’re doing, for example,
a Python app running on a Linux host, hosted on a
consumption plan or the serverless mode and doing local
development where you’re pushing the code from GitHub
or your Visual Studio Code instance running directly on
your machine or if you’re doing in portal editing using C#
and the Windows host and hosting it in a premium function
plan, this experience is going to be consistent and we have
this functionality across the board.
Next thing that I wanted to show you is this monitoring
view. This is really good to getting a glance of what is my
executions over the last
couple of days. In this case, I can
see that over the last 30 days have had about 3,000
executions, and we can filter here based on status code or
if you have a specific
operation ID that you want to look
for specifically when you’re doing debugging of a specific
function, you can filter it here. But what I usually do is I
jump all the way over into the Application Insights
experience because it has a much richer querying
interface. So in this case if I wanted to see any function
that took more than ten milliseconds to execute, I could
adjust a query. You can see that you have the IntelliSense
built right in. So, we said durations greater than ten
milliseconds. And here we go, all of these functions took
11, 12 milliseconds to execute.
Now the other thing that’s really powerful here is if this
was a query that was
interesting to me that was basically
giving me a signal for something
that I wanted to monitor
even when I wasn’t looking at the portal, I can go here
and create a new alert that will basically go and execute
this query. We can see the query right here where it’s
looking at duration greater than ten milliseconds.
And what we can do is let’s say if there’s over 100 function
executions that had over ten milliseconds of duration,
and we want to do that every ten minutes, basically look
at a 10-minute window every five minutes, I can do that
and it’s going to tell me what is my estimated cost for
running this query every month.
And then I can choose to do something about it.
For example, I can send an email or trigger a web hook
with a specific payload if I’m using, for example, things like
pager duty or if we have other built-in monitoring or
ticketing tools, you can
basically trigger a ticket directly
from here.
And then finally, we also have a log tab where, again,
this is basically the same streaming log experience that we
showed in the coding test. But you can also from here
jump directly into the live metrics view for Application
Insights that basically gives you those hot path metrics
that are coming literally as requested are coming in.
So with that, we can see that we have a very new
experience for Azure Functions in the portal that is
consistent with other Azure resources that leverages all of
the functionality that already exists and that you should
already be familiar with Azure Monitor. And it lets you view
metrics and events that are happening both at the function
app level as well as the individual functions.
Leon: That was great, Byron. Thank you very much.
And thanks, every one of
you, for watching. Please try this
out and let us know what you think. Leave us a comment
in the comments section, follow us on Twitter, and look
forward to seeing you in the next video. Bye for now.