# `ExUtcp.Monitoring.Metrics`
[🔗](https://github.com/universal-tool-calling-protocol/elixir-utcp/blob/main/lib/ex_utcp/monitoring/metrics.ex#L1)

Metrics collection and aggregation for ExUtcp operations.

Provides utilities for collecting, storing, and reporting metrics.

# `metric_type`

```elixir
@type metric_type() :: :counter | :gauge | :histogram | :summary
```

# `metric_value`

```elixir
@type metric_value() :: number() | [number()]
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `get_metric`

```elixir
@spec get_metric(String.t()) :: map() | nil
```

Gets metrics for a specific metric name.

# `get_metrics`

```elixir
@spec get_metrics() :: map()
```

Gets all collected metrics.

# `get_metrics_summary`

```elixir
@spec get_metrics_summary() :: map()
```

Gets metrics summary for reporting.

# `increment_counter`

```elixir
@spec increment_counter(String.t(), map()) :: :ok
```

Increments a counter metric.

# `observe_histogram`

```elixir
@spec observe_histogram(String.t(), number(), map()) :: :ok
```

Records a histogram observation.

# `observe_summary`

```elixir
@spec observe_summary(String.t(), number(), map()) :: :ok
```

Records a summary observation.

# `reset_metrics`

```elixir
@spec reset_metrics() :: :ok
```

Resets all metrics.

# `set_gauge`

```elixir
@spec set_gauge(String.t(), number(), map()) :: :ok
```

Sets a gauge metric value.

# `start_link`

```elixir
@spec start_link(keyword()) :: {:ok, pid()} | {:error, term()}
```

Starts the metrics collector.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
