{"id":37228245,"url":"https://github.com/omercnet/opencode-plugin-langfuse","last_synced_at":"2026-01-15T03:26:49.447Z","repository":{"id":331850714,"uuid":"1132076085","full_name":"omercnet/opencode-plugin-langfuse","owner":"omercnet","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-11T11:21:30.000Z","size":66,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T15:33:24.370Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/omercnet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-11T09:21:52.000Z","updated_at":"2026-01-11T14:42:20.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/omercnet/opencode-plugin-langfuse","commit_stats":null,"previous_names":["omercnet/opencode-plugin-langfuse"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/omercnet/opencode-plugin-langfuse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omercnet%2Fopencode-plugin-langfuse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omercnet%2Fopencode-plugin-langfuse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omercnet%2Fopencode-plugin-langfuse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omercnet%2Fopencode-plugin-langfuse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omercnet","download_url":"https://codeload.github.com/omercnet/opencode-plugin-langfuse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omercnet%2Fopencode-plugin-langfuse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28442272,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-15T00:55:22.719Z","status":"online","status_checked_at":"2026-01-15T02:00:08.019Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-15T03:26:48.799Z","updated_at":"2026-01-15T03:26:49.441Z","avatar_url":"https://github.com/omercnet.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenCode Langfuse Plugin\n\n[![npm version](https://badge.fury.io/js/opencode-plugin-langfuse.svg)](https://www.npmjs.com/package/opencode-plugin-langfuse)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n**Automatic LLM observability for OpenCode using Langfuse via OpenTelemetry.**\n\nZero-config tracing of sessions, messages, tool calls, costs, and performance.\n\n---\n\n## Installation\n\n```bash\nnpm install opencode-plugin-langfuse\n# or\nbun add opencode-plugin-langfuse\n```\n\n---\n\n## Setup\n\n### 1. Get Langfuse Credentials\n\nSign up at [cloud.langfuse.com](https://cloud.langfuse.com) and create a project.\n\nGo to **Settings → API Keys** and copy your keys.\n\n### 2. Configure Environment\n\n```bash\nexport LANGFUSE_PUBLIC_KEY=\"pk-lf-...\"\nexport LANGFUSE_SECRET_KEY=\"sk-lf-...\"\nexport LANGFUSE_BASEURL=\"https://cloud.langfuse.com\"  # Optional\n```\n\n### 3. Enable Plugin + OTEL\n\nIn `.opencode/opencode.json`:\n\n```json\n{\n  \"experimental\": {\n    \"openTelemetry\": true\n  },\n  \"plugin\": [\"opencode-plugin-langfuse\"]\n}\n```\n\n### 4. Run OpenCode\n\nThat's it! All traces appear automatically in your Langfuse dashboard.\n\n---\n\n## How It Works\n\nThis plugin initializes a `LangfuseSpanProcessor` that captures all OpenTelemetry spans emitted by OpenCode when `experimental.openTelemetry` is enabled.\n\n```\nOpenCode (OTEL spans) → LangfuseSpanProcessor → Langfuse Dashboard\n```\n\n---\n\n## Environment Variables\n\n| Variable              | Required | Default                      | Description            |\n| --------------------- | -------- | ---------------------------- | ---------------------- |\n| `LANGFUSE_PUBLIC_KEY` | Yes      | -                            | Langfuse public key    |\n| `LANGFUSE_SECRET_KEY` | Yes      | -                            | Langfuse secret key    |\n| `LANGFUSE_BASEURL`    | No       | `https://cloud.langfuse.com` | Self-hosted instance   |\n\n---\n\n## Self-Hosting\n\n```bash\nexport LANGFUSE_BASEURL=\"https://langfuse.yourcompany.com\"\n```\n\nSee [Langfuse self-hosting docs](https://langfuse.com/docs/deployment/self-host).\n\n---\n\n## Troubleshooting\n\n### No traces appearing\n\n1. Verify `experimental.openTelemetry: true` is set\n2. Check credentials: `echo $LANGFUSE_PUBLIC_KEY`\n3. Check Langfuse health: `curl https://cloud.langfuse.com/api/public/health`\n\n### Plugin not loading\n\n- Ensure `opencode-plugin-langfuse` is in `dependencies` (not `devDependencies`)\n- Verify `.opencode/opencode.json` syntax\n\n---\n\n## License\n\nMIT © omercnet\n\n---\n\n## Related\n\n- [OpenCode](https://opencode.ai/)\n- [Langfuse](https://langfuse.com/)\n- [Langfuse OTEL Integration](https://langfuse.com/docs/integrations/opentelemetry)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomercnet%2Fopencode-plugin-langfuse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomercnet%2Fopencode-plugin-langfuse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomercnet%2Fopencode-plugin-langfuse/lists"}