You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dc461c1
Browse filesBrowse the repository at this point in the historyBrowse files
feat(server): export gateway OCSF events as OTLP log records
The gateway only persisted its OCSF events to the JSONL file, so
collectors had to tail that file. Adding `[openshell.gateway.otlp.ocsf]`
now also exports each gateway OCSF event as an OTLP log record, using
the same resource identity as gateway traces. `schema_version`
optionally downgrades the exported JSON to OCSF 1.1 or 1.3.
OTLP endpoints are now configured per signal, so OCSF events can go to
a collector that feeds a SIEM while spans go elsewhere. The existing
`[openshell.gateway.otlp]` `endpoint` is the default for every signal
and on its own still enables trace export. `[otlp.traces]` overrides
the trace endpoint, and `[otlp.ocsf]` takes its own `endpoint` or falls
back to the default.
Each record carries the OCSF JSON as its body, the event time as its
timestamp, a severity mapped from `severity_id`, and `ocsf.*` and
`openshell.sandbox.id` attributes for filtering without parsing the
body.
Records flow through a queue bounded by count and bytes to the SDK
OTLP log exporter in batches bounded the same way. Failed exports retry
with backoff; records lost to a full queue, an oversized body, or
exhausted retries are counted in metrics and reported to the collector
in an `openshell.ocsf.gap` record on the next successful export. The exporter lives in `openshell-otel` so other processes can
share it.
Helm renders `server.otlp.traces.endpoint` and
`server.otlp.ocsf.{enabled,endpoint,schemaVersion}`, and the local
development gateway tasks enable OCSF export.
Closes#4499
Refs #2892
Signed-off-by: Kris Hicks <[email protected]>
0 commit comments