@ramarivera/pi-langfuse
v0.1.1
Published
Pi extension that exports model usage and tool activity to Langfuse via OpenTelemetry
Maintainers
Readme
@ramarivera/pi-langfuse
Pi extension that exports full Pi session traces, tool activity, token usage, and costs to Langfuse via OpenTelemetry.
By default it sends OTLP traces to:
https://langfuse.ai.roxasroot.net/otel/v1/tracesOverride with PI_LANGFUSE_OTLP_ENDPOINT when testing against another collector.
Install
pi install npm:@ramarivera/[email protected]Local Development
This checkout is live-enabled for Pi through:
.pi/extensions/langfuse/index.tsThat shim imports the package entrypoint in src/index.ts, which imports the extension factory from src/extension.ts. Tests use the same symbol so local behavior, package behavior, and manual Pi behavior do not drift.
npm install
npm run check
npm test
npm run test:e2e
npm pack --dry-runPublishing
Publishing uses GitHub Actions trusted publishing in .github/workflows/publish.yml.
Before the first publish, configure npm trusted publishing:
- owner/repo:
ramarivera/pi-langfuse - workflow:
.github/workflows/publish.yml - environment: blank unless the workflow is changed to require one
No NPM_TOKEN is required for trusted publishing.
