Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

feat(export): OTLP/JSON exporter for OpenTelemetry integration

已关闭
#140 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
javascript
领域
observability

调研方向

从 #139 中的 LogExporter 接口以及 issue 中所示的 userale.start 配置入口开始。跟踪 exporterType 和 otlpEndpoint 的处理方式,然后实现文档中规定的 Flagon-to-OTLP 映射,并验证日志是否以指定的 JSON 结构到达标准 /v1/logs 端点。

由索引模型根据 Issue 内容生成。

描述

enhancement Userale

Summary

Implement an OtlpJsonExporter that sends UserALE logs to any OpenTelemetry Collector via OTLP/HTTP JSON.

Motivation

OpenTelemetry is the de-facto standard for observability. OTLP support lets Flagon users send behavioral data to Grafana, Datadog, Jaeger, and any OTel-compatible backend — without building custom ingestion pipelines.

No competing behavioral analytics library (PostHog, Matomo, Plausible) speaks OTLP. This is a differentiation opportunity.

Design

  • Maps Flagon log fields → OTLP LogRecord attributes using OTel semantic conventions
  • Builds OTLP/JSON payloads using plain objects (zero external dependencies)
  • Ships to standard OTLP HTTP receiver (port 4318, /v1/logs)
  • ~150 lines of code, ~2-3 KB gzipped added to bundle

Attribute Mapping

Flagon Field OTLP Mapping
clientTime timeUnixNano
toolName resource.service.name
useraleVersion resource.telemetry.sdk.version
userId attributes.enduser.id
sessionId attributes.session.id
pageUrl attributes.url.full
target attributes.flagon.dom.target
type attributes.flagon.event_type
logType attributes.flagon.log_type
details body (JSON string)

User Experience

// One config change to enable OTLP
userale.start({
  exporterType: 'otlp',
  otlpEndpoint: 'http://localhost:4318',
});

Depends On

  • #139 (LogExporter interface)
主要语言
Jupyter Notebook
星标
30
派生
15
平均合并
1 小时 4 分钟
30 天内合并 PR
27

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/flagon 的其他 Issue

查看 apache/flagon 的全部 Issue

相似的 Issue

更多 Observability & SRE Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。