# `SparkEx.Observation`
[🔗](https://github.com/lukaszsamson/spark_ex/blob/v0.1.1/lib/spark_ex/observation.ex#L1)

Collects metrics observed during query execution.

Observations are identified by a name. Use `SparkEx.DataFrame.observe/3`
to attach an observation to a DataFrame plan, then access the metrics
with `get/1` after an action is executed.

# `t`

```elixir
@type t() :: %SparkEx.Observation{name: String.t()}
```

# `get`

```elixir
@spec get(t()) :: map()
```

Returns the observed metrics map for this observation.

Raises if the observation was never attached via `DataFrame.observe/3`.

# `new`

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

Creates a named observation. When called with no arguments, generates a UUID name.

---

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