diff --git a/.env b/.env index 4871fce10f..4f9b8e5345 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -config=--config /opt/aws/aws-otel-collector/etc/config.yaml +config="--config /opt/aws/aws-otel-collector/etc/config.yaml" diff --git a/.github/workflows/PR-build.yml b/.github/workflows/PR-build.yml index de66263948..3af64601f7 100644 --- a/.github/workflows/PR-build.yml +++ b/.github/workflows/PR-build.yml @@ -104,10 +104,10 @@ jobs: key: "cached_binaries_${{ github.run_id }}" path: build - # Unit Test and attach test coverage badge - - name: Unit Test + # Linting && Unit Test and attach test coverage badge + - name: Tests - Lint and unit test if: ${{ needs.changes.outputs.changed == 'true' && steps.cached_binaries.outputs.cache-hit != 'true' }} - run: make gotest + run: make test-all - name: Upload Coverage report to CodeCov if: ${{ needs.changes.outputs.changed == 'true' && steps.cached_binaries.outputs.cache-hit != 'true' }} diff --git a/Makefile b/Makefile index ae7c2dcdff..2aa2c8208b 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,9 @@ ALL_SRC := $(shell find . -name '*.go' \ # ALL_MODULES includes ./* dirs (excludes . dir) ALL_MODULES := $(shell find . -type f -name "go.mod" -exec dirname {} \; | sort | egrep '^./' ) +# TODO: replace by a find command that looks for all the ".sh" files + other scripts +ALL_SHELL_SCRIPTS := "tools/ctl/linux/aws-otel-collector-ctl" + BUILD_INFO_IMPORT_PATH=$(AOC_IMPORT_PATH)/tools/version GOBUILD=GO111MODULE=on CGO_ENABLED=0 installsuffix=cgo go build -trimpath @@ -157,6 +160,13 @@ docker-stop: gotest: @$(MAKE) for-all-target TARGET="test" +.PHONY: lint-sh +lint-sh: + shellcheck ${ALL_SHELL_SCRIPTS} + +.PHONY: test-all +test-all: gotest lint-sh + .PHONY: gofmt gofmt: @$(MAKE) for-all-target TARGET="fmt" diff --git a/README.md b/README.md index 2f45967c9c..f841546c50 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,23 @@ This table represents the supported components of the ADOT Collector. The highli | [zipkinreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/zipkinreceiver#zipkin-receiver) | [metricstransformprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricstransformprocessor#metrics-transform-processor) | [fileexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/fileexporter#file-exporter) | [ballastextention](https://github.com/open-telemetry/opentelemetry-collector/tree/main/extension/ballastextension#memory-ballast) | | [jaegerreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/jaegerreceiver#jaeger-receiver) | [spanprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/spanprocessor#span-processor) | [otlphttpexporter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlphttpexporter#otlphttp-exporter) | [`sigv4authextension`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/extension/sigv4authextension) | | [`awscontainerinsightreceiver`](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/awscontainerinsightreceiver) | [filterprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/filterprocessor#filter-processor) | [prometheusexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/prometheusexporter#prometheus-exporter) | | -| | [resourcedetectionprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor#resource-detection-processor) | [datadogexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/datadogexporter#datadog-exporter) | | +| [kafka](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/kafkareceiver) | [resourcedetectionprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourcedetectionprocessor#resource-detection-processor) | [datadogexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/datadogexporter#datadog-exporter) | | | | [metricsgenerationprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/metricsgenerationprocessor#metrics-generation-processor) | [dynatraceexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/dynatraceexporter#dynatrace-exporter) | | | | [cumulativetodeltaprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/cumulativetodeltaprocessor#cumulative-to-delta-processor) | [sapmexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/sapmexporter#sapm-exporter) | | | | [deltatorateprocessor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/deltatorateprocessor#delta-to-rate-processor) | [signalfxexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/signalfxexporter#signalfx-metrics-exporter) | | | | | [logzioexporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/logzioexporter#logzio-exporter) | | +| | | [kafka](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/kafkaexporter)| | + +Besides the components that interact with telemetry signals directly from the previous table, there is also support to the following confmap providers: + +* file +* env +* YAML +* s3 +* http +* https + +More documentation for confmap providers can be found [here](https://aws-otel.github.io/docs/components/confmap-providers). ### Getting Started diff --git a/go.mod b/go.mod index 30b14ebd56..5377111d96 100644 --- a/go.mod +++ b/go.mod @@ -4,11 +4,13 @@ go 1.19 require ( github.com/aws/aws-sdk-go v1.44.220 + github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.74.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.74.0 @@ -33,6 +35,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.74.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.74.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.74.0 @@ -93,6 +96,7 @@ require ( github.com/DataDog/zstd v1.5.2 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.11.2 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/Shopify/sarama v1.38.1 // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/alecthomas/participle/v2 v2.0.0-beta.5 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect @@ -100,13 +104,17 @@ require ( github.com/apache/thrift v0.18.1 // indirect github.com/armon/go-metrics v0.4.0 // indirect github.com/aws/aws-sdk-go-v2 v1.17.7 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0 // indirect github.com/aws/aws-sdk-go-v2/config v1.18.19 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.18 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.1 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.32 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.0 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.19.0 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.12.6 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.6 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.18.7 // indirect @@ -134,6 +142,9 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0 // indirect + github.com/eapache/go-resiliency v1.3.0 // indirect + github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6 // indirect + github.com/eapache/queue v1.1.0 // indirect github.com/emicklei/go-restful/v3 v3.9.0 // indirect github.com/envoyproxy/go-control-plane v0.10.3 // indirect github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect @@ -182,6 +193,7 @@ require ( github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.1 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect github.com/hashicorp/golang-lru v0.6.0 // indirect github.com/hashicorp/nomad/api v0.0.0-20230124213148-69fd1a0e4bf7 // indirect github.com/hashicorp/serf v0.10.1 // indirect @@ -191,6 +203,11 @@ require ( github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/ionos-cloud/sdk-go/v6 v6.1.3 // indirect github.com/jaegertracing/jaeger v1.41.0 // indirect + github.com/jcmturner/aescts/v2 v2.0.0 // indirect + github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect + github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect + github.com/jcmturner/rpc/v2 v2.0.3 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect @@ -259,6 +276,7 @@ require ( github.com/panta/machineid v1.0.2 // indirect github.com/patrickmn/go-cache v2.1.0+incompatible // indirect github.com/philhofer/fwd v1.1.2 // indirect + github.com/pierrec/lz4/v4 v4.1.17 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect github.com/prometheus/client_golang v1.14.0 // indirect @@ -268,6 +286,7 @@ require ( github.com/prometheus/procfs v0.8.0 // indirect github.com/prometheus/prometheus v0.42.1-0.20230210113933-af1d9e01c7e4 // indirect github.com/prometheus/statsd_exporter v0.22.7 // indirect + github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/cors v1.8.3 // indirect github.com/scaleway/scaleway-sdk-go v1.0.0-beta.12 // indirect github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646 // indirect @@ -295,6 +314,9 @@ require ( github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5 // indirect github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f // indirect github.com/vultr/govultr/v2 v2.17.2 // indirect + github.com/xdg-go/pbkdf2 v1.0.0 // indirect + github.com/xdg-go/scram v1.1.2 // indirect + github.com/xdg-go/stringprep v1.0.4 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector/consumer v0.74.0 // indirect diff --git a/go.sum b/go.sum index e2feb4a6ae..2c24658805 100644 --- a/go.sum +++ b/go.sum @@ -159,8 +159,12 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdko github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/sarama v1.22.2-0.20190604114437-cd910a683f9f/go.mod h1:XLH1GYJnLVE0XCr6KdJGVJRTwY30moWNJ4sERjXX6fs= github.com/Shopify/sarama v1.32.0/go.mod h1:+EmJJKZWVT/faR9RcOxJerP+LId4iWdQPBGLy1Y1Njs= +github.com/Shopify/sarama v1.38.1 h1:lqqPUPQZ7zPqYlWpTh+LQ9bhYNu2xJL6k1SJN4WVe2A= +github.com/Shopify/sarama v1.38.1/go.mod h1:iwv9a67Ha8VNa+TifujYoWGxWnu2kNVAQdSdZ4X2o5g= +github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/Shopify/toxiproxy/v2 v2.3.0/go.mod h1:KvQTtB6RjCJY4zqNJn7C7JDFgsG5uoHYDirfUfpIm0c= +github.com/Shopify/toxiproxy/v2 v2.5.0 h1:i4LPT+qrSlKNtQf5QliVjdP08GyAH8+BUIc9gT0eahc= github.com/Showmax/go-fqdn v1.0.0 h1:0rG5IbmVliNT5O19Mfuvna9LL7zlHyRfsSvBPZmF9tM= github.com/Showmax/go-fqdn v1.0.0/go.mod h1:SfrFBzmDCtCGrnHhoDjuvFnKsWjEQX/Q9ARZvOrJAko= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -222,8 +226,11 @@ github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZw github.com/aws/aws-sdk-go-v2 v1.7.0/go.mod h1:tb9wi5s61kTDA5qCkcDbt3KRVV74GGslQkl/DRdX/P4= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2 v1.9.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= +github.com/aws/aws-sdk-go-v2 v1.11.0/go.mod h1:SQfA+m2ltnu1cA0soUkj4dRSsmITiVQUJvBIZjzfPyQ= github.com/aws/aws-sdk-go-v2 v1.17.7 h1:CLSjnhJSTSogvqUGhIC6LqFKATMRexcxLZ0i/Nzk9Eg= github.com/aws/aws-sdk-go-v2 v1.17.7/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0 h1:yVUAwvJC/0WNPbyl0nA3j1L6CW1CN8wBubCRqtG7JLI= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.0.0/go.mod h1:Xn6sxgRuIDflLRJFj5Ev7UxABIkNbccFPV/p8itDReM= github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/config v1.18.19 h1:AqFK6zFNtq4i1EYu+eC7lcKHYnZagMn6SW171la0bGw= github.com/aws/aws-sdk-go-v2/config v1.18.19/go.mod h1:XvTmGMY8d52ougvakOv1RpiTLPz9dlG/OQHsKU/cMmY= @@ -233,8 +240,10 @@ github.com/aws/aws-sdk-go-v2/credentials v1.13.18/go.mod h1:vnwlwjIe+3XJPBYKu1et github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.1 h1:gt57MN3liKiyGopcqgNzJb2+d9MJaKT/q1OksHNXVE4= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.1/go.mod h1:lfUx8puBRdM5lVVMQlwt2v+ofiG/X6Ms+dy0UkG/kXw= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.0/go.mod h1:NO3Q5ZTTQtO2xIg2+xTXYDiT7knSejfeDm7WGDaOo0U= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31 h1:sJLYcS+eZn5EeNINGHSCRAwUJMFVqklwkH36Vbyai7M= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31/go.mod h1:QT0BqUvX1Bh2ABdTGnjqEjvjzrCfIniM9Sc8zn9Yndo= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.0.0/go.mod h1:anlUzBoEWglcUxUQwZA7HQOEVEnQALVZsizAapB2hq8= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25 h1:1mnRASEKnkqsntcxHaysxwgVoUUp5dkiB+l3llKnqyg= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25/go.mod h1:zBHOPwhBc3FlQjQJE/D3IfPWiWaQmT06Vq9aNukDo0k= github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= @@ -243,9 +252,16 @@ github.com/aws/aws-sdk-go-v2/internal/ini v1.3.32/go.mod h1:XGhIBZDEgfqmFIugclZ6 github.com/aws/aws-sdk-go-v2/service/appconfig v1.4.2/go.mod h1:FZ3HkCe+b10uFZZkFdvf98LHW21k49W8o8J366lqVKY= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.5.0/go.mod h1:acH3+MQoiMzozT/ivU+DbRg7Ooo2298RdRaWcOv+4vM= github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0 h1:lPLbw4Gn59uoKqvOfSnkJr54XWk5Ak1NK20ZEiSWb3U= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.5.0/go.mod h1:80NaCIH9YU3rzTTs/J/ECATjXuRqzo/wB6ukO6MZ0XY= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.5.0/go.mod h1:Mq6AEc+oEjCUlBuLiK5YwW4shSOAKCQ3tXN0sQeYoBA= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25 h1:5LHn8JQ0qvjD9L9JhMtylnkcw7j05GDZqM9Oin6hpr0= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25/go.mod h1:/95IA+0lMnzW6XzqYJRpjjsAbKEORVeO0anQqjd2CNU= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.0 h1:0BOlTqnNnrEO04oYKzDxMMe68t107pmIotn18HtVonY= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.9.0/go.mod h1:xKCZ4YFSF2s4Hnb/J0TLeOsKuGzICzcElaOKNGrVnx4= +github.com/aws/aws-sdk-go-v2/service/s3 v1.19.0 h1:5mRAms4TjSTOGYsqKYte5kHr1PzpMJSyLThjF3J+hw0= +github.com/aws/aws-sdk-go-v2/service/s3 v1.19.0/go.mod h1:Gwz3aVctJe6mUY9T//bcALArPUaFmNAy2rTB9qN4No8= github.com/aws/aws-sdk-go-v2/service/sso v1.4.2/go.mod h1:NBvT9R1MEF+Ud6ApJKM0G+IkPchKS7p7c2YPKwHmBOk= github.com/aws/aws-sdk-go-v2/service/sso v1.12.6 h1:5V7DWLBd7wTELVz5bPpwzYy/sikk0gsgZfj40X+l5OI= github.com/aws/aws-sdk-go-v2/service/sso v1.12.6/go.mod h1:Y1VOmit/Fn6Tz1uFAeCO6Q7M2fmfXSCLeL5INVYsLuY= @@ -256,6 +272,7 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.18.7 h1:bWNgNdRko2x6gqa0blfATqAZKZok github.com/aws/aws-sdk-go-v2/service/sts v1.18.7/go.mod h1:JuTnSoeePXmMVe9G8NcjjwgOKEfZ4cOjMuT2IBT/2eI= github.com/aws/smithy-go v1.5.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/aws/smithy-go v1.9.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= @@ -398,7 +415,12 @@ github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0 h1:wHGPJSXvwKQVf/XfhjU github.com/dynatrace-oss/dynatrace-metric-utils-go v0.5.0/go.mod h1:PseHFo8Leko7J4A/TfZ6kkHdkzKBLUta6hRZR/OEbbc= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= +github.com/eapache/go-resiliency v1.3.0 h1:RRL0nge+cWGlxXbUzJ7yMcq6w2XBEr19dCN6HECGaT0= +github.com/eapache/go-resiliency v1.3.0/go.mod h1:5yPzW0MIvSe0JDsv0v+DvcjEv2FyD6iZYSs1ZI+iQho= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= +github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6 h1:8yY/I9ndfrgrXUbOGObLHKBR4Fl3nZXwM2c7OYTT8hM= +github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6/go.mod h1:YvSRo5mw33fLEx1+DlK6L2VV43tJt5Eyel9n9XBcR+0= +github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= @@ -446,6 +468,7 @@ github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSw github.com/flynn/go-docopt v0.0.0-20140912013429-f6dd2ebbb31e/go.mod h1:HyVoz1Mz5Co8TFO8EupIdlcpwShBmY98dkT2xeHkvEI= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= @@ -881,6 +904,7 @@ github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= @@ -943,12 +967,20 @@ github.com/jaegertracing/jaeger v1.36.0/go.mod h1:67uyR2zQgEk7EfguOR3eZOGvGDRzY5 github.com/jaegertracing/jaeger v1.38.0/go.mod h1:4MBTMxfCp3d4buDLxRlHnESQvTFCkN16OUIeE9BEdl4= github.com/jaegertracing/jaeger v1.41.0 h1:vVNky8dP46M2RjGaZ7qRENqylW+tBFay3h57N16Ip7M= github.com/jaegertracing/jaeger v1.41.0/go.mod h1:SIkAT75iVmA9U+mESGYuMH6UQv6V9Qy4qxo0lwfCQAc= +github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= github.com/jcmturner/gofork v0.0.0-20190328161633-dc7c13fece03/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= github.com/jcmturner/gofork v1.0.0/go.mod h1:MK8+TM0La+2rjBD4jE12Kj1pCCxK7d2LK/UM3ncEo0o= +github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= +github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= +github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= github.com/jcmturner/gokrb5/v8 v8.4.2/go.mod h1:sb+Xq/fTY5yktf/VxLsE3wlfPqQjp0aWNYyvBVK62bc= +github.com/jcmturner/gokrb5/v8 v8.4.3 h1:iTonLeSJOn7MVUtyMT+arAn5AKAPrkilzhGw8wE/Tq8= +github.com/jcmturner/gokrb5/v8 v8.4.3/go.mod h1:dqRwJGXznQrzw6cWmyo6kH+E7jksEQG/CyVWsJEsJO0= +github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/jgautheron/goconst v1.4.0/go.mod h1:aAosetZ5zaeC/2EfMeRswtxUFBpe2Hr7HzkgX4fanO4= github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= @@ -1234,6 +1266,8 @@ github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAl github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/onsi/gomega v1.23.0 h1:/oxKu9c2HVap+F3PfKort2Hw5DEU+HGlW8n+tguWsys= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= +github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.74.0 h1:acWCjezYRLVyKRRGxdrYQCX8N90Cp7KYwORFGeJFw7c= +github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.74.0/go.mod h1:6TwWH4pE9KiGt7V19K+2tjt8w+Qt/OKnudfCxy9qsss= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.74.0 h1:zqWi2QU6vRq4XYFF4vc/FMW+g5Avpcw4lfJZRG8PGZs= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter v0.74.0/go.mod h1:SeMcHTiSNHucJjynVeBYUPuzqidcEduFMeRy5ecpAxY= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter v0.74.0 h1:BhoT9ft4r0K2+nxdlISzvmRMFZAwiZ/P3OhfgmbEurc= @@ -1244,6 +1278,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexpo github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter v0.74.0/go.mod h1:ktfYtjLVBaKOEjhekizX8R9K323bI64V8Vm4lrAu3wE= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.74.0 h1:WTFx6kiRlr3qHTIsVeKeA6AjstEy2aNB6ZGKeF05XwE= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.74.0/go.mod h1:2R1P84dGqCTt6+a0Wtox1VYIT304JXU32zloC275BxQ= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.74.0 h1:MrVOfBTNBe4n/daZjV4yvHZRR0Jg/MOCl/mNwymHwDM= +github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.74.0/go.mod h1:v4H2ATSrKfOTbQnmjCxpvuOjrO/GUURAgey9RzrPsuQ= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.74.0 h1:y7O16IcldZYuSQhzpd6IKxAls0rlLoSb5rsqe7yg7u4= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter v0.74.0/go.mod h1:kCwpLZjcr00JLzFa0yf+39ozgjg8qeGXZKbx8+4gOcw= github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.74.0 h1:sg7L0mW4oPu98lvbSk0ksO2E2pH1PVp72W0Izm7px7Q= @@ -1356,6 +1392,8 @@ github.com/open-telemetry/opentelemetry-collector-contrib/receiver/filelogreceiv github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver v0.74.0 h1:v4Tm0q7+h7eabsoSZAi86KrnfDO0ZjdQmAwE20GaLzM= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.74.0 h1:pWNSPCKD+V4rC+MnZj8uErEbcsYUpEqU3InNYyafAPY= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.74.0/go.mod h1:0lXcDf6LUbtDxZZO3zDbRzMuL7gL1Q0FPOR8/3IBwaQ= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.74.0 h1:NWd9+rQTd6pELLf3copo7CEuNgKp90kgyhPozpwax2U= +github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver v0.74.0/go.mod h1:anSbwGOousKpnNAVMNP5YieA4KOFuEzHkvya0vvtsaI= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.74.0 h1:JP0wF/0RiXEDPWHvIaExy/vh5vKoBdeCZmnzhgx8j24= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.74.0/go.mod h1:fDI6mlvqp+apb2qbiiciiDrHE+yD3MJrkaBC3FsH54k= github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver v0.74.0 h1:nHCNjdvXaA2cGvu32kbhJ/1hY5pNaMP+FJuPalHL3so= @@ -1437,6 +1475,8 @@ github.com/pierrec/lz4 v2.4.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v3 v3.3.4/go.mod h1:280XNCGS8jAcG++AHdd6SeWnzyJ1w9oow2vbORyey8Q= github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc= +github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -1520,6 +1560,7 @@ github.com/quasilyte/go-ruleguard/rules v0.0.0-20201231183845-9e62ed36efe1/go.mo github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rivo/tview v0.0.0-20200219210816-cd38d7432498/go.mod h1:6lkG1x+13OShEf0EaOCaTQYyB7d5nSbb181KtjlS+84= @@ -1742,12 +1783,17 @@ github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vb github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad/go.mod h1:Hy8o65+MXnS6EwGElrSRjUzQDLXreJlzYLlWiHtt8hM= +github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.0/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xdg-go/stringprep v1.0.4 h1:XLI/Ng3O1Atzq0oBs3TWm+5ZVgkq2aqdlvP9JtoZ6c8= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xdg/stringprep v1.0.0/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= @@ -2078,6 +2124,7 @@ golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220725212005-46097bf591d3/go.mod h1:AaygXjzTFtRAg2ttMY5RMuhpJ3cNnI0XpyFJD1iQRSM= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.3.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE= @@ -2270,6 +2317,7 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0 h1:57P1ETyNKtuIjB4SRd15iJxuhj8Gc416Y78H3qgMh68= diff --git a/pkg/config/config_factory.go b/pkg/config/config_factory.go index f2054c31ce..d514c59c0f 100644 --- a/pkg/config/config_factory.go +++ b/pkg/config/config_factory.go @@ -20,10 +20,13 @@ import ( "log" "os" + "github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/confmap/converter/expandconverter" "go.opentelemetry.io/collector/confmap/provider/envprovider" "go.opentelemetry.io/collector/confmap/provider/fileprovider" + "go.opentelemetry.io/collector/confmap/provider/httpprovider" + "go.opentelemetry.io/collector/confmap/provider/httpsprovider" "go.opentelemetry.io/collector/confmap/provider/yamlprovider" "go.opentelemetry.io/collector/otelcol" ) @@ -42,7 +45,14 @@ func GetConfigProvider(flags *flag.FlagSet) otelcol.ConfigProvider { } // generate the MapProviders for the Config Provider Settings - providers := []confmap.Provider{fileprovider.New(), envprovider.New(), yamlprovider.New()} + providers := []confmap.Provider{ + fileprovider.New(), + envprovider.New(), + yamlprovider.New(), + httpprovider.New(), + httpsprovider.New(), + s3provider.New(), + } mapProviders := make(map[string]confmap.Provider, len(providers)) for _, provider := range providers { diff --git a/pkg/defaultcomponents/defaults.go b/pkg/defaultcomponents/defaults.go index af7ff1521f..071e7e8069 100644 --- a/pkg/defaultcomponents/defaults.go +++ b/pkg/defaultcomponents/defaults.go @@ -21,6 +21,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatraceexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/logzioexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter" @@ -45,6 +46,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver" @@ -88,6 +90,7 @@ func Components() (otelcol.Factories, error) { awsxrayreceiver.NewFactory(), statsdreceiver.NewFactory(), prometheusreceiver.NewFactory(), + kafkareceiver.NewFactory(), jaegerreceiver.NewFactory(), zipkinreceiver.NewFactory(), otlpreceiver.NewFactory(), @@ -123,6 +126,7 @@ func Components() (otelcol.Factories, error) { prometheusremotewriteexporter.NewFactory(), prometheusexporter.NewFactory(), fileexporter.NewFactory(), + kafkaexporter.NewFactory(), dynatraceexporter.NewFactory(), sapmexporter.NewFactory(), signalfxexporter.NewFactory(), diff --git a/pkg/defaultcomponents/defaults_test.go b/pkg/defaultcomponents/defaults_test.go index 9ce16e0b9a..33ddcf889a 100644 --- a/pkg/defaultcomponents/defaults_test.go +++ b/pkg/defaultcomponents/defaults_test.go @@ -22,8 +22,8 @@ import ( ) const ( - exportersCount = 13 - receiversCount = 8 + exportersCount = 14 + receiversCount = 9 extensionsCount = 7 processorCount = 12 ) @@ -49,6 +49,7 @@ func TestComponents(t *testing.T) { assert.NotNil(t, exporters["signalfx"]) assert.NotNil(t, exporters["logzio"]) assert.NotNil(t, exporters["prometheusremotewrite"]) + assert.NotNil(t, exporters["kafka"]) receivers := factories.Receivers assert.Len(t, receivers, receiversCount) @@ -57,12 +58,14 @@ func TestComponents(t *testing.T) { assert.NotNil(t, receivers["awscontainerinsightreceiver"]) assert.NotNil(t, receivers["awsxray"]) assert.NotNil(t, receivers["statsd"]) + // core receivers assert.NotNil(t, receivers["otlp"]) // other receivers assert.NotNil(t, receivers["prometheus"]) assert.NotNil(t, receivers["zipkin"]) assert.NotNil(t, receivers["jaeger"]) + assert.NotNil(t, receivers["kafka"]) extensions := factories.Extensions assert.Len(t, extensions, extensionsCount) diff --git a/tools/ctl/linux/aws-otel-collector-ctl b/tools/ctl/linux/aws-otel-collector-ctl index 32f7dfc606..061d165a5b 100644 --- a/tools/ctl/linux/aws-otel-collector-ctl +++ b/tools/ctl/linux/aws-otel-collector-ctl @@ -19,16 +19,15 @@ set -u readonly AGENTDIR="/opt/aws/aws-otel-collector" readonly CMDDIR="${AGENTDIR}/bin" readonly CONFDIR="${AGENTDIR}/etc" +readonly ENV_FILE="${CONFDIR}/.env" readonly DFT_CONFDIR="${AGENTDIR}/var" -readonly LOGDIR="${AGENTDIR}/logs" -readonly RESTART_FILE="${CONFDIR}/restart" readonly VERSION_FILE="${CMDDIR}/VERSION" SYSTEMD='false' UsageString=" - usage: aws-otel-collector-ctl -a stop|start|status| [-c file:] + usage: aws-otel-collector-ctl -a stop|start|status| [-c ] e.g. 1. start collector on onPermise host with a custom .yaml config file: @@ -44,20 +43,55 @@ UsageString=" status: get the status of the agent process. -c: configuration - file:: file path on the host + : - file path on the host. E.g.: /tmp/config.yaml or file:/tmp/config.yaml + - http uri. E.g.: http://example.com/config + - https uri. E.g.: https://example.com/config + - s3 uri. E.g.: s3://bucket/config " -aoc_start() { +aoc_config_remote_uri() { + config="${1:-}" + + echo "config=\"--config ${config}\"" > $ENV_FILE +} + + +aoc_config_local_uri() { config="${1:-}" - if [ ! -z $config ] && [ -f $config ]; then - cp $config $CONFDIR/config.yaml + # Strip the file scheme in case it is present + config="${config#file:}" + + echo "config=\"--config /opt/aws/aws-otel-collector/etc/config.yaml\"" > $ENV_FILE + + if [ -n "$config" ] && [ -f "$config" ]; then + cp "$config" $CONFDIR/config.yaml fi if [ ! -f $CONFDIR/config.yaml ]; then cp $DFT_CONFDIR/.config.yaml $CONFDIR/config.yaml fi +} + +is_remote_uri() { + config="${1:-}" + + if echo "$config" | grep -E -q "^[a-zA-Z0-9]+://" && \ + ! echo "$config" | grep -E -q "^file:"; then + return 0; + fi + return 1 +} + +aoc_start() { + config="${1:-}" + + if is_remote_uri "$config"; then + aoc_config_remote_uri "$config" + else + aoc_config_local_uri "$config" + fi if [ "${SYSTEMD}" = 'true' ]; then systemctl daemon-reload @@ -99,7 +133,7 @@ aoc_status() { fi starttime_fmt='' - if [ ${pid} ] && [ ${pid} -ne 0 ]; then + if [ -n "${pid}" ] && [ "${pid}" -ne "0" ]; then starttime="$(TZ=UTC ps -o lstart= "${pid}")" starttime_fmt="$(TZ=UTC date -Isec -d "${starttime}")" fi @@ -136,7 +170,6 @@ aoc_runstatus() { main() { action='' - restart='false' mode='ec2' config_location='' @@ -154,13 +187,12 @@ main() { fi OPTIND=1 - while getopts ":hsa:r:c:m:" opt; do + while getopts ":ha:c:m:" opt; do case "${opt}" in h) echo "${UsageString}" exit 0 ;; - s) restart='true' ;; a) action="${OPTARG}" ;; c) config_location="${OPTARG}" ;; m) mode="${OPTARG}" ;; @@ -173,7 +205,7 @@ main() { ;; esac done - shift "$((${OPTIND} - 1))" + shift "$(( OPTIND - 1))" case "${mode}" in ec2) ;; diff --git a/tools/ctl/windows/aws-otel-collector-ctl.ps1 b/tools/ctl/windows/aws-otel-collector-ctl.ps1 index 93079ccd36..3826696d6a 100644 --- a/tools/ctl/windows/aws-otel-collector-ctl.ps1 +++ b/tools/ctl/windows/aws-otel-collector-ctl.ps1 @@ -47,8 +47,11 @@ $UsageString = @" start: start the agent process. status: get the status of the agent process. - -c: configuration - file:: file path on the host + -c: + - file path on the host. E.g.: c:\tmp\config.yaml or file:c:\tmp\config.yaml + - http uri. E.g.: http://example.com/config + - https uri. E.g.: https://example.com/config + - s3 uri. E.g.: s3://bucket/config "@ @@ -68,18 +71,43 @@ $AOCLogDirectory = "${AOCProgramData}\Logs" $VersionFile ="${AOCProgramFiles}\VERSION" # The windows service registration assumes exactly this .yaml file path and name -$ProgramFilesYAML="${Env:ProgramFiles}\${AOCDirectory}\config.yaml" +$ProgramFilesYAML="${Env:ProgramFiles}\${AOCDirectory}\config.yaml" $YAML="${AOCProgramData}\config.yaml" +Function Get-Service-Config-Uri() { + $service = Get-WmiObject win32_service -Filter "name=""${AOCServiceName}""" + $service.PathName -match "--config=""(.*)""" + + return $Matches.1 +} + +Function Set-Service-Config-Uri ([string]$uri) { + $aoc_cmd = "\""${AOCProgramFiles}\.aws-otel-collector.exe\"" --config=\""${uri}\""" + sc.exe config "${AOCServiceName}" binPath= "${aoc_cmd}" +} + +Function Test-Remote-Uri ([string]$uri) { + return $uri -match "^[a-zA-Z0-9]+://" -and $uri -notmatch "^file:" +} + Function AOCStart() { - if($ConfigLocation -and $ConfigLocation -ne 'default'){ - Copy-Item "${ConfigLocation}" -Destination ${ProgramFilesYAML} + + if($ConfigLocation -and $ConfigLocation -ne 'default') { + if (Test-Remote-Uri $ConfigLocation) { + Set-Service-Config-Uri ${ConfigLocation} + } else { + # Strip file scheme in case it is present + $ConfigLocation = "$ConfigLocation" -replace "^file:", "" + + Copy-Item "${ConfigLocation}" -Destination ${ProgramFilesYAML} + Set-Service-Config-Uri ${ProgramFilesYAML} + } } - if (!(Test-Path -LiteralPath "${ProgramFilesYAML}")) { + if (!(Test-Remote-Uri(Get-Service-Config-Uri)) -and !(Test-Path -LiteralPath "${ProgramFilesYAML}")) { Write-Output "Configuration not specified. Applying default configuration before starting it." - Copy-Item "${YAML}" -Destination ${ProgramFilesYAML} - } + Copy-Item "${YAML}" -Destination ${ProgramFilesYAML} + } $svc = Get-Service -Name "${AOCServiceName}" -ErrorAction SilentlyContinue if (!$svc) {