Skip to content

Commit

Permalink
[receiver/vcenter] removing direction feature gate (open-telemetry#1…
Browse files Browse the repository at this point in the history
…4963)

* [receiver/vcenter] removing direction feature gate

The following feature gates have been removed after being deprecated for a few versions:

- receiver.vcenterreceiver.emitMetricsWithoutDirectionAttribute
- receiver.vcenterreceiver.emitMetricsWithDirectionAttribute
  • Loading branch information
Alex Boten authored and shalper2 committed Dec 6, 2022
1 parent 1f11f44 commit be36f5a
Show file tree
Hide file tree
Showing 9 changed files with 241 additions and 1,585 deletions.
16 changes: 16 additions & 0 deletions .chloggen/rm-direction-vcenterreceiver.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: vcenterreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "removing direction feature gate"

# One or more tracking issues related to the change
issues: [14963]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:
12 changes: 0 additions & 12 deletions receiver/vcenterreceiver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,5 @@ The full list of settings exposed for this receiver are documented [here](./conf
Details about the metrics produced by this receiver can be found in [metadata.yaml](./metadata.yaml) with further documentation in [documentation.md](./documentation.md)
### Feature gate configurations
#### Transition from metrics with "direction" attribute
The proposal to change metrics from being reported with a `direction` attribute has been reverted in the specification. As a result, the
following feature gates will be removed in v0.62.0:

- **receiver.vcenterreceiver.emitMetricsWithoutDirectionAttribute**
- **receiver.vcenterreceiver.emitMetricsWithDirectionAttribute**

For additional information, see https://github.com/open-telemetry/opentelemetry-specification/issues/2726.

[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
16 changes: 0 additions & 16 deletions receiver/vcenterreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,43 +20,27 @@ These are the metrics available for this scraper.
| **vcenter.host.cpu.usage** | The amount of CPU in Hz used by the host. | MHz | Sum(Int) | <ul> </ul> |
| **vcenter.host.cpu.utilization** | The CPU utilization of the host system. | % | Gauge(Double) | <ul> </ul> |
| **vcenter.host.disk.latency.avg** | The latency of operations to the host system's disk. This latency is the sum of the device and kernel read and write latencies. Requires Performance Counter level 2 for metric to populate. | ms | Gauge(Int) | <ul> <li>disk_direction</li> </ul> |
| **vcenter.host.disk.latency.avg.read** | The latency of reads to the host system's disk. This latency is the sum of the device and kernel read latencies. Requires Performance Counter level 2 for metric to populate. | ms | Gauge(Int) | <ul> </ul> |
| **vcenter.host.disk.latency.avg.write** | The latency of writes to the host system's disk. This latency is the sum of the device and kernel write latencies. Requires Performance Counter level 2 for metric to populate. | ms | Gauge(Int) | <ul> </ul> |
| **vcenter.host.disk.latency.max** | Highest latency value across all disks used by the host. As measured over the most recent 20s interval. Requires Performance Level 3. | ms | Gauge(Int) | <ul> </ul> |
| **vcenter.host.disk.throughput** | Average number of kilobytes read from or written to the disk each second. As measured over the most recent 20s interval. Aggregated disk I/O rate. Requires Performance Level 4. | {KiBy/s} | Sum(Int) | <ul> <li>disk_direction</li> </ul> |
| **vcenter.host.disk.throughput.read** | Average number of kilobytes read from the disk each second. As measured over the most recent 20s interval. Aggregated disk read rate. Requires Performance Level 4. | {KiBy/s} | Sum(Int) | <ul> </ul> |
| **vcenter.host.disk.throughput.write** | Average number of kilobytes written to the disk each second. As measured over the most recent 20s interval. Aggregated disk write rate. Requires Performance Level 4. | {KiBy/s} | Sum(Int) | <ul> </ul> |
| **vcenter.host.memory.usage** | The amount of memory the host system is using. | MiBy | Sum(Int) | <ul> </ul> |
| **vcenter.host.memory.utilization** | The percentage of the host system's memory capacity that is being utilized. | % | Gauge(Double) | <ul> </ul> |
| **vcenter.host.network.packet.count** | The number of packets transmitted and received, as measured over the most recent 20s interval. | {packets/sec} | Sum(Int) | <ul> <li>throughput_direction</li> </ul> |
| **vcenter.host.network.packet.count.receive** | The number of packets received, as measured over the most recent 20s interval. | {packets/sec} | Sum(Int) | <ul> </ul> |
| **vcenter.host.network.packet.count.transmit** | The number of packets transmitted, as measured over the most recent 20s interval. | {packets/sec} | Sum(Int) | <ul> </ul> |
| **vcenter.host.network.packet.errors** | The summation of packet errors on the host network. As measured over the most recent 20s interval. | {errors} | Sum(Int) | <ul> <li>throughput_direction</li> </ul> |
| **vcenter.host.network.packet.errors.receive** | The summation of receive packet errors on the host network. As measured over the most recent 20s interval. | {errors} | Sum(Int) | <ul> </ul> |
| **vcenter.host.network.packet.errors.transmit** | The summation of transmit packet errors on the host network. As measured over the most recent 20s interval. | {errors} | Sum(Int) | <ul> </ul> |
| **vcenter.host.network.throughput** | The amount of data that was transmitted or received over the network by the host. As measured over the most recent 20s interval. | {KiBy/s} | Sum(Int) | <ul> <li>throughput_direction</li> </ul> |
| **vcenter.host.network.throughput.receive** | The amount of data that was received over the network by the host. As measured over the most recent 20s interval. | {KiBy/s} | Sum(Int) | <ul> </ul> |
| **vcenter.host.network.throughput.transmit** | The amount of data that was transmitted over the network by the host. As measured over the most recent 20s interval. | {KiBy/s} | Sum(Int) | <ul> </ul> |
| **vcenter.host.network.usage** | The sum of the data transmitted and received for all the NIC instances of the host. | {KiBy/s} | Sum(Int) | <ul> </ul> |
| **vcenter.resource_pool.cpu.shares** | The amount of shares of CPU in the resource pool. | {shares} | Sum(Int) | <ul> </ul> |
| **vcenter.resource_pool.cpu.usage** | The usage of the CPU used by the resource pool. | {MHz} | Sum(Int) | <ul> </ul> |
| **vcenter.resource_pool.memory.shares** | The amount of shares of memory in the resource pool. | {shares} | Sum(Int) | <ul> </ul> |
| **vcenter.resource_pool.memory.usage** | The usage of the memory by the resource pool. | MiBy | Sum(Int) | <ul> </ul> |
| **vcenter.vm.disk.latency.avg** | The latency of operations to the virtual machine's disk. Requires Performance Counter level 2 for metric to populate. As measured over the most recent 20s interval. | ms | Gauge(Int) | <ul> <li>disk_direction</li> <li>disk_type</li> </ul> |
| **vcenter.vm.disk.latency.avg.read** | The latency of reads to the virtual machine's disk. Requires Performance Counter level 2 for metric to populate. As measured over the most recent 20s interval. | ms | Gauge(Int) | <ul> <li>disk_type</li> </ul> |
| **vcenter.vm.disk.latency.avg.write** | The latency of writes to the virtual machine's disk. Requires Performance Counter level 2 for metric to populate. As measured over the most recent 20s interval. | ms | Gauge(Int) | <ul> <li>disk_type</li> </ul> |
| **vcenter.vm.disk.latency.max** | The highest reported total latency (device and kernel times) over an interval of 20 seconds. | ms | Gauge(Int) | <ul> </ul> |
| **vcenter.vm.disk.throughput** | The throughput of the virtual machine's disk. | By/sec | Sum(Int) | <ul> </ul> |
| **vcenter.vm.disk.usage** | The amount of storage space used by the virtual machine. | By | Sum(Int) | <ul> <li>disk_state</li> </ul> |
| **vcenter.vm.disk.utilization** | The utilization of storage on the virtual machine. | % | Gauge(Double) | <ul> </ul> |
| **vcenter.vm.memory.ballooned** | The amount of memory that is ballooned due to virtualization. | By | Sum(Int) | <ul> </ul> |
| **vcenter.vm.memory.usage** | The amount of memory that is used by the virtual machine. | MiBy | Sum(Int) | <ul> </ul> |
| **vcenter.vm.network.packet.count** | The amount of packets that was received or transmitted over the instance's network. | {packets/sec} | Sum(Int) | <ul> <li>throughput_direction</li> </ul> |
| **vcenter.vm.network.packet.count.receive** | The amount of packets that was received over the instance's network. | {packets/sec} | Sum(Int) | <ul> </ul> |
| **vcenter.vm.network.packet.count.transmit** | The amount of packets that was transmitted over the instance's network. | {packets/sec} | Sum(Int) | <ul> </ul> |
| **vcenter.vm.network.throughput** | The amount of data that was transmitted or received over the network of the virtual machine. As measured over the most recent 20s interval. | By/sec | Sum(Int) | <ul> <li>throughput_direction</li> </ul> |
| **vcenter.vm.network.throughput.receive** | The amount of data that was received over the network of the virtual machine. As measured over the most recent 20s interval. | By/sec | Sum(Int) | <ul> </ul> |
| **vcenter.vm.network.throughput.transmit** | The amount of data that was transmitted over the network of the virtual machine. As measured over the most recent 20s interval. | By/sec | Sum(Int) | <ul> </ul> |
| **vcenter.vm.network.usage** | The network utilization combined transmit and receive rates during an interval. As measured over the most recent 20s interval. | {KiBy/s} | Sum(Int) | <ul> </ul> |

**Highlighted metrics** are emitted by default. Other metrics are optional and not emitted by default.
Expand Down
15 changes: 0 additions & 15 deletions receiver/vcenterreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ import (
"go.opentelemetry.io/collector/config"
"go.opentelemetry.io/collector/config/configtls"
"go.opentelemetry.io/collector/consumer"
"go.opentelemetry.io/collector/featuregate"
"go.opentelemetry.io/collector/receiver/scraperhelper"
"go.uber.org/zap"

"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver/internal/metadata"
)
Expand Down Expand Up @@ -57,12 +55,6 @@ func createDefaultConfig() config.Receiver {

var errConfigNotVcenter = errors.New("config was not an vcenter receiver config")

func logDeprecatedFeatureGateForDirection(log *zap.Logger, gate featuregate.Gate) {
log.Warn("WARNING: The " + gate.ID + " feature gate is deprecated and will be removed in the next release. The change to remove " +
"the direction attribute has been reverted in the specification. See https://github.com/open-telemetry/opentelemetry-specification/issues/2726 " +
"for additional details.")
}

func createMetricsReceiver(
_ context.Context,
params component.ReceiverCreateSettings,
Expand All @@ -75,13 +67,6 @@ func createMetricsReceiver(
}
vr := newVmwareVcenterScraper(params.Logger, cfg, params)

if !vr.emitMetricsWithDirectionAttribute {
logDeprecatedFeatureGateForDirection(vr.logger, emitMetricsWithDirectionAttributeFeatureGate)
}

if vr.emitMetricsWithoutDirectionAttribute {
logDeprecatedFeatureGateForDirection(vr.logger, emitMetricsWithoutDirectionAttributeFeatureGate)
}
scraper, err := scraperhelper.NewScraper(
typeStr,
vr.scrape,
Expand Down
Loading

0 comments on commit be36f5a

Please sign in to comment.