ohos-user-metrics:基于 Langfuse 的用户指标分析工具项目

用户可借助该项目分析工具安装及遥测覆盖情况。它能收集 Langfuse 追踪数据,与人员表格关联,支持时间范围筛选,生成 CSV/JSON/Markdown 格式报告。【此简介由AI生成】

Branch1Tags0
FilesLast commitLast update
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago
4 months ago

ohos-user-metrics

Collect Langfuse trace data and join it with people.xlsx to estimate tool installation/telemetry coverage for the roster.

Usage

Set Langfuse credentials in the shell:

$env:LANGFUSE_PUBLIC_KEY = "pk-lf-..."
$env:LANGFUSE_SECRET_KEY = "sk-lf-..."

Run the collector:

npm run collect -- --baseUrl=https://cloud.langfuse.com --people=people.xlsx

Use the Langfuse host that matches the key pair. If LANGFUSE_BASEURL is already set for a self-hosted Langfuse instance, omit --baseUrl and the collector will use that value.

Useful filters:

npm run collect -- --sinceDays=30
npm run collect -- --fromTimestamp=2026-05-01T00:00:00.000Z --toTimestamp=2026-05-21T23:59:59.999Z

The collector calls:

curl -u "$LANGFUSE_PUBLIC_KEY:$LANGFUSE_SECRET_KEY" \
  "https://cloud.langfuse.com/api/public/traces?limit=100&page=1&fields=core,io,scores,observations,metrics"

It paginates through traces, extracts user ids from trace/user metadata, joins them with the roster, and writes CSV/JSON/Markdown reports under outputs/.

Checks

npm run check
npm pack --dry-run

Introduction

用户可借助该项目分析工具安装及遥测覆盖情况。它能收集 Langfuse 追踪数据,与人员表格关联,支持时间范围筛选,生成 CSV/JSON/Markdown 格式报告。【此简介由AI生成】

Customize your domain