Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(otelcol/connector/servicegraph): add virtual_node_peer_attributes setting to the component #879

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
doc: add Paulin's suggested note
Signed-off-by: hainenber <[email protected]>
  • Loading branch information
hainenber committed May 28, 2024
commit 03e4b8aa290dee8ebcd1f77bb62727b7aba384a6
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ Additional labels can be included using the `dimensions` configuration option:

When `metrics_flush_interval` is set to `0s`, metrics will be flushed on every received batch of traces.

`virtual_node_peer_attributes` is useful when an OTel-instrumented client sends a request to a service which is not OTel-instrumented.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`virtual_node_peer_attributes` is useful when an OTel-instrumented client sends a request to a service which is not OTel-instrumented.
`virtual_node_peer_attributes` is useful when an OTel-instrumented client sends a request to a service that is not OTel-instrumented.

Normally, `otelcol.connector.servicegraph` wouldn't be able to pair the client span with a service span,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Normally, `otelcol.connector.servicegraph` wouldn't be able to pair the client span with a service span,
Normally, `otelcol.connector.servicegraph` wouldn't be able to pair the client span with a service span

because no service span will be received if the service is not OTel-instrumented.
When an edge expires, `otelcol.connector.servicegraph` checks if it has peer attributes listed in `virtual_node_peer_attributes`.
If an attribute is found, the metrics are then aggregated with a virtual node.

If no client span is found and `virtual_node_peer_attributes` is not an empty list,
then the service span will be paired with a virtual node called `client="user"`.
This can be useful when a client which is not OTel-instrumented (like a web browser) sends a request to an OTel-instrumented service.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This can be useful when a client which is not OTel-instrumented (like a web browser) sends a request to an OTel-instrumented service.
This can be useful when a client that is not OTel-instrumented (like a web browser) sends a request to an OTel-instrumented service.

Without a virtual node, normally the client span will be missing, and the server span will expire without being paired.

Attributes configured in the `virtual_node_peer_attributes` argument are ordered by priority. An empty list disables the creation of a virtual node.

[Span Kind]: https://opentelemetry.io/docs/concepts/signals/traces/#span-kind
Expand Down