ScoutApm.Logging.OTLP.Encoder (scout_apm v2.0.0)

Copy Markdown

Encodes log records into OTLP JSON format.

Builds the full OTLP structure: { "resourceLogs": [{

"resource": { "attributes": [...] },
"scopeLogs": [{
  "scope": { "name": "scout_apm_elixir", "version": "..." },
  "logRecords": [...]
}]

}] }

Summary

Functions

Encodes a list of LogRecord structs into OTLP JSON format.

Encodes a single LogRecord struct into OTLP format.

Functions

encode(log_records)

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

Encodes a list of LogRecord structs into OTLP JSON format.

encode_log_record(record)

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

Encodes a single LogRecord struct into OTLP format.