diff --git a/docs/root/development/features/admin_interface.rst b/docs/root/development/features/admin_interface.rst new file mode 100644 index 0000000000..54af194401 --- /dev/null +++ b/docs/root/development/features/admin_interface.rst @@ -0,0 +1,28 @@ +.. _admin_interface: + +Admin Interface +==================== + +You can read more about this Envoy's feature and how to use it [here|https://www.envoyproxy.io/docs/envoy/latest/operations/admin]. +By default, Envoy Mobiles does not come with an admin endpoint enabled. You can enable it in the following way. + +**Kotlin**:: + + builder.enableAdminInterface() + +**Swift**:: + + builder.enableAdminInterface() + +Envoy Mobile runs its administration interface on port 9901. + +One of the most common use cases for the interface is to check the state of all of the Envoy stats at a given moment. You can do this by running the following command: + +``` +> curl localhost:9901/stats +``` + +Please note that to make this command work when you are running an example app using Android emulator you need to set up port forwarding first: +``` +> adb forward tcp:9901 tcp:9901 +``` diff --git a/docs/root/development/features/stats.rst b/docs/root/development/features/stats.rst new file mode 100644 index 0000000000..a4fb2384c1 --- /dev/null +++ b/docs/root/development/features/stats.rst @@ -0,0 +1,18 @@ +.. _stats: + +Stats +============ + +Envoy and by extension Envoy Mobile implements a comprehensive set of stats +that may be used to monitor the health of the library and for debugging purposes. + +Envoy Mobile does not enable all of the Envoy stats by default. Instead, it +implements an allow list of stats that are allowed to be created on the client-side +and ingested to a remote service. The allow list can be found under `stats_config` +in the `library/common/config.cc` file. + +The original idea behind not enabling all Envoy stats by default was to limit +the usage of resources on the client: + +1. Lower the usage of memory and CPU resources by creating and maintaining the lower number of instances of stats +2. Reduce the cell data plan usage by ingesting less data to a remote service