getsentry / getsentry/sentry-javascript

Update shared gen_ai attribute constants & utilities

未关闭
#20,577 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
javascript Task
主要语言
TypeScript
星标
8.7k
派生
1.8k
平均合并
1 天 17 小时
30 天内合并 PR
515

描述

Update the shared attribute constants and utilities to align with [RFC #153](). This is the foundation for all per-provider work.

### New constants to add

- [ ] `gen_ai.provider.name` (replaces `gen_ai.system`)
- [ ] `gen_ai.tool.definitions` (replaces `gen_ai.request.available_tools`)
- [ ] `gen_ai.tool.call.arguments` (replaces `gen_ai.tool.input`)
- [ ] `gen_ai.tool.call.result` (replaces `gen_ai.tool.output`)
- [ ] `gen_ai.response.time_to_first_token`
- [ ] `gen_ai.embeddings.dimension.count`
- [ ] `gen_ai.usage.output_tokens.reasoning`
- [ ] `gen_ai.request.seed`

### Constants to deprecate

- [ ] `gen_ai.system`
- [ ] `gen_ai.prompt`
- [ ] `gen_ai.request.available_tools`
- [ ] `gen_ai.response.text`
- [ ] `gen_ai.response.tool_calls`
- [ ] `gen_ai.tool.input`
- [ ] `gen_ai.tool.output`
- [ ] `gen_ai.usage.cache_creation_input_tokens`
- [ ] `gen_ai.usage.cache_read_input_tokens`

### Shared utilities

- [ ] Update `setTokenUsageAttributes()` to use new token attribute names
- [ ] Update message format utilities (content → parts)
- [ ] Update message truncation and media stripping helpers

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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