{"id":31581044,"url":"https://github.com/langwatch/n8n-observability","last_synced_at":"2026-01-20T16:33:49.797Z","repository":{"id":316768303,"uuid":"1063283995","full_name":"langwatch/n8n-observability","owner":"langwatch","description":"Add complete LangWatch observability to your n8n workflows. Confidence is 🔑.","archived":false,"fork":false,"pushed_at":"2025-09-26T14:59:40.000Z","size":100,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-26T16:26:56.503Z","etag":null,"topics":["llmops","n8n","n8n-observability","n8n-workflow","observability","opentelemetry","opentelemetry-n8n","opentelemetry-node","telemetry"],"latest_commit_sha":null,"homepage":"","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/langwatch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2025-09-24T12:17:58.000Z","updated_at":"2025-09-26T14:59:44.000Z","dependencies_parsed_at":"2025-09-26T16:28:29.034Z","dependency_job_id":null,"html_url":"https://github.com/langwatch/n8n-observability","commit_stats":null,"previous_names":["langwatch/n8n-observability"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/langwatch/n8n-observability","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langwatch%2Fn8n-observability","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langwatch%2Fn8n-observability/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langwatch%2Fn8n-observability/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langwatch%2Fn8n-observability/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/langwatch","download_url":"https://codeload.github.com/langwatch/n8n-observability/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langwatch%2Fn8n-observability/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278526242,"owners_count":26001325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"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":["llmops","n8n","n8n-observability","n8n-workflow","observability","opentelemetry","opentelemetry-n8n","opentelemetry-node","telemetry"],"created_at":"2025-10-05T21:52:26.783Z","updated_at":"2025-10-05T21:52:29.937Z","avatar_url":"https://github.com/langwatch.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @langwatch/n8n-observability\n\nObservability for [n8n](https://n8n.io) powered by [LangWatch](https://langwatch.ai).  \nInstruments workflows and nodes via OpenTelemetry and sends spans to LangWatch.\n\n![Observability Setup](./assets/observability.webp)\n\n\u003e [!TIP]\n\u003e **Complete LangWatch Integration**: You can pair this with the [LangWatch n8n nodes](https://github.com/langwatch/n8n-nodes-langwatch) to get a complete LangWatch integration, including Prompt Management, Evaluation, Datasets, and more.\n\n## Features\n- Workflow + node spans with errors and metadata\n- Safe JSON I/O capture (toggleable)\n- Include/Exclude nodes\n- Works with Docker, bare metal, or programmatic init\n- Node.js ≥ 18\n\n---\n\n## Setup Options\n\n### A) Docker — **custom image installs the npm package**\n```dockerfile\n# Dockerfile\nFROM n8nio/n8n:latest\nUSER root\nWORKDIR /usr/local/lib/node_modules/n8n\nRUN npm install @langwatch/n8n-observability\nENV EXTERNAL_HOOK_FILES=/usr/local/lib/node_modules/n8n/node_modules/@langwatch/n8n-observability/dist/hooks.cjs\nUSER node\n```\n\n```bash\ndocker build -t my-n8n-langwatch .\ndocker run -p 5678:5678 \\\n  -e LANGWATCH_API_KEY=your_api_key \\\n  -e N8N_OTEL_SERVICE_NAME=my-n8n \\\n  my-n8n-langwatch\n```\n\n---\n\n### B) Docker — **no custom image**, mount the hook file from host\n```yaml\n# docker-compose.yml\nservices:\n  n8n:\n    image: n8nio/n8n:latest\n    environment:\n      - LANGWATCH_API_KEY=${LANGWATCH_API_KEY}\n      - N8N_OTEL_SERVICE_NAME=my-n8n\n      - EXTERNAL_HOOK_FILES=/data/langwatch-hooks.cjs\n    volumes:\n      - ./node_modules/@langwatch/n8n-observability/dist/hooks.cjs:/data/langwatch-hooks.cjs:ro\n      - n8n_data:/home/node/.n8n\n    ports:\n      - \"5678:5678\"\nvolumes:\n  n8n_data:\n```\n\n\u003e Ensure `@langwatch/n8n-observability` is installed on the host (e.g., `pnpm i` in your repo) so the mounted `dist/hooks.cjs` exists.\n\n---\n\n### C) Bare metal / npm terminal\n```bash\n# install globally OR locally\nnpm install -g @langwatch/n8n-observability\n\nexport LANGWATCH_API_KEY=your_api_key\nexport N8N_OTEL_SERVICE_NAME=my-n8n\nexport EXTERNAL_HOOK_FILES=$(node -e \"console.log(require.resolve('@langwatch/n8n-observability/hooks'))\")\n\nn8n start\n```\n\n---\n\n### D) Programmatic (custom runner)\n```ts\n// init.mjs or your bootstrap\nimport { setupN8nObservability } from '@langwatch/n8n-observability';\n\nawait setupN8nObservability({\n  serviceName: process.env.N8N_OTEL_SERVICE_NAME ?? 'n8n',\n  debug: process.env.N8N_OTEL_DEBUG === '1',\n});\n\n// then start n8n (your normal start chain)\n```\n\n---\n\n## Configuration\n\n| Variable                  | Purpose                                | Default |\n| ------------------------- | -------------------------------------- | ------- |\n| `LANGWATCH_API_KEY`       | **Required**                           | —       |\n| `N8N_OTEL_SERVICE_NAME`   | Service name                           | `n8n`   |\n| `N8N_OTEL_NODE_INCLUDE`   | Only trace listed nodes (name/type)    | —       |\n| `N8N_OTEL_NODE_EXCLUDE`   | Exclude listed nodes (name/type)       | —       |\n| `N8N_OTEL_CAPTURE_INPUT`  | Capture node I/O (`false` disables)    | true    |\n| `N8N_OTEL_CAPTURE_OUTPUT` | Capture node output (`false` disables) | true    |\n| `LW_DEBUG`                | LangWatch SDK debug logs               | off     |\n| `N8N_OTEL_DEBUG`          | Hook patching diagnostics              | off     |\n| `EXTERNAL_HOOK_FILES`     | Path to `dist/hooks.cjs` (hook modes)  | —       |\n\nExamples:\n```bash\nexport N8N_OTEL_NODE_INCLUDE=OpenAI,HTTP\\ Request\nexport N8N_OTEL_NODE_EXCLUDE=Wait,Set\n```\n\n---\n\n## Verify\n```bash\nnode -e \"console.log(require.resolve('@langwatch/n8n-observability/hooks'))\"\n```\nExpected startup log:\n```text\n[@langwatch/n8n-observability] observability ready and patches applied\n```\n\n---\n\n## More Info\nSee technical details and troubleshooting in:\n[`packages/n8n-observability/README.md`](./packages/n8n-observability/README.md)\n\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangwatch%2Fn8n-observability","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flangwatch%2Fn8n-observability","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangwatch%2Fn8n-observability/lists"}