Skip to main content

Module skywalking_logger

Module skywalking_logger 

Source
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 sw8 trace header to attach a traceContext to each item. featherbit does not thread trace propagation through the log entry, so traceContext is omitted.
  • APISIX wraps the entry as body.json.json; we mirror that shape. A millisecond timestamp is added (SkyWalking’s LogData.timestamp), which the APISIX plugin leaves to the OAP server to stamp.

Structs§

SkywalkingFlusher 🔒
Delivers batched SkyWalking LogData items to <endpoint>/v3/logs.
SkywalkingLoggerPlugin
Ships log entries to a SkyWalking OAP endpoint in batches.

Functions§

bool_key 🔒
build_log_item 🔒
Builds one SkyWalking LogData item wrapping entry (JSON-encoded into body.json.json, mirroring APISIX).
now_ms 🔒