In your opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": [
"@lmnr-ai/opencode-plugin"
]
}Set environment variable:
export LMNR_PROJECT_API_KEY="<YOUR KEY>" # in the shell where you launch opencodeOpencode has an experimental config flag to enable opentelemetry. We enable it if Laminar plugin is added.
Laminar injects a custom span processor that will make sure each conversation turn is saved as a separate trace, and conversation sessions are grouped by session ids so that it's easier to view them.
The custom span processor also adds some additional attributes on spans that power Laminar-specific features.