Point otel.endpoint at any OTLP/HTTP receiver. The plugin appends /v1/logs
for logs and /v1/traces for session spans.
Each event produces one OTLP/HTTP-JSON log record. Alongside the routed command output, every record carries:
resource.service.name— fromotel.service_name- attributes —
copilot.event,copilot.session_id,copilot.cwd, andcopilot.tool_namewhen present, plus thecopilot.<name>command attributes severityText—INFOtraceId— the Copilot session UUID (so all of a session's records share one trace id);spanIdis the session span's id when session tracing is on
With otel.session_trace = true (the default), the plugin also emits one
span per Copilot session:
SessionStartrecords the session's start time (in a temp marker file).SessionEndPOSTs a completedcopilot.sessionspan to{endpoint}/v1/traceswith the session's duration andcopilot.session.end_reason.
The span's traceId is the Copilot session UUID (dashes removed — a UUID is
exactly a 16-byte OTLP trace id), and every log record in the session uses that
same traceId and the session span's spanId — so all of a session's logs
attach to its trace and nest under the session span in trace views. Nothing is
invented: the trace id equals the copilot.session_id attribute, so you can look
a session up either way. (A non-UUID session id falls back to a stable hash.)
Set session_trace = false to disable, or session_span_name to rename the
span. Requires the SessionStart/SessionEnd hooks (registered by default) and
an OTLP traces receiver at {endpoint}/v1/traces.