# `Hephaestus.Telemetry.Metrics`
[🔗](https://github.com/hephaestus-org/hephaestus_core/blob/v0.3.1/lib/hephaestus/telemetry/metrics.ex#L1)

Pre-built `Telemetry.Metrics` definitions for Hephaestus workflow events.

Returns metric definitions compatible with any reporter (Prometheus, StatsD,
LiveDashboard, etc.). Use `metrics/1` with a `:scope` option to filter by
`:workflow`, `:step`, or `:engine`.

## Usage

    # All metrics
    Hephaestus.Telemetry.Metrics.metrics()

    # Only workflow metrics
    Hephaestus.Telemetry.Metrics.metrics(scope: :workflow)

## Integration with LiveDashboard

    live_dashboard "/dashboard",
      metrics: {Hephaestus.Telemetry.Metrics, :metrics}

# `scope`

```elixir
@type scope() :: :workflow | :step | :engine
```

# `metrics`

```elixir
@spec metrics(keyword()) :: [Telemetry.Metrics.t()]
```

Returns a list of `Telemetry.Metrics` definitions for Hephaestus events.

## Options

  * `:scope` - Filter metrics by scope. One of `:workflow`, `:step`, or `:engine`.
    When omitted, returns all metrics.

---

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