[id='enabling-statistics-embedded_{context}']
= Enabling statistics in embedded caches

Configure {brandname} to export statistics for the cache manager and embedded caches.

.Procedure

. Open your {brandname} configuration for editing.
. Add the `statistics="true"` attribute or the `.statistics(true)` method.
. Save and close your {brandname} configuration.

[discrete]
== Embedded cache statistics

.XML
[source,xml,options="nowrap",subs=attributes+,role="primary"]
----
include::xml/statistics_embedded.xml[]
----

.GlobalConfigurationBuilder
[source,java,options="nowrap",subs=attributes+,role="secondary"]
----
include::code_examples/StatisticsGlobalConfigurationBuilder.java[]
----
