[receiver/hostmetrics] Add system.network.connection.count metric to network scraper#48988
[receiver/hostmetrics] Add system.network.connection.count metric to network scraper#48988GlqEason wants to merge 1 commit into
Conversation
…aper in hostmetricsreceiver. This metric provides a gauge of ESTABLISHED TCP connections, grouped by process name, remote address, and remote port. The metric supports filtering via configuration: - include_processes / exclude_processes: filter by process name - include_ports / exclude_ports: filter by remote port - exclude_localhost: exclude local and loopback remote addresses - exclude_listen_ports: exclude connections from local listening ports New configuration types: - ConnectionConfig: connection metric settings under connections - ProcessMatchConfig: process name filter with filterset support - TestScrapeNetworkConnectionCountMetric: validates full filter chain - TestScrapeNetworkConnectionCountDisabledSkipsDetailLookups: ensures no detail lookups when metric is disabled - TestScrapeNetworkConnectionsErrorCountsEnabledMetrics: validates partial scrape error count - TestCreateMetrics_Error: added cases for invalid process filters - All 21 existing test cases extended and passing documentation.md auto-generated by mdatagen
|
Welcome, contributor! Thank you for your contribution to opentelemetry-collector-contrib. Important reminders:
|
system.network.connection.count to the network scr…| stability: development | ||
| gauge: | ||
| value_type: int | ||
| attributes: [process.name, server.address, server.port] |
There was a problem hiding this comment.
It seems that we are merging 2 levels of metrics, i would suggest removing process name from this metric & via seperate pr introducing a process equivalent of this system metric like we have for other metrics.
There was a problem hiding this comment.
It does not collect the data of all processes. only process which start a connection from local OS should be collect.
So if separate process name to create a new metric like system.network.process, That is not my intention.
And currently, there is a processscraper.
There was a problem hiding this comment.
Then it becomes a process metric and not system.
Description
Add a new metric
system.network.connection.countto the network scraperin hostmetricsreceiver. This metric provides a gauge of ESTABLISHED TCP
connections, grouped by process name, remote address, and remote port.
The metric supports filtering via configuration:
New configuration types:
Testing
detail lookups when metric is disabled
scrape error count
Documentation
documentation.md auto-generated by mdatagen