-
Notifications
You must be signed in to change notification settings - Fork 597
Description
Is your feature request related to a problem? Please describe.
Currently, when a service graph connection type is identified as a database, we still prefer to set the server service to either peer.service
, server.address
, or network.peer.address
. This results in service graph database nodes showing ip addresses rather than their database name in most cases.
Describe the solution you'd like
When connection type is identified as a database, we should prefer to use the database name attribute as the server service name.
This could be configurable to preserve the old behavior by adding a database_name_attributes
list to the config. If set, ideally we would prefer to set the dbName to the first matching attribute from this list.
This is similar to the way the otel service graph connector works:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/connector/servicegraphconnector/connector.go#L276-L282
Describe alternatives you've considered
A couple of alternatives:
- Do nothing. This prevents us from being able to control the name of database nodes in the service graph while maintaining additional the peer attributes on spans.
- Replace existing behavior to match otel connector. This would likely be better than what we do today but it could come as a surprise for existing users of the service graph processor in tempo.
Additional context