Skip to content

docs: correct tcp_connection_remote label documentation - #2608

Open
xRookieFight (xRookieFight) wants to merge 1 commit into
microsoft:mainfrom
xRookieFight:docs/tcp-connection-remote-allips
Open

docs: correct tcp_connection_remote label documentation#2608
xRookieFight (xRookieFight) wants to merge 1 commit into
microsoft:mainfrom
xRookieFight:docs/tcp-connection-remote-allips

Conversation

@xRookieFight

Copy link
Copy Markdown

Description

Fixes #2559.

The docs describe tcp_connection_remote as a per-remote-endpoint metric with address (IP:port) labels, but that hasn't been true since #953, which deliberately dropped the port label and folded every remote socket into a single address="AllIPs" series to keep the metric's cardinality bounded.

So this is a docs bug rather than a code bug - the aggregation is the intended behavior. This PR takes option 2 from the issue and makes the documentation match what the exporter actually emits:

  • docs/03-Metrics/02-hubble_metrics.md and docs/03-Metrics/modes/basic.md: label column now says address is always AllIPs, plus a short note in the basic-mode label values section explaining why individual remotes aren't exported.
  • docs/06-Troubleshooting/basic-metrics.md: the sample scrape output still showed per-IP series with a port label that no longer exists. Replaced with the single aggregated series.
  • pkg/metrics/types.go: the gauge's HELP string said "by remote address", which is the same misleading claim shipped to every Prometheus scrape. Reworded.
  • pkg/plugin/linuxutil/netstat_stats_linux.go: added a note on the addrDefaultTCPRemote constant so the aggregation doesn't read like an unfinished implementation next time.

Worth calling out for the issue author: this closes the docs mismatch but does not give you the per-remote breakdown you were after. If there's appetite for that as an opt-in (default stays aggregated, a config flag turns on per-endpoint series with stale-series cleanup between polls), I'm happy to follow up with a separate PR - but that seemed like a decision for the maintainers rather than something to sneak into a docs fix.

Related Issue

#2559

Checklist

  • I have read the contributing documentation.
  • I signed and signed-off the commits (git commit -S -s ...).
  • I have correctly attributed the author(s) of the code.
  • I have tested the changes locally.
  • I have followed the project's style guidelines.
  • I have updated the documentation, if necessary.
  • I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed

No behavior change, so nothing new to test - go build ./pkg/metrics/... ./pkg/plugin/linuxutil/... passes and the only runtime-visible difference is the HELP text on the gauge.

Signed-off-by: xRookieFight <me@xrookiefight.com>
@xRookieFight

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

networkobservability_tcp_connection_remote only emits address=AllIPs instead of per-remote address labels

1 participant