Expand description
The skywalking-logger node — ships access-log entries to a SkyWalking OAP
(Observability Analysis Platform) HTTP endpoint in batches.
Ported from APISIX’s skywalking-logger.lua. On the request path the node
builds a log entry (via the shared build_entry),
wraps it in a SkyWalking LogData item, and hands it to a BatchSink.
A background task POSTs the buffered items as a JSON array to
<endpoint_addr>/v3/logs; the node itself never blocks and passes the
context through unchanged.
§Deviations from APISIX
- The APISIX plugin parses the inbound
sw8trace header to attach atraceContextto each item. featherbit does not thread trace propagation through the log entry, sotraceContextis omitted. - APISIX wraps the entry as
body.json.json; we mirror that shape. A millisecondtimestampis added (SkyWalking’sLogData.timestamp), which the APISIX plugin leaves to the OAP server to stamp.
Structs§
- Skywalking
Flusher 🔒 - Delivers batched SkyWalking
LogDataitems to<endpoint>/v3/logs. - Skywalking
Logger Plugin - Ships log entries to a SkyWalking OAP endpoint in batches.
Functions§
- bool_
key 🔒 - build_
log_ 🔒item - Builds one SkyWalking
LogDataitem wrappingentry(JSON-encoded intobody.json.json, mirroring APISIX). - now_ms 🔒