open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.11k stars 2.39k forks source link

Support mapping of ClientService to an exposed list of attributes #36503

Open awangc opened 23 hours ago

awangc commented 23 hours ago

Component(s)

connector/servicegraph

Is your feature request related to a problem? Please describe.

Currently when enabling virtual nodes in servicegraphs, we can provide a list of attributes that allow a client span to create a virtual server node based on the attribute present. This request is to provide support for similar action for server spans, i.e., a new configuration option that allows us to provide a list of attributes that allow a server span to create a virtual client node based on the attribute present.

This option does not currently exist, so any server span that does not have a corresponding client span gets assigned a generic user node as client, which hides how services are called.

Describe the solution you'd like

With a config like the below:

connectors:
  servicegraph:
     latency_histogram_buckets: [100ms, 250ms, 1s, 5s, 10s]
     dimensions:
       - peer.service
       - client.address
     virtual_node_client_attributes:
       - peer.service
       - client.address

Server spans that have the attribute of peer.service (or client.address) will list the peer.service (or client.address) in the client node in the node graph, instead of the generic user.

Describe alternatives you've considered

No response

Additional context

No response

github-actions[bot] commented 23 hours ago

Pinging code owners: