getsentry / getsentry/sentry-java
Add db attributes to span data for Java backend spans
- 主要語言
- Kotlin
- 星號
- 1.4k
- 分支
- 478
- 平均合併
- 3 天 4 小時
- 30 天內合併 PR
- 72
描述
### Description
Follow-up from #2893
We're going to matching the [otel db conventions](https://opentelemetry.io/docs/specs/otel/trace/semantic_conventions/database/). Either one of `server.address` or `server.socket.address` is required. If `server.address` is set, then `server.port` should be set. If `server.port` is different than `server.socket.port`, than `server.socket.port` should also be set. In addition, `db.name` should be set if possible. `db.system` should match the list in [OpenTelemetry's well known conventions](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/database.md#notes-and-well-known-identifiers-for-dbsystem).
| Attribute | Type | Description | Examples | Requirement Level |
|---|---|---|---|---|
| `server.address` | string | Name of the database host. | `example.com` | Conditionally Required: See alternative attributes below. |
| `server.port` | int | Logical server port number | `80`; `8080`; `443` | Conditionally Required: [1] |
| `server.socket.address` | string | Physical server IP address or Unix socket address. | `10.5.3.2` | See below |
| `server.socket.port` | int | Physical server port. | `16456` | Recommended: If different than `server.port`. |
These values should be set on `span.data`.
貢獻指南
研究方向
從後續 issue #2893 開始,追蹤 Java backend 中 span.data 的填入位置。將可用值與連結的 OpenTelemetry 資料庫慣例進行比較,然後驗證列出的 server 和 db 屬性是否依照其要求設定。當適用的屬性存在於 span.data 中,且其值遵循這些慣例時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java, kotlin
- 領域
- backend, observability
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100