@volcengine/tls-observer-opencode
v0.0.6
Published
Export OpenCode plugin telemetry to Volcengine TLS with GenAI OTEL traces.
Maintainers
Readme
TLS Observer for OpenCode
OpenCode plugin that converts OpenCode session events into GenAI OTEL traces and exports them to Volcengine TLS.
Trace shape
agent.turn (server)
llm.request (client)
tool.call (client)The plugin listens to OpenCode public plugin events, groups them by user turn, and exports one agent.turn trace when the assistant reaches step-finish reason="stop".
Configuration
Environment variables:
OPENCODE_TLS_EXPORT=0disables export.OPENCODE_TLS_ENV_FILEoptionally points to an env file. Defaults to~/.config/opencode/tls-observer-opencode.env.OPENCODE_TLS_DATA_ROOToverrides local send-log and retry state.OPENCODE_TLS_CAPTURE_CONTENT=0disables prompt/response/tool content capture.OPENCODE_TLS_ENDPOINTorTRACE_TLS_ENDPOINTOPENCODE_TLS_REGIONorTLS_REGIONOPENCODE_TLS_TRACE_TOPIC_IDorTLS_TRACE_TOPIC_IDOPENCODE_TLS_API_KEYorTLS_API_KEYOPENCODE_TLS_AK/OPENCODE_TLS_SKorTLS_AK/TLS_SKTRACE_OTEL_SPAN_ATTRIBUTESadds custom span attributes, for examplesession.name:${AIPAAS_SESSION_ID},tenant.id:${TENANT_ID}.
Default data root:
~/.config/opencode/plugins/data/tls-observer-opencodeOpenCode plugin loading
For local installs, place a JavaScript plugin entry file under ~/.config/opencode/plugins/.
The installer writes ~/.config/opencode/plugins/tls-observer-opencode.js and keeps the
runtime package in ~/.config/opencode/plugins/tls-observer-opencode/.
Design notes
This implementation uses a clean-room OpenCode adapter. It borrows the event-aggregation idea from existing OpenCode tracing integrations, but the code, names, state model, and TLS span mapping are independently implemented for this repository.
