Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HCS shim api as alternative source for metric provider #154

Merged

Conversation

KlwntSingh
Copy link

Description:

  1. Added hcshim API as alternative to kubelet for networking stats
  2. Added unit tests for hcsshim provider
  3. Add new fields to network extractor

Testing:

  1. Existing and new Unit test tests pass for kubelet, hcshim and net_extractor

@KlwntSingh KlwntSingh requested a review from mxiamxia as a code owner January 29, 2024 06:45
1. Add storage extractors for container and node level
2. Add metric source for Windows metric collection
3. Refactor metric source for cadvisor
4. Add os label for windows

# Conflicts:
#	internal/aws/containerinsight/const.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractorhelpers.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/fs_extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet_test.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils_test.go
@KlwntSingh KlwntSingh force-pushed the hcsshim_api branch 2 times, most recently from 905a8a3 to 199d66f Compare January 29, 2024 17:15
1. Added hcshim API as alternative to kubelet for networking stats
2. Added unit tests for hcsshim provider
3. Add new fields to network extractor
chadpatel
chadpatel previously approved these changes Jan 29, 2024
mitali-salvi
mitali-salvi previously approved these changes Jan 29, 2024
1. Ran `go mod tidy` inside cmd/otelcontribcol
@KlwntSingh KlwntSingh dismissed stale reviews from mitali-salvi and chadpatel via c7dea01 January 29, 2024 22:01
@KlwntSingh KlwntSingh merged commit 6cd1657 into amazon-contributing:aws-cwa-ciwindows Jan 30, 2024
36 of 67 checks passed
KlwntSingh added a commit to KlwntSingh/opentelemetry-collector-contrib that referenced this pull request Jan 30, 2024
…ntributing#154)

* Add storage metrics for container and node level

1. Add storage extractors for container and node level
2. Add metric source for Windows metric collection
3. Refactor metric source for cadvisor
4. Add os label for windows

# Conflicts:
#	internal/aws/containerinsight/const.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractorhelpers.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/fs_extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet_test.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils_test.go

* Add hcsshim API as source

1. Added hcshim API as alternative to kubelet for networking stats
2. Added unit tests for hcsshim provider
3. Add new fields to network extractor

* Fix e2e test for docker build

1. Ran `go mod tidy` inside cmd/otelcontribcol
KlwntSingh added a commit to KlwntSingh/opentelemetry-collector-contrib that referenced this pull request Feb 2, 2024
…ntributing#154)

* Add storage metrics for container and node level

1. Add storage extractors for container and node level
2. Add metric source for Windows metric collection
3. Refactor metric source for cadvisor
4. Add os label for windows

# Conflicts:
#	internal/aws/containerinsight/const.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractorhelpers.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/fs_extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet_test.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils_test.go

* Add hcsshim API as source

1. Added hcshim API as alternative to kubelet for networking stats
2. Added unit tests for hcsshim provider
3. Add new fields to network extractor

* Fix e2e test for docker build

1. Ran `go mod tidy` inside cmd/otelcontribcol
KlwntSingh added a commit to KlwntSingh/opentelemetry-collector-contrib that referenced this pull request Feb 2, 2024
…ntributing#154)

* Add storage metrics for container and node level

1. Add storage extractors for container and node level
2. Add metric source for Windows metric collection
3. Refactor metric source for cadvisor
4. Add os label for windows

# Conflicts:
#	internal/aws/containerinsight/const.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractorhelpers.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/fs_extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet_test.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils_test.go

* Add hcsshim API as source

1. Added hcshim API as alternative to kubelet for networking stats
2. Added unit tests for hcsshim provider
3. Add new fields to network extractor

* Fix e2e test for docker build

1. Ran `go mod tidy` inside cmd/otelcontribcol
KlwntSingh added a commit to KlwntSingh/opentelemetry-collector-contrib that referenced this pull request Feb 22, 2024
…ntributing#154)

* Add storage metrics for container and node level

1. Add storage extractors for container and node level
2. Add metric source for Windows metric collection
3. Refactor metric source for cadvisor
4. Add os label for windows

# Conflicts:
#	internal/aws/containerinsight/const.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractorhelpers.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/fs_extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet_test.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils_test.go

* Add hcsshim API as source

1. Added hcshim API as alternative to kubelet for networking stats
2. Added unit tests for hcsshim provider
3. Add new fields to network extractor

* Fix e2e test for docker build

1. Ran `go mod tidy` inside cmd/otelcontribcol
KlwntSingh added a commit to KlwntSingh/opentelemetry-collector-contrib that referenced this pull request Feb 22, 2024
…ntributing#154)

* Add storage metrics for container and node level

1. Add storage extractors for container and node level
2. Add metric source for Windows metric collection
3. Refactor metric source for cadvisor
4. Add os label for windows

# Conflicts:
#	internal/aws/containerinsight/const.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractorhelpers.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/fs_extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet_test.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils_test.go

* Add hcsshim API as source

1. Added hcshim API as alternative to kubelet for networking stats
2. Added unit tests for hcsshim provider
3. Add new fields to network extractor

* Fix e2e test for docker build

1. Ran `go mod tidy` inside cmd/otelcontribcol
# Conflicts:
#	receiver/awscontainerinsightreceiver/go.mod
#	receiver/awscontainerinsightreceiver/go.sum
KlwntSingh added a commit that referenced this pull request Feb 29, 2024
… commits (#168)

Add support for Container Insights on Windows for EKS  

* Add kubelet summary API for Windows (#142)
* CPU extractors with unit tests (#146)
* Add memory extractors for pod and node level (#147)
* Define structs for CPU and Memory stats (#149)
* Add Container level metrics for CPU and memory resources. (#150)
* Add storage metrics for container and node level (#151)
* Add network metrics (#152)
* Enable awscontainerinsights receiver to run inside Host Process container (#153)
* Add HCS shim api as alternative source for metric provider (#154)
* Add check for host process container before reading from hcshim (#156)
* Fix CPU utilization percentage for Windows nodes (#161)
* Add List of Metrics for Windows + Design (#166)
* fix fstype (#164)
KlwntSingh added a commit to KlwntSingh/opentelemetry-collector-contrib that referenced this pull request Mar 2, 2024
…ntributing#154)

* Add storage metrics for container and node level

1. Add storage extractors for container and node level
2. Add metric source for Windows metric collection
3. Refactor metric source for cadvisor
4. Add os label for windows

# Conflicts:
#	internal/aws/containerinsight/const.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractorhelpers.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/fs_extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/k8swindows.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet_test.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils.go
#	receiver/awscontainerinsightreceiver/internal/stores/utils_test.go

* Add hcsshim API as source

1. Added hcshim API as alternative to kubelet for networking stats
2. Added unit tests for hcsshim provider
3. Add new fields to network extractor

* Fix e2e test for docker build

1. Ran `go mod tidy` inside cmd/otelcontribcol
# Conflicts:
#	receiver/awscontainerinsightreceiver/go.mod
#	receiver/awscontainerinsightreceiver/go.sum

# Conflicts:
#	receiver/awscontainerinsightreceiver/internal/k8swindows/extractors/extractor.go
#	receiver/awscontainerinsightreceiver/internal/k8swindows/kubelet/kubelet.go
KlwntSingh added a commit that referenced this pull request Mar 7, 2024
* Add kubelet summary API for Windows (#142)
* CPU extractors with unit tests (#146)
* Add memory extractors for pod and node level (#147)
* Define structs for CPU and Memory stats (#149)
* Add Container level metrics for CPU and memory resources. (#150)
* Add storage metrics for container and node level (#151)
* Add network metrics (#152)
* Enable awscontainerinsights receiver to run inside Host Process container (#153)
* Add HCS shim api as alternative source for metric provider (#154)
* Add check for host process container before reading from hcshim (#156)
* Fix CPU utilization percentage for Windows nodes (#161)
* Add List of Metrics for Windows + Design (#166)
* fix fstype (#164)
* Add windows build tag to fix building cw agent on Windows
* Downgrade internal/aws/containerinsight from 0.92 0.89
* Separate unit tests in util.go specific for Windows
* Fix util unit tests applicable for Windows
* Fix goporto issue
* Fix lint issue
* Fix regression in unit tests caused due to rebasing mainline
* Add unit tests for k8s Windows
* Add unit test for kubelet client on Windows
* Run DCGM scrapper only for CW agent on Linux
* Separate out node Volume unit tests for Windows
* Add changelog for Container Insights on Windows
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.

3 participants