> For the complete documentation index, see [llms.txt](https://tochemey.gitbook.io/goakt/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tochemey.gitbook.io/goakt/features/observability.md).

# Observability

Observability is key in distributed system. It helps to understand and track the performance of a system. GoAkt offers out of the box features that can help track, monitor and measure the performance of a GoAkt based system.

## **Metrics**

GoAkt comes bundled with the following metrics:

### **Actor System Metric**

The **`Metric`** method on the [actor system](https://github.com/Tochemey/goakt/blob/main/actor/actor_system.go#L74) will provide the following counters:

* Total Number of actors in the system at a given point time
* Total Number of deadletter
* The number of seconds since the actor system started

### **Actor Metric**

The **`Metric`** method on the [PID](https://github.com/Tochemey/goakt/blob/main/actor/pid.go#L226) will provide the following counters:

* Total Number of children at a given point in time
* Total Number of messages stashed at a given point in time
* Total Number of Restarts at a given point in time
* Last message received processing duration in milliseconds
* Total Number of deadletter
* The number of seconds since the actor started
* Total Number of Failures at a given point in time
* Total Number of Reinstate at given point in time.

## **Logging**

A simple logging interface to allow custom logger to be implemented instead of using the default logger.

## Instrumentation

GoAkt also via [OpenTelemetry](https://opentelemetry.io/docs/languages/go/) can export the above metrics that can be collected via an OpenTelemetry collector. To be able to export metrics one need to start the `ActorSystem` with the option **`WithMetrics`**.

> Remember to initialize the OpenTelemetry meter SDK before starting the actor system with the metrics option enabled
