getsentry / getsentry/sentry-java

Add db attributes to span data for Java backend spans

Đang mở
#2,930 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Improvement Java Spans
Ngôn ngữ chính
Kotlin
Star
1.4k
Fork
478
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
67

Mô tả

### 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`.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.