open-telemetry / semantic-conventions

Defines standards for generating consistent, accessible telemetry across a variety of domains
Apache License 2.0
247 stars 158 forks source link

`server.address` for Cassandra client instrumentation when there are multiple contact points? #679

Open trask opened 7 months ago

trask commented 7 months ago

It's not clear to me if Cassandra client instrumentation should populate server.address or not, since there can be multiple contact points.

We can look at the execution info after the call completes and get the contact point that was used, but that means server.address wouldn't be available for sampling.

Looking for feedback on these options:

lmolkova commented 7 months ago

It should still be important to capture server.address to record the host name of the node query is executed against (when available). We can record the IP on the network.peer.address, but what if we have a domain name (e.g. Azure offers managed cassandra clusters which have host names)

Also, there are fully managed Cassandra offerings (such as AstraDB which takes care of load balancing/fallback and allows to configure one endpoint) which would benefit from server.address and it maybe available before sampling.

So I think something like

capture it in server.address, but won't be available for sampling

(maybe when it's available and different from an IP?) makes the most sense.

capture list of contact points on span start in some cassandra specific attribute

this also makes sense, but does it make sense to capture it on every span? I'd log it once when client starts at Info

trask commented 7 months ago

capture it in server.address, but won't be available for sampling

(related, I'm thankful for #486)

joaopgrassi commented 6 months ago

@trask do we still need anything in this issue to be done in semconv? Or can we close this?