Skip to content

Commit

Permalink
[receiver/hostmetrics/networkscraper] remove direction
Browse files Browse the repository at this point in the history
The following change adds the direction to the metric name, removing the `direction` attribute.

Fixes #11817
  • Loading branch information
Alex Boten committed Jun 29, 2022
1 parent ea053e1 commit e9f71d1
Show file tree
Hide file tree
Showing 6 changed files with 429 additions and 156 deletions.
12 changes: 8 additions & 4 deletions receiver/hostmetricsreceiver/hostmetrics_receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@ var standardMetrics = []string{
"system.filesystem.usage",
"system.memory.usage",
"system.network.connections",
"system.network.dropped",
"system.network.errors",
"system.network.io",
"system.network.packets",
"system.network.dropped.receive",
"system.network.dropped.transmit",
"system.network.errors.receive",
"system.network.errors.transmit",
"system.network.io.receive",
"system.network.io.transmit",
"system.network.packets.receive",
"system.network.packets.transmit",
"system.paging.operations",
"system.paging.usage",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ These are the metrics available for this scraper.
| Name | Description | Unit | Type | Attributes |
| ---- | ----------- | ---- | ---- | ---------- |
| **system.network.connections** | The number of connections. | {connections} | Sum(Int) | <ul> <li>protocol</li> <li>state</li> </ul> |
| **system.network.dropped** | The number of packets dropped. | {packets} | Sum(Int) | <ul> <li>device</li> <li>direction</li> </ul> |
| **system.network.errors** | The number of errors encountered. | {errors} | Sum(Int) | <ul> <li>device</li> <li>direction</li> </ul> |
| **system.network.io** | The number of bytes transmitted and received. | By | Sum(Int) | <ul> <li>device</li> <li>direction</li> </ul> |
| **system.network.packets** | The number of packets transferred. | {packets} | Sum(Int) | <ul> <li>device</li> <li>direction</li> </ul> |
| **system.network.dropped.receive** | The number of packets dropped on receive. | {packets} | Sum(Int) | <ul> <li>device</li> </ul> |
| **system.network.dropped.transmit** | The number of packets dropped on transmit. | {packets} | Sum(Int) | <ul> <li>device</li> </ul> |
| **system.network.errors.receive** | The number of errors encountered on receive. | {errors} | Sum(Int) | <ul> <li>device</li> </ul> |
| **system.network.errors.transmit** | The number of errors encountered on transmit. | {errors} | Sum(Int) | <ul> <li>device</li> </ul> |
| **system.network.io.receive** | The number of bytes received. | By | Sum(Int) | <ul> <li>device</li> </ul> |
| **system.network.io.transmit** | The number of bytes transmitted. | By | Sum(Int) | <ul> <li>device</li> </ul> |
| **system.network.packets.receive** | The number of packets received. | {packets} | Sum(Int) | <ul> <li>device</li> </ul> |
| **system.network.packets.transmit** | The number of packets transmitted. | {packets} | Sum(Int) | <ul> <li>device</li> </ul> |

**Highlighted metrics** are emitted by default. Other metrics are optional and not emitted by default.
Any metric can be enabled or disabled with the following scraper configuration:
Expand All @@ -28,6 +32,5 @@ metrics:
| Name | Description | Values |
| ---- | ----------- | ------ |
| device | Name of the network interface. | |
| direction | Direction of flow of bytes/operations (receive or transmit). | receive, transmit |
| protocol | Network protocol, e.g. TCP or UDP. | tcp |
| state | State of the network connection. | |
Loading

0 comments on commit e9f71d1

Please sign in to comment.