how to prefix structlog log value with "custom." or route them to a certain ecs field
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- python
调研方向
报告提到了 structlog 和 ecs-logging,但没有指出 repository 文件、测试或入口点。首先定位 ECS 字段渲染和映射配置,然后检查现有的自定义字段示例或测试;当存在一种有文档说明或受支持的方式来按要求路由 request_id 并为 foo 添加 prefix 时,即可视为完成。
由索引模型根据 Issue 内容生成。
描述
Hi,
according to the ecs documentation non ecs standard fields should go under "custom."
Also I might log data that should go to a certain ecs field
but i'm not sure how to configure something like this in structlog/ecs-logging.
for example this:
req_id = uuid()
...
logger.info("something happend", foo="123", request_id=req_id)
should end up being something like this:
{
"http.request.id" : "<generated_req_uuid>",
"message": "something happend",
"custom.foo" : 123
...
}
- 主要语言
- Python
- 星标
- 74
- 派生
- 34
- 平均合并
- 1 天 2 分钟
- 30 天内合并 PR
- 1
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
elastic/ecs-logging-python 的其他 Issue
-
agent-python community triage
难度 2/5 1-3 小时 新手友好度 64/100
elastic/ecs-logging-python#170 ·
-
Exception Group Traceback not fully visible using StdlibFormatter可能已有人在做 @Shubham-Padkonde 于 21 天前认领。 未关闭agent-python community triage
难度 4/5 3-5 天 新手友好度 35/100
elastic/ecs-logging-python#185 · 6 条评论 ·
-
StructlogProcessor fails typechecking可能已有人在做 @AWhetter 于 718 天前认领。 未关闭agent-python community triage
难度 1/5 1 小时以内 新手友好度 35/100
elastic/ecs-logging-python#146 · 2 条评论 ·
-
agent-python community enhancement
难度 4/5 3-5 天 新手友好度 35/100
elastic/ecs-logging-python#73 · 5 条评论 ·
-
agent-python community triage
难度 2/5 1-3 小时 新手友好度 50/100
elastic/ecs-logging-python#72 · 1 个 reaction ·
查看 elastic/ecs-logging-python 的全部 Issue
相似的 Issue
-
bug Triage-Needed
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
FuRongJun-1999/dsh-memory#170 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
521xueweihan/HelloGitHub#3940 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100