langfuse-data-handling

Featured

Manage Langfuse data export, retention, and compliance requirements. Use when exporting trace data, configuring retention policies, or implementing data compliance for LLM observability. Trigger with phrases like "langfuse data export", "langfuse retention", "langfuse GDPR", "langfuse compliance", "export langfuse traces".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Langfuse Data Handling ## Overview Manage the Langfuse data lifecycle: export traces and scores via the API, configure retention policies, handle GDPR data subject requests, anonymize data for analytics, and maintain audit trails. ## Prerequisites - `@langfuse/client` installed - Langfuse API keys with appropriate permissions - Understanding of your compliance requirements (GDPR, SOC2, HIPAA) ## Instructions ### Step 1: Export Trace Data via API ```typescript import { LangfuseClient } from "@langfuse/client"; import { writeFileSync } from "fs"; const langfuse = new LangfuseClient(); async function exportTraces(options: { fromDate: string; toDate: string; outputFile: string; includeObservations?: boolean; }) { const allTraces: any[] = []; let page = 1; let hasMore = true; while (hasMore) { const result = await langfuse.api.traces.list({ fromTimestamp: options.fromDate, toTimestamp: options.toDate, limit: 100, page, }); for (const trace of result.data) { const exportItem: any = { id: trace.id, name: trace.name, timestamp: trace.timestamp, userId: trace.userId, sessionId: trace.sessionId, metadata: trace.metadata, tags: trace.tags, }; if (options.includeObservations) { const observations = await langfuse.api.observations.list({ traceId: trace.id, }); exportItem.observations = observations.data; } ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category