본문으로 건너뛰기
cccskills
무료GitHub에 공개

langfuse-metrics

Query aggregate Langfuse cost, volume, latency, and model telemetry efficiently with Metrics API v2. Use for dashboards, rollout checks, usage summaries, and cost or latency comparisons; use Observations API v2 instead when individual rows are actually required.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(3)

  • SKILL.md3.6 KB
  • agents/openai.yaml239 B
  • scripts/query-metrics-v2.mjs8.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Langfuse Metrics

Prefer one bounded GET /api/public/v2/metrics query over downloading and aggregating observations. Metrics queries return aggregates and avoid exposing prompt or output content.

Use scripts/query-metrics-v2.mjs:

node .codex/skills/langfuse-metrics/scripts/query-metrics-v2.mjs summary --from 2026-08-26T00:00:00Z --model-prefix gpt-5.6-
node .codex/skills/langfuse-metrics/scripts/query-metrics-v2.mjs cost-report --from 2026-08-26T00:00:00Z --to 2026-08-27T00:00:00Z --completed-meetings 12 --transcribed-minutes 347
node .codex/skills/langfuse-metrics/scripts/query-metrics-v2.mjs query --file query.json

The helper reads LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, and optional LANGFUSE_BASE_URL (Chronote defaults to the US cloud host). summary makes a single request grouped by provided model and observation name, returning count, total cost, average latency, and p95 latency. Use --dry-run to inspect the query without sending it. --model-prefix is sent as a Metrics v2 starts with filter so matching happens before the server's 1,000-row limit.

cost-report uses that same single aggregate query to return attributed cost, cost by model and feature, known fully-unpriced model groups, and group-based cost coverage. Pass PostHog's completed-meeting count and the application's transcribed-minute denominator when available to add unit costs. Do not call the coverage ratio exact: a group with some cost may still contain individual unpriced observations. Keep any unpriced TTS, image, or provider activity visible rather than estimating dollars from unrelated units.

Keep queries bounded with explicit UTC fromTimestamp and toTimestamp. Start with the dimensions and metrics needed to answer the question; do not add time buckets or high row limits speculatively. Metrics API v2 supports at most 1,000 rows and does not permit grouping by high-cardinality identifiers such as trace, session, or user IDs.

Before interpreting an empty result as no traffic, check ingestion freshness. Data from Langfuse Python SDK versions before 4.7 or JS/TS versions before 5.4 can appear in v2 endpoints up to 15 minutes late.

If row-level investigation is necessary, use GET /api/public/v2/observations with bounded fromStartTime and toStartTime, selective fields, and cursor pagination. Do not use deprecated /api/public/observations or page-based pagination. Omit the io field group unless the task genuinely requires user content and that access is authorized.

On HTTP 429, honor Retry-After. The helper retries once only when the wait is 60 seconds or less; otherwise it stops and reports the wait. Do not work around an organization-wide quota by rotating project keys. Langfuse applies rate limits to organization-level resource buckets shared by its projects and keys.

Aggregate health does not prove output quality. Report routing/configuration, traffic, latency, cost, and error evidence separately from representative workload or human quality validation. This skill is read-only and does not authorize prompt, model-routing, evaluator, or production configuration writes.

Current official references:

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Analyze Chronote product adoption with PostHog and Langfuse, including active users, meetings, feature usage, AI telemetry, and privacy-safe resolution of active Discord guild IDs to live server names.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Chronote-gg/Chronote42026년 10월 19일 업데이트

Use when a change affects user-visible behavior at docs.chronote.gg and needs public documentation. Covers where docs live (apps/docs-site vs docs/), authoring checklist, yarn docs:check, and Algolia config. Trigger when the user mentions docs, release notes, what's-new, or user-facing PR changes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Chronote-gg/Chronote42026년 10월 19일 업데이트

Investigate errors, incidents, or product ideas using both internet research and repo-wide codebase research, then propose a concrete changeset plan with clarifying questions before any implementation. Use when a user asks to investigate, root-cause, or plan changes, or when an Issue or PR is referenced and needs a plan.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Chronote-gg/Chronote42026년 10월 19일 업데이트

Configure and debug MCP servers for OpenCode, Codex CLI, and Claude Code, including auth headers, scope, and validation checks. Use when MCP tools fail to connect or when adding a new MCP server.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Chronote-gg/Chronote42026년 10월 19일 업데이트

Configure and debug MCP servers for Claude Code, OpenCode, and Codex CLI, including auth headers, scope, and validation checks. Use when MCP tools fail to connect, when an MCP server returns 401/404/HTML, or when adding a new MCP server to this repo.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Chronote-gg/Chronote42026년 10월 19일 업데이트

Use every time you push a commit to an active pull request, to verify the PR is truly stable before reporting merge readiness. Covers the post-push wait window, AI review audit (Copilot/Greptile/Codex), and the gh commands to snapshot PR state. Trigger on "I pushed" or "is the PR ready to merge".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Chronote-gg/Chronote42026년 10월 19일 업데이트

Chronote-gg의 스킬 모두 보기

이 스킬의 문제 신고