open-telemetry / open-telemetry/opentelemetry-java-instrumentation
Align database target and network peer attributes with semantic conventions
@trask is already working on this.
Since Aug 30, 2026.
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1.2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 228
Description
Stable telemetry separates the logical server configured by the client from the endpoint used for an operation.
server.addressandserver.portidentify the logical server target available from client configuration. They remain stable across routing, node selection, and retries.network.peer.addressandnetwork.peer.portidentify the endpoint used for the operation when the instrumentation can observe it safely.
Legacy telemetry behavior remains unchanged. These PRs implement the clarification proposed in open-telemetry/semantic-conventions#4058, which resolves #4041.
Multi-endpoint targets preserve native order when it carries priority, failover, or role semantics. Otherwise, endpoints are normalized and sorted using natural string order. Instrumentation does not deduplicate endpoints, though client-owned sets may already remove repeats. IPv6 literals are bracketed only when paired with ports; Unix sockets and portless targets retain their native form.
The entries below are grouped by client family. Entries in a native stack are listed from bottom to top.
Shared support
- #19949 Adds the shared
DbServerTargetutility for rendering validated logical server targets. Merged. - #19988 Extends
DbServerTargetto support protocols whose default port is unknown.
Geode
- #19795 Captures configured pool servers or locators, including locator groups, as one stable logical target.
Elasticsearch
- #19901 Captures the REST client's original host list as the logical target and the last resolved socket endpoint observed for a request as its peer.
- #19902 Captures the first usable configured transport address list across the supported 5.x through 7.x clients.
OpenSearch
- #19903 Captures the original REST node list as the logical target and the resolved Apache HTTP connection endpoint as the stable peer. Legacy telemetry still derives its peer and network type from the response host address.
- #19904 Captures targets for
RestClientTransport,ApacheHttpClient5Transport, andAwsSdk2Transport, with socket peers for the first two transports.RestClientTransportuses the original target captured by #19903 and omits server attributes when that target is unavailable. It never reconstructs the target from mutable routing nodes.
HBase
- #19830 Captures the configured ZooKeeper quorum and znode or master-registry endpoint list as the logical target.
- #19832 Captures the resolved Netty channel endpoint used when HBase writes a call.
Couchbase
- #19831 Captures the configured connection seeds for synchronous, asynchronous, and Spring Data operations.
- #19834 Captures the resolved Netty socket used to encode each request in client versions before 2.6.
- #19844 Captures the original connection string, DNS SRV hostname, or TLS-aware direct seed list as the logical target. Stable names prefer query summaries, collections, and namespaces before falling back to the configured server.
- #19848 Captures the resolved key-value or HTTP channel endpoint on each classic SDK dispatch span.
Spymemcached
- #19838 Captures a safe configured node list as the logical target for stable spans, metrics, and span names. Legacy telemetry retains the selected handling node.
- #19850 Captures the last reliably observed node for sequential single-node operations and omits ambiguous multi-node peers.
MongoDB
- #19839 Captures a safe configured seed list or the original sanitized SRV identity as the stable logical target. Resolved SRV nodes never replace the configured identity; unsafe targets are omitted. Legacy telemetry keeps its selected-server attributes.
- #19845 Captures the connected socket as the stable peer for commands on supported synchronous drivers. Async, reactive, and manual paths omit the peer because they do not expose the transport endpoint. Legacy telemetry does not add peer attributes.
SQL clients
- #19846 Captures complete JDBC multi-host and failover targets while preserving ordinary single-server behavior.
- #19981 Captures configured R2DBC targets, including protocols whose default port is unknown, while preserving existing legacy server attributes.
- #19982 Captures construction-time ClickHouse node sets as the logical target and reports the selected endpoint as the stable network peer.
- #19983 Carries configured Vert.x SQL 4.2+ single- and multi-server targets through clients, pools, connections, queries, and prepared statements.
- #19986 Extends #19983 to Vert.x SQL 5 fixed server lists and asynchronous option suppliers.
#19846 and #19982 target main independently. #19981 is stacked on #19988. The Vert.x SQL PRs form native stack #19983 -> #19986.
Cassandra
- #19864 Captures Cassandra 3.x contact points supplied to
Cluster.Builderand snapshots them when the cluster is built instead of using request coordinators as stable server attributes. This PR is standalone. - #19868 Captures Cassandra 4.0 configured and programmatic contact points while omitting targets whose durable identity cannot be reconstructed safely.
- #19872 Associates each Cassandra 4.0 response with the socket that delivered it, including retries and SNI proxy connections. Legacy endpoint resolution remains unchanged.
- #19877 Captures Cassandra 4.4 original contact points and omits targets whose provenance cannot be reconstructed safely.
- #19883 Associates each Cassandra 4.4 response with its channel socket for stable telemetry. Legacy telemetry keeps the original coordinator behavior.
The Cassandra 4.x PRs form native stack #19933: #19868 -> #19872 -> #19877 -> #19883.
Redis
- #19871 Captures standalone, pooled, sharded, cluster, Sentinel, and Unix-socket targets across Jedis 1.4 and later.
- #19874 Captures the last reliably observed socket for direct, pipeline, transaction, retry, and reroute operations while preserving per-command peers for sharded fan-out.
- #19878 Snapshots standalone, cluster, Sentinel, and Unix-socket targets for Lettuce 4.x and 5.x.
- #19882 Captures the last contacted operation socket, isolates peer state per reactive subscription, invalidates stale peers, and omits genuinely ambiguous multi-node operations or spans that end before a peer is known.
- #19885 Captures configured direct, pooled, Sentinel, cluster, replicated, ElastiCache, and master-slave targets where each client exposes them safely.
- #19886 Captures durable standalone, cluster, replication, Sentinel, and Unix-socket targets from Vert.x Redis 4.0 and later client options while omitting unstable dynamic suppliers.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.