# `ScoutApm.Logging.OTLP.Encoder`

Encodes log records into OTLP JSON format.

Builds the full OTLP structure:
{
  "resourceLogs": [{
    "resource": { "attributes": [...] },
    "scopeLogs": [{
      "scope": { "name": "scout_apm_elixir", "version": "..." },
      "logRecords": [...]
    }]
  }]
}

# `encode`

```elixir
@spec encode([ScoutApm.Logging.LogRecord.t()]) :: map()
```

Encodes a list of LogRecord structs into OTLP JSON format.

# `encode_log_record`

```elixir
@spec encode_log_record(ScoutApm.Logging.LogRecord.t()) :: map()
```

Encodes a single LogRecord struct into OTLP format.

---

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