# `Codex.Telemetry`
[🔗](https://github.com/nshkrdotcom/codex_sdk/blob/v0.18.1/lib/codex/telemetry.ex#L1)

Telemetry helpers and default logging for Codex events.

# `telemetry_event`

```elixir
@type telemetry_event() :: [atom()]
```

# `attach_default_logger`

```elixir
@spec attach_default_logger(keyword()) :: :ok | {:error, :already_exists}
```

Attaches the default logger to thread telemetry events.

# `configure`

```elixir
@spec configure(keyword()) :: :ok
```

Configures OpenTelemetry exporting if the required environment variables are present.

Reads `CODEX_OTLP_ENDPOINT` and optional `CODEX_OTLP_HEADERS` from the provided `:env` map
(defaults to the materialized Codex env map) and wires the exporter when set.

# `emit`

```elixir
@spec emit(telemetry_event(), map(), map()) :: :ok
```

Emits a telemetry event with the given measurements and metadata.

# `realtime_audio_receive`

```elixir
@spec realtime_audio_receive(map()) :: :ok
```

Emits telemetry for realtime audio receive events.

# `realtime_audio_send`

```elixir
@spec realtime_audio_send(map()) :: :ok
```

Emits telemetry for realtime audio send events.

# `realtime_session_start`

```elixir
@spec realtime_session_start(map()) :: :ok
```

Emits telemetry for realtime session start.

# `realtime_session_stop`

```elixir
@spec realtime_session_stop(map(), map()) :: :ok
```

Emits telemetry for realtime session stop.

# `voice_pipeline_start`

```elixir
@spec voice_pipeline_start(map()) :: :ok
```

Emits telemetry for voice pipeline start.

# `voice_pipeline_stop`

```elixir
@spec voice_pipeline_stop(map(), map()) :: :ok
```

Emits telemetry for voice pipeline stop.

# `voice_synthesis_start`

```elixir
@spec voice_synthesis_start(map()) :: :ok
```

Emits telemetry for voice synthesis start.

# `voice_synthesis_stop`

```elixir
@spec voice_synthesis_stop(map(), map()) :: :ok
```

Emits telemetry for voice synthesis stop.

# `voice_transcription_start`

```elixir
@spec voice_transcription_start(map()) :: :ok
```

Emits telemetry for voice transcription start.

# `voice_transcription_stop`

```elixir
@spec voice_transcription_stop(map(), map()) :: :ok
```

Emits telemetry for voice transcription stop.

---

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