Skip to content

Commit

Permalink
Add HCS shim api as alternative source for metric provider (amazon-co…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
KlwntSingh authored Jan 30, 2024
1 parent 86c185e commit 6cd1657
Show file tree
Hide file tree
Showing 18 changed files with 713 additions and 49 deletions.
11 changes: 7 additions & 4 deletions cmd/otelcontribcol/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ require (
github.com/IBM/sarama v1.42.1 // indirect
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.11.4 // indirect
github.com/ReneKroon/ttlcache/v2 v2.11.0 // indirect
github.com/SAP/go-hdb v1.6.2 // indirect
github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 // indirect
Expand Down Expand Up @@ -339,8 +340,10 @@ require (
github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e // indirect
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/cgroups/v3 v3.0.2 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/containerd/containerd v1.7.7 // indirect
github.com/containerd/ttrpc v1.2.2 // indirect
github.com/coreos/go-oidc v2.2.1+incompatible // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
Expand Down Expand Up @@ -394,7 +397,7 @@ require (
github.com/goccy/go-json v0.10.2 // indirect
github.com/gocql/gocql v1.3.2 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/godbus/dbus/v5 v5.0.6 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gofrs/uuid v4.2.0+incompatible // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
Expand Down Expand Up @@ -557,7 +560,7 @@ require (
github.com/opencontainers/image-spec v1.1.0-rc5 // indirect
github.com/opencontainers/runc v1.1.9 // indirect
github.com/opencontainers/runtime-spec v1.1.0-rc.3 // indirect
github.com/opencontainers/selinux v1.10.0 // indirect
github.com/opencontainers/selinux v1.11.0 // indirect
github.com/openshift/api v3.9.0+incompatible // indirect
github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect
github.com/opentracing/opentracing-go v1.2.0 // indirect
Expand Down Expand Up @@ -624,8 +627,8 @@ require (
github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect
github.com/uber/jaeger-lib v2.4.1+incompatible // indirect
github.com/vincent-petithory/dataurl v1.0.0 // indirect
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 // indirect
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae // indirect
github.com/vishvananda/netlink v1.2.1-beta.2 // indirect
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect
github.com/vmware/go-vmware-nsxt v0.0.0-20220328155605-f49a14c1ef5f // indirect
github.com/vmware/govmomi v0.33.1 // indirect
github.com/vultr/govultr/v2 v2.17.2 // indirect
Expand Down
22 changes: 13 additions & 9 deletions cmd/otelcontribcol/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ require (
github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/Microsoft/hcsshim v0.11.4 // indirect
github.com/ReneKroon/ttlcache/v2 v2.11.0 // indirect
github.com/SAP/go-hdb v1.6.2 // indirect
github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 // indirect
Expand Down Expand Up @@ -313,8 +314,10 @@ require (
github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e // indirect
github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe // indirect
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/cgroups/v3 v3.0.2 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/containerd/containerd v1.7.7 // indirect
github.com/containerd/ttrpc v1.2.2 // indirect
github.com/coreos/go-oidc v2.2.1+incompatible // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
Expand Down
6 changes: 5 additions & 1 deletion go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 10 additions & 7 deletions receiver/awscontainerinsightreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscon
go 1.20

require (
github.com/Microsoft/hcsshim v0.11.4
github.com/amazon-contributing/opentelemetry-collector-contrib/override/aws v0.0.0-00010101000000-000000000000
github.com/aws/aws-sdk-go v1.47.10
github.com/go-kit/log v0.2.1
github.com/google/cadvisor v0.48.1
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.89.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.89.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.92.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8s v0.89.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/metrics v0.89.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.89.0
Expand All @@ -32,6 +33,7 @@ require (
k8s.io/client-go v0.28.3
k8s.io/klog v1.0.0
k8s.io/kubelet v0.28.3

)

require (
Expand All @@ -51,9 +53,11 @@ require (
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect
github.com/cilium/ebpf v0.7.0 // indirect
github.com/cilium/ebpf v0.9.1 // indirect
github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/containerd/console v1.0.3 // indirect
github.com/containerd/containerd v1.6.23 // indirect
github.com/containerd/ttrpc v1.2.2 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
Expand All @@ -71,7 +75,6 @@ require (
github.com/evanphx/json-patch v5.6.0+incompatible // indirect
github.com/fatih/color v1.15.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/frankban/quicktest v1.14.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.3.0 // indirect
Expand Down Expand Up @@ -149,10 +152,10 @@ require (
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.89.0 // indirect
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus v0.89.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.2 // indirect
github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect
github.com/opencontainers/runc v1.1.9 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20220909204839-494a5a6aca78 // indirect
github.com/opencontainers/selinux v1.10.0 // indirect
github.com/opencontainers/selinux v1.10.1 // indirect
github.com/openshift/api v3.9.0+incompatible // indirect
github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect
github.com/ovh/go-ovh v1.4.3 // indirect
Expand All @@ -174,8 +177,8 @@ require (
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
github.com/tklauser/go-sysconf v0.3.12 // indirect
github.com/tklauser/numcpus v0.6.1 // indirect
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852 // indirect
github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae // indirect
github.com/vishvananda/netlink v1.2.1-beta.2 // indirect
github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect
github.com/vultr/govultr/v2 v2.17.2 // indirect
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.opencensus.io v0.24.0 // indirect
Expand Down
Loading

0 comments on commit 6cd1657

Please sign in to comment.