In this step we will investigate much more about world trade.
How do I use bring good actuator where you seem just like everything else it's getting booed using an
actuator is also really very simple.
All that I need to do is good for America.
And you have guessed it right.
I just need to add stuff for actuator.
So I'm copping the start of a verb and changing the starter name to actually after that it implies that
I didn't start to fracture it.
So what does the actuator bring in.
Actually it actually brings in a lot of monitoring around your application.
So in actuator you'd be able to read a lot of data about the application.
Let's say you want to see water the beans that are configured.
You want to see how or the configuration has worked you want to see how many times the specific services
called you want to see how many times a specific service has failed.
All that kind of stuff you can check in your actuator and all that I need to do to enable that is in
something called an actuator in springboard start the actuator actually exposes a lot of the rest services
and these services are compliant with the standard called had standard.
And we would use a browser so that we can browse through the data which is provided by these services
and then see for file browser it spring bitterest help browser.
So it's spring data rest Hal.
So you can take the project up the group ID should actually be data it offspring from a data spring
that at least has a browser.
So once we add dependency for that the whole browser would be configured among our dependencies.
Now you can see all the dependencies in the independent It's been a good start actually it has been
good actually to spend the rest have a browser that's cool.
One of the important things to remember is that the actuator you are Lil's have been changing quite
a lot across spring board release this spring boot one dart X the UL and was local host 88 slash actuator
and later in the earlier versions of spring.
Two point zero point zero the milestone is this it was last 88 slash application.
No.
Again we are back to look closely at the slash actuator.
So this is the you are going to launch the actuator.
I mean this is after two point zero point zero dot release the released localhost ADHD slash.
Actually it does not work and probably you can you know close ADHD Sless application right once you
type in local host ADHD Slish actuator.
This is what you'd be saying if you're using anything rated to point to the point really as you'd see
three Juelz coming in.
Right.
So these are the helmet and the informed.
So if I click help you'd see they held up the applications up and running.
That's cool.
Right.
And the other one is the Imphal there's not a lot of info here right now if there is a lot of stuff
that actuator for whites to enable that you'd need to configure but how do I do that the way you can
with that is you are piggishness properties and type in management endpoint of web exposure that include
a sequel to the sequel to what we are doing in here is we are enabling the Verba exposure.
So the exposure or DP of all the management in points.
One of the important things to remember is when you enable a lot of tracking a lot of auditing.
What would happen is there would be a performance impact as well.
One of the recommendations is to identify which of the things that you would want and only enable those.
But for now we are taking a shortcut.
We are enabling everything management points web exposure that include physical stuff all the things
you would already know is the fact that if I type in controlled space or comment space you see a drop
coming in.
This is because of something called Spring tools plug in.
So theres an eclipse plugin called Spring tools so you can see that I can see what develop properties
it all to validate the values of these properties and things like that we configured management or the
endpoints that we have got exposure to not include is just to save it and restart your application to
make use make sure that you stop and start your application and go and refresh the actuator.
You would see that now there are many more articles which are present in here.
So you would see a lot of RL which are coming up in here.
The other thing we can type in this localhost ADHD we have already added in the whole browser.
Let's zoom out a little bit.
So we added in the hull brothers so if you type in localhost ADHD you go to the browser and we can use
help browser to browse through the actual as I can type in slash actuator in here.
So all that I need to do is type in slash actuator that you are in for the actual in here and I can
start looking through all the things related to actuator directly from here.
Let's look at a few of these things that the actuator is exposing the oddity Ventas related to security.
Or did you want to show that users were properly validated.
How many people failed the authentication and all that kind of stuff.
Beans is an interesting thing.
And picking beans they Sutro all disappearing beans that are configured right.
Praying is a dependency management playbook and it manages all the beant it creates all the components
for you and you can look at all the beans that spring has created for you.
You can also check the health of the application its up.
Conditions is another interesting thing as we have this because it knows being good is all about auto
configuration.
There is a lot of stuff that to bring boot or to configure conditions so it exposes the positive matches
which are all the conditions that matched as well as if you search for negative matches the conditions
which did not match.
So it would draw a list of bins which are configured which are not contrie good and all that kind of
stuff.
You can also get the details of configuration properties.
And we don't mind loggers which are on pre-code You can also get them to read them.
And also you can get a few metrics as well so if you go to the metrics I can see a list of metrics which
are valid.
So let's say I would want to find out how much memory is used.
So I can say I can copy this JVM memory used and add it in here.
So slash GBM maybe got used to go.
You would see the value of the amount of memory that is being used.
The same thing can be done with other metrics as well.
So if I go back to the actual metrics you can see that there are a wide variety of metrics that are
being exposed in here C.P usage and all that kind of stuff.
If I go back to the actuator I can also see this stuff do to us that is an interesting thing called
HTP trees which should all the requests that were executed.
So it shows that this is a request which is coming in.
Somebody tried to access the actuator.
This is the response which when bag the time taken is so and so.
So you can see all the details of the previous requests that were executed.
The important thing is to remember that this would have a performance impact.
Right you cannot enable it in protection.
This is useful to raise a few requests but obviously you would not want to enable it to decrease in
production for all that it was the last one which is present in here is the mappings mappings shows
all the different things that are mapped to our eyes right over and over.
We are creating a web application or a web service.
We are mapping a lot of it when we are adding the dependency on actuator we add a few others as well.
So you can see all the mappings in here.
The idea behind this week was to quickly give you an overview of what are all the things you can do
with actually if some of the information you've seen here is complex and you are finding it difficult
to understand.
No problem at all.
The most important thing to understand is in future if you need any such information there is one place
you can go to that actuate and then the next step.
Barbara.