Skip to content

Conversation

gantrior
Copy link
Contributor

@gantrior gantrior commented Oct 2, 2025

No description provided.

@gantrior gantrior requested a review from a team as a code owner October 2, 2025 06:14
# The logic of what shapes of addresses are considered FQDNs should match 'transform/istio-metric-datapoints'.
# Also, Beyla prefers filling 'client.address' and 'server.address' attributes with OTEL Service name (or name + k8s namespace) instead of an actual FQDN, when possible. This makes their values useless for us because they would create fake FQDNs.
# - set(datapoint.attributes["dest.sw.server.address.fqdn"], datapoint.attributes["server.address"]) where IsMatch(metric.name, "^http\\.client\\.") and datapoint.attributes["sw.k8s.dst.workload.type"] == nil and IsMatch(datapoint.attributes["server.address"], "^(https?://)?[a-zA-Z0-9][-a-zA-Z0-9]*\\.[a-zA-Z0-9][-a-zA-Z0-9\\.]*(:\\d+)?$") and not(IsMatch(datapoint.attributes["server.address"], ".*\\.cluster\\.local$")) and not(IsMatch(datapoint.attributes["server.address"], "^(https?://)?\\d+\\.\\d+\\.\\d+\\.\\d+(:\\d+)?$"))
- set(datapoint.attributes["dest.sw.server.address.fqdn"], datapoint.attributes["server.address"]) where IsMatch(metric.name, "^http\\.client\\.") and datapoint.attributes["sw.k8s.dst.workload.type"] == nil and IsMatch(datapoint.attributes["server.address"], "^(https?://)?[a-zA-Z0-9][-a-zA-Z0-9]*\\.[a-zA-Z0-9][-a-zA-Z0-9\\.]*(:\\d+)?$") and not(IsMatch(datapoint.attributes["server.address"], ".*\\.cluster\\.local$")) and not(IsMatch(datapoint.attributes["server.address"], "^(https?://)?\\d+\\.\\d+\\.\\d+\\.\\d+(:\\d+)?$"))
Copy link
Contributor

Choose a reason for hiding this comment

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

What will this do when the address is some.address, where some is an OTEL service and address is an OTEL namespace of the service?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, if you are checking for .cluster.local, you might also want to check for .cluster.local..

Copy link
Contributor

Choose a reason for hiding this comment

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

Additionally, for new workloads, sw.k8s.dst.workload.type might be temporary empty until k8s workload metadata cache gets updated. Or the swok8sworkloadtype processor may not be configured to look for that kind of a k8s object. In that case server.address may contain basically anything, including k8s workloads.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What will this do when the address is some.address, where some is an OTEL service and address is an OTEL namespace of the service?
As far as I know this is not the concern as http.client.* metrics do not follow identification semantics, so OTEL Service will never get to server.address attribute. That identification semantics is applied only on http.server.* and client.address attribute (my assumption is based on observed behavior)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also, if you are checking for .cluster.local, you might also want to check for .cluster.local..
Fixed
Additionally, for new workloads, sw.k8s.dst.workload.type might be temporary empty until k8s workload metadata cache gets updated. Or the swok8sworkloadtype processor may not be configured to look for that kind of a k8s object. In that case server.address may contain basically anything, including k8s workloads.
It is very unlikely that server.address will be filled with some new workload name before swok8sworkloadtype has that in cache, that would mean that beyla catched that new workload much earlier then swok8sworkloadtype (beyla needs to cache the workload and wait for next metric reporting interval), although it is teoretically possible. But I wouldn't block this PR with this.

pstranak-sw
pstranak-sw previously approved these changes Oct 9, 2025
@gantrior gantrior changed the title NH-116356: Fix for missing external connections Fix for missing external connections Oct 9, 2025
@gantrior gantrior requested a review from pstranak-sw October 9, 2025 07:58
@gantrior gantrior merged commit 77987ab into master Oct 14, 2025
15 checks passed
@gantrior gantrior deleted the bugfix/NH-116356 branch October 14, 2025 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants