diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index e3aac3e51deb..f5cb36a3ad56 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -157,6 +157,7 @@ receiver/activedirectorydsreceiver/ @open-telemetry/collect receiver/aerospikereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @antonblock receiver/apachereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/awscloudwatchreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @schmikei +receiver/awscloudwatchmetricsreceiver @open-telemetry/collector-contrib-approvers @lewis262626 @jpkrohling @kovrus receiver/awscontainerinsightreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @pxaws receiver/awsecscontainermetricsreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 receiver/awsfirehosereceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @@ -238,4 +239,4 @@ receiver/zookeeperreceiver/ @open-telemetry/collect testbed/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers testbed/mockdatareceivers/mockawsxrayreceiver/ @open-telemetry/collector-contrib-approvers @willarmiros -testbed/mockdatasenders/mockdatadogagentexporter/ @open-telemetry/collector-contrib-approvers @boostchicken \ No newline at end of file +testbed/mockdatasenders/mockdatadogagentexporter/ @open-telemetry/collector-contrib-approvers @boostchicken diff --git a/receiver/awscloudwatchmetricsreceiver/go.mod b/receiver/awscloudwatchmetricsreceiver/go.mod new file mode 100644 index 000000000000..dc1652c6c3b9 --- /dev/null +++ b/receiver/awscloudwatchmetricsreceiver/go.mod @@ -0,0 +1,3 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscloudwatchmetricsreceiver + +go 1.19 diff --git a/receiver/awscloudwatchmetricsreceiver/receiver.go b/receiver/awscloudwatchmetricsreceiver/receiver.go index e69de29bb2d1..2c847a1f9160 100644 --- a/receiver/awscloudwatchmetricsreceiver/receiver.go +++ b/receiver/awscloudwatchmetricsreceiver/receiver.go @@ -0,0 +1,38 @@ +// Copyright The OpenTelemetry Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package awscloudwatchmetricsreceiver + +import ( + "errors" + "time" +) + +var ( + defaultPollInterval = time.Minute +) + +// Config is the overall config structure for the awscloudwatchmetricsreceiver +type Config struct { + Region string `mapstructure:"region"` + Profile string `mapstructure:"profile"` + IMDSEndpoint string `mapstructure:"imds_endpoint"` + PollInterval time.Duration `mapstructure:"poll_interval"` +} + +var ( + errNoLogsConfigured = errors.New("no metrics configured") + errNoRegion = errors.New("no region was specified") + errInvalidPollInterval = errors.New("poll interval is incorrect, it must be a duration greater than one second") +)