diff --git a/.github/ALLOWLIST b/.github/ALLOWLIST index da95fbd50575..871c58610899 100644 --- a/.github/ALLOWLIST +++ b/.github/ALLOWLIST @@ -16,7 +16,6 @@ cmd/configschema examples/demo/client examples/demo/server -exporter/opencensusexporter exporter/parquetexporter extension/fluentbitextension extension/httpforwarder @@ -29,15 +28,11 @@ internal/sharedcomponent internal/tools pkg/batchperresourceattr pkg/experimentalmetricmetadata -pkg/translator/jaeger -pkg/translator/opencensus pkg/translator/prometheusremotewrite pkg/translator/signalfx -pkg/translator/zipkin pkg/winperfcounters processor/deltatorateprocessor processor/metricsgenerationprocessor -receiver/opencensusreceiver receiver/podmanreceiver receiver/simpleprometheusreceiver receiver/simpleprometheusreceiver/examples/federation/prom-counter diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f051feb1c9db..d3c30659b6b5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -9,16 +9,23 @@ # # # Learn about CODEOWNERS file format: -# https://help.github.com/en/articles/about-code-owners +# https://help.github.com/en/articles/about-code-owners +# +# NOTE: Lines should be entered in the following format: +# /.. +# extension/oauth2clientauthextension/ @open-telemetry/collector-contrib-approvers @pavankrish123 @jpkrohling +# Path separator and minimum of 1 space between component path and owners is +# important for validation steps # * @open-telemetry/collector-contrib-approvers -cmd/mdatagen @open-telemetry/collector-contrib-approvers @dmitryax -cmd/telemetrygen @open-telemetry/collector-contrib-approvers @mx-psi @amenasria @codeboten +cmd/mdatagen/ @open-telemetry/collector-contrib-approvers @dmitryax +cmd/telemetrygen/ @open-telemetry/collector-contrib-approvers @mx-psi @amenasria @codeboten +cmd/otelcontribcol/ @open-telemetry/collector-contrib-approvers @codeboten exporter/alibabacloudlogserviceexporter/ @open-telemetry/collector-contrib-approvers @shabicheng @kongluoxing @qiansheng91 -exporter/awscloudwatchlogsexporter @open-telemetry/collector-contrib-approvers @boostchicken +exporter/awscloudwatchlogsexporter/ @open-telemetry/collector-contrib-approvers @boostchicken exporter/awsemfexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @shaochengwang @mxiamxia exporter/awskinesisexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @MovieStoreGuy exporter/awsprometheusremotewriteexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @alolita @@ -27,13 +34,14 @@ exporter/azuremonitorexporter/ @open-telemetry/collector-c exporter/carbonexporter/ @open-telemetry/collector-contrib-approvers @pjanotti exporter/clickhouseexporter/ @open-telemetry/collector-contrib-approvers @hanjm @dmitryax exporter/coralogixexporter/ @open-telemetry/collector-contrib-approvers @oded-dd @ofirshmuel -exporter/datadogexporter/ @open-telemetry/collector-contrib-approvers @KSerrania @mx-psi @gbbr @knusbaum +exporter/datadogexporter/ @open-telemetry/collector-contrib-approvers @KSerrania @mx-psi @gbbr @knusbaum @amenasria exporter/dynatraceexporter/ @open-telemetry/collector-contrib-approvers @dyladan @arminru exporter/elasticexporter/ @open-telemetry/collector-contrib-approvers @axw @simitt @jalvz exporter/elasticsearchexporter/ @open-telemetry/collector-contrib-approvers @urso @faec @blakerouse exporter/f5cloudexporter/ @open-telemetry/collector-contrib-approvers @gramidt exporter/fileexporter/ @open-telemetry/collector-contrib-approvers @pmm-sumo -exporter/googlecloudexporter/ @open-telemetry/collector-contrib-approvers @aabmass @dashpole @jsuereth @punya @tbarker25 +exporter/googlecloudexporter/ @open-telemetry/collector-contrib-approvers @aabmass @dashpole @jsuereth @punya @tbarker25 @damemi +exporter/googlemanagedprometheusexporter/ @open-telemetry/collector-contrib-approvers @aabmass @dashpole @jsuereth @punya @tbarker25 @damemi exporter/googlecloudpubsubexporter/ @open-telemetry/collector-contrib-approvers @alexvanboxel exporter/honeycombexporter/ @open-telemetry/collector-contrib-approvers @paulosman @lizthegrey @MikeGoldsmith exporter/humioexporter/ @open-telemetry/collector-contrib-approvers @xitric @@ -46,6 +54,7 @@ exporter/logzioexporter/ @open-telemetry/collector-c exporter/lokiexporter/ @open-telemetry/collector-contrib-approvers @gramidt @jpkrohling exporter/mezmoexporter/ @open-telemetry/collector-contrib-approvers @dashpole @billmeyer @gjanco exporter/observiqexporter/ @open-telemetry/collector-contrib-approvers @binaryfissiongames +exporter/opencensusexporter/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers exporter/prometheusexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 exporter/prometheusremotewriteexporter/ @open-telemetry/collector-contrib-approvers @Aneurysm9 exporter/sapmexporter/ @open-telemetry/collector-contrib-approvers @owais @dmitryax @@ -71,8 +80,8 @@ extension/observer/ecstaskobserver/ @open-telemetry/collector-c extension/observer/hostobserver/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy extension/observer/k8sobserver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick @dmitryax extension/oidcauthextension/ @open-telemetry/collector-contrib-approvers @jpkrohling -extension/sigv4authextension/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @erichsueh3 extension/pprofextension/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy +extension/sigv4authextension/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @erichsueh3 extension/storage/dbstorage/ @open-telemetry/collector-contrib-approvers @dmitryax @atoulme extension/storage/filestorage/ @open-telemetry/collector-contrib-approvers @djaglowski @@ -88,6 +97,9 @@ internal/splunk/ @open-telemetry/collector-c pkg/batchpersignal/ @open-telemetry/collector-contrib-approvers @jpkrohling pkg/resourcetotelemetry/ @open-telemetry/collector-contrib-approvers @mx-psi pkg/stanza/ @open-telemetry/collector-contrib-approvers @djaglowski +pkg/translator/jaeger/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers +pkg/translator/opencensus/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers +pkg/translator/zipkin/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers processor/attributesprocessor/ @open-telemetry/collector-contrib-approvers @boostchicken @pmm-sumo processor/cumulativetodeltaprocessor/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @@ -100,8 +112,8 @@ processor/metricstransformprocessor/ @open-telemetry/collector-c processor/probabilisticsamplerprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling processor/redactionprocessor/ @open-telemetry/collector-contrib-approvers @leonsp-ai @dmitryax @mx-psi processor/resourcedetectionprocessor/ @open-telemetry/collector-contrib-approvers @jrcamp @pmm-sumo @Aneurysm9 @dashpole -processor/resourceprocessor @open-telemetry/collector-contrib-approvers @dmitryax -processor/resourcedetectionprocessor/internal/azure @open-telemetry/collector-contrib-approvers @mx-psi +processor/resourceprocessor/ @open-telemetry/collector-contrib-approvers @dmitryax +processor/resourcedetectionprocessor/internal/azure/ @open-telemetry/collector-contrib-approvers @mx-psi processor/routingprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling processor/schemaprocessor/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy processor/spanmetricsprocessor/ @open-telemetry/collector-contrib-approvers @albertteoh @@ -110,6 +122,7 @@ processor/tailsamplingprocessor/ @open-telemetry/collector-c processor/transformprocessor/ @open-telemetry/collector-contrib-approvers @anuraaga @Aneurysm9 @bogdandrutu @TylerHelmuth receiver/activedirectorydsreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @binaryfissiongames +receiver/aerospikereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @antonblock receiver/apachereceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/awscontainerinsightreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @pxaws receiver/awsecscontainermetricsreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @@ -117,7 +130,7 @@ receiver/awsfirehosereceiver/ @open-telemetry/collector-c receiver/awsxrayreceiver/ @open-telemetry/collector-contrib-approvers @willarmiros receiver/bigipreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek receiver/carbonreceiver/ @open-telemetry/collector-contrib-approvers @pjanotti -receiver/cloudfoundryreceiver/ @open-telemetry/collector-contrib-approvers @agoallikmaa @pellared +receiver/cloudfoundryreceiver/ @open-telemetry/collector-contrib-approvers @agoallikmaa @pellared @crobert-1 receiver/collectdreceiver/ @open-telemetry/collector-contrib-approvers @owais receiver/couchdbreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/dockerstatsreceiver/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick @@ -129,7 +142,7 @@ receiver/flinkmetricsreceiver/ @open-telemetry/collector-c receiver/fluentforwardreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax receiver/googlecloudpubsubreceiver/ @open-telemetry/collector-contrib-approvers @alexvanboxel receiver/googlecloudspannerreceiver/ @open-telemetry/collector-contrib-approvers @ydrozhdzhal @asukhyy @khospodarysko @architjugran -receiver/hostmetricsreceiver @open-telemetry/collector-contrib-approvers @dmitryax +receiver/hostmetricsreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax receiver/influxdbreceiver/ @open-telemetry/collector-contrib-approvers @jacobmarble receiver/iisreceiver/ @open-telemetry/collector-contrib-approvers @mrod1598 @djaglowski receiver/jaegerreceiver/ @open-telemetry/collector-contrib-approvers @jpkrohling @@ -146,6 +159,7 @@ receiver/mongodbatlasreceiver/ @open-telemetry/collector-c receiver/mysqlreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/nginxreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/nsxtreceiver/ @open-telemetry/collector-contrib-approvers @dashpole @schmikei +receiver/opencensusreceiver/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers receiver/postgresqlreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski receiver/prometheusexecreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax receiver/prometheusreceiver/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole @@ -156,7 +170,7 @@ receiver/riakreceiver/ @open-telemetry/collector-c receiver/saphanareceiver/ @open-telemetry/collector-contrib-approvers @pmm-sumo @dehaansa receiver/sapmreceiver/ @open-telemetry/collector-contrib-approvers @owais receiver/signalfxreceiver/ @open-telemetry/collector-contrib-approvers @pjanotti @dmitryax -receiver/skywalkingreceiver @open-telemetry/collector-contrib-approvers @JaredTan95 +receiver/skywalkingreceiver/ @open-telemetry/collector-contrib-approvers @JaredTan95 receiver/splunkhecreceiver/ @open-telemetry/collector-contrib-approvers @atoulme @keitwb receiver/sqlqueryreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @pmcollins receiver/sqlserverreceiver/ @open-telemetry/collector-contrib-approvers @djaglowski @StefanKurek diff --git a/.github/workflows/scripts/check-codeowners.sh b/.github/workflows/scripts/check-codeowners.sh index 79bf83ba229f..a2e51162d5ef 100755 --- a/.github/workflows/scripts/check-codeowners.sh +++ b/.github/workflows/scripts/check-codeowners.sh @@ -25,34 +25,44 @@ set -eu -o pipefail CODEOWNERS=".github/CODEOWNERS" ALLOWLIST=".github/ALLOWLIST" -# Get component folders from the project and checks that they have -# an owner in $CODEOWNERS +# Get component folders from the project and checks that they have +# an owner in $CODEOWNERS check_code_owner_existence() { MODULES=$(find . -type f -name "go.mod" -exec dirname {} \; | sort | grep -E '^./' | cut -c 3-) MISSING_COMPONENTS=0 ALLOW_LIST_COMPONENTS=0 for module in ${MODULES} do - if ! grep -q "^$module " "$CODEOWNERS"; then - # Account for parent folders which implicitly include - # sub folders e.g. 'internal/aws' is listed in $CODEOWNERS + # For a component path exact match, need to add '/ ' to end of module as + # each line in the CODEOWNERS file is of the format: + # /.. + # This is because the path separator at end is dropped while searching for + # modules and there is at least 1 space separating the path from the owners. + if ! grep -q "^$module/ " "$CODEOWNERS"; then + # If there is not an exact match to component path, there might be a parent folder + # which has an owner and would therefore implicitly include the component + # path as a sub folder e.g. 'internal/aws' is listed in $CODEOWNERS # which accounts for internal/aws/awsutil, internal/aws/k8s etc. PREFIX_MODULE_PATH=$(echo $module | cut -d/ -f 1-2) if ! grep -wq "^$PREFIX_MODULE_PATH/ " "$CODEOWNERS"; then # Check if it is a known component that is waiting on an owner if grep -wq "$module" "$ALLOWLIST"; then ((ALLOW_LIST_COMPONENTS=ALLOW_LIST_COMPONENTS+1)) - echo "\"$module\" not included in CODEOWNERS but in the ALLOWLIST" + echo "pass: \"$module\" not included in CODEOWNERS but in the ALLOWLIST" else ((MISSING_COMPONENTS=MISSING_COMPONENTS+1)) - echo "\"$module\" not included in CODEOWNERS" + echo "FAIL: \"$module\" not included in CODEOWNERS" fi fi fi done - echo "there are $ALLOW_LIST_COMPONENTS components not included in CODEOWNERS but known in the ALLOWLIST" - echo "there are $MISSING_COMPONENTS components not included in CODEOWNERS and not known in the ALLOWLIST" + if [ "$ALLOW_LIST_COMPONENTS" -gt 0 ]; then + echo "---" + echo "pass: there are $ALLOW_LIST_COMPONENTS components not included in CODEOWNERS but known in the ALLOWLIST" + fi if [ "$MISSING_COMPONENTS" -gt 0 ]; then + echo "---" + echo "FAIL: there are $MISSING_COMPONENTS components not included in CODEOWNERS and not known in the ALLOWLIST" exit 1 fi } diff --git a/.github/workflows/scripts/sqlserver_install.ps1 b/.github/workflows/scripts/sqlserver_install.ps1 deleted file mode 100644 index da37e7da1319..000000000000 --- a/.github/workflows/scripts/sqlserver_install.ps1 +++ /dev/null @@ -1,13 +0,0 @@ -function Install-SQLServer2019 { - Write-Host "Downloading SQL Server 2019..." - $Path = $env:TEMP - $Installer = "SQL2019-SSEI-Dev.exe" - $URL = "https://go.microsoft.com/fwlink/?linkid=866662" - Invoke-WebRequest $URL -OutFile $Path\$Installer - - Write-Host "Installing SQL Server..." - Start-Process -FilePath $Path\$Installer -Args "/ACTION=INSTALL /IACCEPTSQLSERVERLICENSETERMS /QUIET" -Verb RunAs -Wait - Remove-Item $Path\$Installer -} - -Install-SQLServer2019 diff --git a/.golangci.yml b/.golangci.yml index 19522c1019b1..e5b8b2511b78 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -105,7 +105,11 @@ linters-settings: linters: enable: + - depguard + - errcheck + - errorlint - exportloopref + - gocritic - gofmt - goimports - gosec @@ -113,10 +117,9 @@ linters: - misspell - revive - staticcheck + - tenv - unconvert - unparam - - errcheck - - gocritic issues: # Excluding configuration per-path, per-linter, per-text and per-source diff --git a/CHANGELOG.md b/CHANGELOG.md index a4a0bd90bf0e..843c16cdc0b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,24 +4,57 @@ - `filterprocessor`: Ability to filter `Spans` (#6341) - ## πŸ›‘ Breaking changes πŸ›‘ +- `transformprocessor`: `metric.is_monotonic` is now accessed via a bool literal instead of a string. (#10473) + +- `vcenterreceiver`: Changed the attribute `effective` on `vcenter.cluster.host.count` as it will now be reported as a bool rather than a string (#10914) ### 🚩 Deprecations 🚩 - `datadogexporter`: Deprecate `Sanitize` method of `Config` struct (#8829) +- `observiqexporter`: Deprecate the observiq exporter (#10977) +- `honeycombexporter`: Deprecate honeycomb exporter (#10318) ### πŸš€ New components πŸš€ - `expvarreceiver`: Include `expvarreceiver` in components (#10847) +- `googlemanagedprometheusexporter` Add the Google Managed Service for Prometheus exporter. (#10840) +- `googlemanagedprometheusexporter` The Google Managed Service for Prometheus exporter is alpha. (#10925) ### πŸ’‘ Enhancements πŸ’‘ +- `mongodbatlasreceiver` Add support for receiving alerts (#10854) +- `cmd/mdatagen`: Allow attribute values of any types (#9245) +- `metricstransformprocessor`: Migrate the processor from OC to pdata (#10817) + - This behavior can be reverted by disabling the `processor.metricstransformprocessor.UseOTLPDataModel` feature gate. - `transformprocessor`: Add byte slice literal to the grammar. Add new SpanID and TraceID functions that take a byte slice and return a Span/Trace ID. (#10487) +- `transformprocessor`: Add nil literal to the grammar. (#11150) - `elasticsearchreceiver`: Add integration test for elasticsearch receiver (#10165) +- `tailsamplingprocessor`: New sampler added that allows to sample based on minimum number of spans - `datadogexporter`: Some config validation and unmarshaling steps are now done on `Validate` and `Unmarshal` instead of `Sanitize` (#8829) +- `datadogexporter`: Add `exporter.datadog.hostname.preview` feature flag and related warnings (#10926) - `examples`: Add an example for scraping Couchbase metrics (#10894) +- `filestorageextension`: Add background compaction capability (#9327) +- `googlecloudpubsubreceiver`: Added new `Endpoint` and `Insecure` connection configuration options. (#10845) +- `dynatraceexporter`: Provide better estimated summaries for partial histograms. (#11044) +- `mongodbreceiver`: Add integration test for mongodb receiver (#10864) +- `mezmoexporter`: add logging for HTTP errors (#10875) +- `signalfxexporter`: Enable the exporting of seven Kubernetes metrics used in Splunk/SignalFx content by default (#11032) +- `googlecloudexporter`: Support writing to multiple GCP projects by setting the `gcp.project.id` resource attribute, and support service account impersonation (#11051) +- `k8sattributeprocessor`: Add debug logs to help identify missing attributes (#11060) +- `rabbitmqreceiver`: Add integration test for rabbitmq receiver (#10865) + ### 🧰 Bug fixes 🧰 - `kubletetstatsreceiver`: Bring back `k8s.container.name` attribute (#10848) +- `transformprocessor`: Fix issue where some trace fields were not working correctly in conditions. (#10471) +- `pkg/stanza`: Skip building fingerprint in case of configuration change (#10485) +- `transformprocessor`: Fix issue where some metric fields were not working correctly in conditions. (#10473) +- `windowseventlogreceiver`: Fixed example config in readme (#10971) +- `pkg/stanza`: Fix access to atomic variable without using atomic package (#11023) +- `exporter/awsemfexporter:`: Fix dead links in README.md. (#11027) +- `googlecloudexporter`: Fix (self-obs) point_count metric calculation, concurrent map write panic, and dropped log attributes (#11051) +- `signalfxexporter`: Event Type is a required field, if not set, set it to `unknown` to prevent signalfx ingest from dropping it (#11121) +- `prometheusreceiver`: validate that combined metric points (e.g. histograms) have the same timestamp (#9385) ## v0.53.0 @@ -40,6 +73,7 @@ - `vcenterreceiver`: Add metrics receiver for new vcenterreceiver component (#9224) - `googlecloudpubsubreceiver` Activate the Google Cloud Pubsub receiver. (#10580) - `googlecloudpubsubexporter` Activate the Google Cloud Pubsub exporter. (#10580) +- `aerospikereceiver`: Add implementation of Aerospike Metric Receiver. (#9961) ### πŸ’‘ Enhancements πŸ’‘ @@ -76,6 +110,7 @@ ### πŸš€ New components πŸš€ +- `aerospikereceiver`: Add implementation of Aerospike Metrics Receiver (#9961) - `bigipreceiver`: Add implementation of F5 Big-IP Metric Receiver (#9680) - `expvarreceiver`: Initial work for a receiver designed to scrape `memstats` from Golang applications. (#9747) - `mezmoexporter`: Add implementation of Mezmo Log exporter (#9743) @@ -91,6 +126,7 @@ - `transformprocessor`: Add new `replace_match` and `replace_all_matches` functions (#10132) - `resourcedetectionprocessor`: Add "cname" and "lookup" hostname sources - `jmxreceiver`: Communicate with JMX metrics gatherer subprocess via properties file (#9685) +- `pkg/stanza`: make multiline tests more like integration tests #10353 ### 🧰 Bug fixes 🧰 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 165ec2fdff1f..a88b82d36d2d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,7 +66,6 @@ and the rest of contributors. The following GitHub users are the currently available sponsors, either by being an approver or a maintainer of the contrib repository. The list is ordered based on a random sort of the list of sponsors done live at the Collector SIG meeting on 27-Apr-2022 and serves as the seed for the round-robin selection of sponsors, as described in the section above. -* [@djaglowski](https://github.com/djaglowski) * [@codeboten](https://github.com/codeboten) * [@Aneurysm9](https://github.com/Aneurysm9) * [@mx-psi](https://github.com/mx-psi) @@ -76,8 +75,21 @@ The following GitHub users are the currently available sponsors, either by being * [@bogdandrutu](https://github.com/bogdandrutu) * [@dashpole](https://github.com/dashpole) * [@TylerHelmuth](https://github.com/TylerHelmuth) +* [@djaglowski](https://github.com/djaglowski) Whenever a sponsor is picked from the top of this list, please move them to the bottom. + +## Adding metrics to existing receivers +Following these steps for contributing additional metrics to existing receivers. + - Read instructions [here](https://github.com/open-telemetry/opentelemetry-collector/blob/main/CONTRIBUTING.md#fork) on how to + fork, build and create PRs. The only difference is to change repository name from `opentelemetry-collector` to `opentelemetry-collector-contrib` + - Edit `metadata.yaml` of your metrics receiver to add new metrics, e.g.: `redisreceiver/metadata.yaml` + - To generate new metrics on top of this updated YAML file. + - Run `cd receiver/redisreceiver` + - Run `go generate ./...` +- Review the changed files and merge the changes into your forked repo. +- Create PR from Github web console following the instructions above. + ## General Recommendations Below are some recommendations that apply to typical components. These are not rigid rules and there are exceptions but in general try to follow them. diff --git a/Makefile b/Makefile index 3249d035d0d3..c029a88832cb 100644 --- a/Makefile +++ b/Makefile @@ -319,6 +319,10 @@ build-examples: checkdoc: checkdoc --project-path $(CURDIR) --component-rel-path $(COMP_REL_PATH) --module-name $(MOD_NAME) +.PHONY: all-checklinks +all-checklinks: + $(MAKE) $(FOR_GROUP_TARGET) TARGET="checklinks" + # Function to execute a command. Note the empty line before endef to make sure each command # gets executed separately instead of concatenated with previous one. # Accepts command to execute as first parameter. @@ -330,7 +334,8 @@ endef # List of directories where certificates are stored for unit tests. CERT_DIRS := receiver/sapmreceiver/testdata \ receiver/signalfxreceiver/testdata \ - receiver/splunkhecreceiver/testdata + receiver/splunkhecreceiver/testdata \ + receiver/mongodbatlasreceiver/testdata/alerts/certs # Generate certificates for unit tests relying on certificates. .PHONY: certs diff --git a/Makefile.Common b/Makefile.Common index e22eca3a37da..1be443fdcf79 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -12,6 +12,7 @@ GOTEST=$(GOCMD) test GOOS=$(shell $(GOCMD) env GOOS) GOARCH=$(shell $(GOCMD) env GOARCH) ADDLICENCESE= addlicense +MDLINKCHECK=markdown-link-check MISSPELL=misspell -error MISSPELL_CORRECTION=misspell -w LINT=golangci-lint @@ -95,6 +96,12 @@ checklicense: echo "Check License finished successfully"; \ fi +.PHONY: checklinks +checklinks: + command -v $(MDLINKCHECK) >/dev/null 2>&1 || { echo >&2 "$(MDLINKCHECK) not installed. Run 'npm install -g markdown-link-check'"; exit 1; } + find . -name \*.md -print0 | xargs -0 -n1 \ + $(MDLINKCHECK) -q -c $(SRC_ROOT)/.github/workflows/check_links_config.json || true + .PHONY: fmt fmt: gofmt -w -s ./ diff --git a/README.md b/README.md index 717a9ee1d001..277fc0179c3f 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,11 @@ Even though the OpenTelemetry Collector Contrib maintainers are ultimately respo See [CONTRIBUTING.md](CONTRIBUTING.md). Triagers ([@open-telemetry/collector-contrib-triagers](https://github.com/orgs/open-telemetry/teams/collector-contrib-triagers)) + +- Actively seeking contributors to triage issues + +Emeritus Triagers: + - [Alolita Sharma](https://github.com/alolita), AWS - [Punya Biswal](https://github.com/punya), Google - [Steve Flanders](https://github.com/flands), Splunk @@ -81,17 +86,17 @@ Approvers ([@open-telemetry/collector-contrib-approvers](https://github.com/orgs - [Anthony Mirabella](https://github.com/Aneurysm9), AWS - [David Ashpole](https://github.com/dashpole), Google -- [Dmitrii Anoshin](https://github.com/dmitryax), Splunk -- [Pablo Baeyens](https://github.com/mx-psi), DataDog - [Przemek Maciolek](https://github.com/pmm-sumo), Sumo Logic - [Tyler Helmuth](https://github.com/TylerHelmuth), New Relic Maintainers ([@open-telemetry/collector-contrib-maintainer](https://github.com/orgs/open-telemetry/teams/collector-contrib-maintainer)): +- [Alex Boten](https://github.com/codeboten), Lightstep +- [Bogdan Drutu](https://github.com/bogdandrutu), Splunk - [Daniel Jaglowski](https://github.com/djaglowski), observIQ +- [Dmitrii Anoshin](https://github.com/dmitryax), Splunk - [Juraci PaixΓ£o KrΓΆhling](https://github.com/jpkrohling), Grafana Labs -- [Alex Boten](https://github.com/codeboten), Lightstep -- [Bogdan Drutu](https://github.com/BogdanDrutu), Splunk +- [Pablo Baeyens](https://github.com/mx-psi), DataDog Emeritus Maintainers - [Tigran Najaryan](https://github.com/tigrannajaryan), Splunk diff --git a/cmd/configschema/docsgen/README.md b/cmd/configschema/docsgen/README.md index 6a1c1f44f403..61365fb696e4 100644 --- a/cmd/configschema/docsgen/README.md +++ b/cmd/configschema/docsgen/README.md @@ -41,4 +41,4 @@ This creates a file called `config.md` in `receiver/otlpreceiver`. ### Output Example -[OTLP Receiver Config Metadata Doc](../../../receiver/otlpreceiver/config.md) +[OTLP Receiver Config Metadata Doc](https://github.com/open-telemetry/opentelemetry-collector/blob/main/receiver/otlpreceiver/config.md) diff --git a/cmd/configschema/go.mod b/cmd/configschema/go.mod index 3ee3e05a8295..1f240ac76eaf 100644 --- a/cmd/configschema/go.mod +++ b/cmd/configschema/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 golang.org/x/text v0.3.7 @@ -47,18 +47,20 @@ require ( github.com/DataDog/datadog-go v4.8.2+incompatible // indirect github.com/DataDog/sketches-go v1.4.1 // indirect github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.1 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.30.2-0.20220512190557-875976f87023 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.6.1 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.30.1 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.32.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/ReneKroon/ttlcache/v2 v2.11.0 // indirect github.com/SAP/go-hdb v0.105.5 // indirect github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 // indirect - github.com/Shopify/sarama v1.34.0 // indirect + github.com/Shopify/sarama v1.34.1 // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VividCortex/gohistogram v1.0.0 // indirect + github.com/aerospike/aerospike-client-go/v5 v5.8.0 // indirect github.com/alecthomas/participle/v2 v2.0.0-alpha9 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/aliyun/aliyun-log-go-sdk v0.1.36 // indirect @@ -66,7 +68,7 @@ require ( github.com/apache/thrift v0.16.0 // indirect github.com/armon/go-metrics v0.3.10 // indirect github.com/avast/retry-go v3.0.0+incompatible // indirect - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/aws/aws-sdk-go-v2 v1.9.2 // indirect github.com/aws/aws-sdk-go-v2/config v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.4.3 // indirect @@ -104,11 +106,11 @@ require ( github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/digitalocean/godo v1.80.0 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/dynatrace-oss/dynatrace-metric-utils-go v0.3.0 // indirect + github.com/dynatrace-oss/dynatrace-metric-utils-go v0.4.0 // indirect github.com/eapache/go-resiliency v1.2.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect github.com/eapache/queue v1.1.0 // indirect @@ -259,6 +261,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.53.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.53.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.53.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.0.0-00010101000000-000000000000 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombexporter v0.53.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/exporter/humioexporter v0.53.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.53.0 // indirect @@ -342,6 +345,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.53.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.53.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.53.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.0.0-00010101000000-000000000000 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.53.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.53.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.53.0 // indirect @@ -429,7 +433,7 @@ require ( github.com/prometheus/common v0.34.0 // indirect github.com/prometheus/common/sigv4 v0.1.0 // indirect github.com/prometheus/procfs v0.7.3 // indirect - github.com/prometheus/prometheus v0.36.0 // indirect + github.com/prometheus/prometheus v0.36.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/cors v1.8.2 // indirect github.com/santhosh-tekuri/jsonschema v1.2.4 // indirect @@ -454,7 +458,7 @@ require ( github.com/subosito/gotenv v1.2.0 // indirect github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect github.com/syndtr/goleveldb v1.0.0 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.416 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.418 // indirect github.com/tg123/go-htpasswd v1.2.0 // indirect github.com/tidwall/gjson v1.12.1 // indirect github.com/tidwall/match v1.1.1 // indirect @@ -479,6 +483,7 @@ require ( github.com/xdg-go/scram v1.1.1 // indirect github.com/xdg-go/stringprep v1.0.3 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect + github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.elastic.co/apm v1.15.0 // indirect go.elastic.co/fastjson v1.1.0 // indirect @@ -486,7 +491,7 @@ require ( go.mongodb.org/atlas v0.16.0 // indirect go.mongodb.org/mongo-driver v1.9.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/contrib/zpages v0.32.0 // indirect @@ -498,18 +503,18 @@ require ( go.uber.org/goleak v1.1.12 // indirect go.uber.org/zap v1.21.0 // indirect golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect - golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect + golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect gonum.org/v1/gonum v0.11.0 // indirect - google.golang.org/api v0.82.0 // indirect + google.golang.org/api v0.83.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 // indirect + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/DataDog/dd-trace-go.v1 v1.38.1 // indirect @@ -610,6 +615,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/filee replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter => ../../exporter/googlecloudexporter +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter => ../../exporter/googlemanagedprometheusexporter + replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter => ../../exporter/googlecloudpubsubexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombexporter => ../../exporter/honeycombexporter @@ -750,6 +757,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/tran replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver => ../../receiver/activedirectorydsreceiver +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver => ../../receiver/aerospikereceiver + replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver => ../../receiver/apachereceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver => ../../receiver/awscontainerinsightreceiver diff --git a/cmd/configschema/go.sum b/cmd/configschema/go.sum index d74b4f607485..333542a2870d 100644 --- a/cmd/configschema/go.sum +++ b/cmd/configschema/go.sum @@ -172,14 +172,16 @@ github.com/DataDog/zstd v1.5.0 h1:+K/VEwIAaPcHiMtQvpLD4lqW7f0Gk3xdYZmI1hD+CXo= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 h1:KeNholpO2xKjgaaSyd+DyQRrsQjhbSeS7qe4nEw8aQw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962/go.mod h1:kC29dT1vFpj7py2OvG1khBdQpo3kInWP+6QipLbdngo= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.1 h1:v2ey6AUQFjj6vPMdXNL9K1R1/4V20qPBuL3os831jvw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.1/go.mod h1:s7Gpwj0tk7XnVCm4BQEmx/mbS36SuTCY/vMB2SNxe8o= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.30.2-0.20220512190557-875976f87023 h1:a5qaC/K40oknHppvTFqQZkLMY7XZSvWyxcG/T6W6DF8= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.30.2-0.20220512190557-875976f87023/go.mod h1:kXt5P2nDYWk6ltkQi+YmcGCNMwS54nnYfLm8jrU0APk= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.6.1 h1:LNl8Tg6N6qChoiM6lKC1Z44Z+CkPAdYx45L/lJDgThs= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.6.1/go.mod h1:ZFRHg4zuQuc6sQyx16A53fB7kxPvPguSeE8GFVpT6rQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.30.1 h1:JftlZfpIvptFTzSD/BXuoK9i0nT3D1GSz1EEBr+jjuM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.30.1/go.mod h1:j+FS9VBW3mwtHBmm9KOJEy5Tq68fCp7fE/R9bV/flIM= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.2 h1:aMWts6QP6yqlluU7KXl6j1zdPLW/PNNKHwm9804M5t4= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.2/go.mod h1:s7Gpwj0tk7XnVCm4BQEmx/mbS36SuTCY/vMB2SNxe8o= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2 h1:FNWwTVLRrrJIDmkkJiLEXcdKye09TxgRhQHXWGT709Y= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2/go.mod h1:Rb8oT91vuHT7MEyikxGyU7RaKypEwr3fBjoaBcmw0Y4= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.32.2 h1:/U4z1upRwp3XEUldq+4LfKEcuc0kH8ZsB95jQ2MrcgQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.32.2/go.mod h1:Dbl28z/FsamWrRT9cwLwWxS1zQUTOkRzibiLSQ8ixNg= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 h1:Dg+BIoU7Xz5QAj9VgDyhl5sz8Uz1IE1O6NAdJ1/Lmyk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2/go.mod h1:vCKAVz9WbhvBYuqNignSpjoyMtBT/CFELC3z98onw4o= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 h1:lw6BPuBgZKGwl4jm8xrU7AGnK8ohy7UT9hPM1+S16ts= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2/go.mod h1:j+FS9VBW3mwtHBmm9KOJEy5Tq68fCp7fE/R9bV/flIM= github.com/HdrHistogram/hdrhistogram-go v0.9.0/go.mod h1:nxrse8/Tzg2tg3DZcZjm6qEclQKK70g0KxO61gFFZD4= github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= @@ -235,13 +237,14 @@ github.com/Shopify/sarama v1.29.1/go.mod h1:mdtqvCSg8JOxk8PmpTNGyo6wzd4BMm4QXSfD github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs= github.com/Shopify/sarama v1.31.0/go.mod h1:BeW3gXRc/CxgAsrSly2RE9nIXUfC9ezb7QHBPVhvzjI= github.com/Shopify/sarama v1.32.0/go.mod h1:+EmJJKZWVT/faR9RcOxJerP+LId4iWdQPBGLy1Y1Njs= -github.com/Shopify/sarama v1.34.0 h1:j4zTaFHFnfvuV2fdLZyXqIg0Tu4Mzl9f064Z5/H+o4o= -github.com/Shopify/sarama v1.34.0/go.mod h1:V2ceE9UupUf4/oP1Z38SI49fAnD0/MtkqDDHvolIeeQ= +github.com/Shopify/sarama v1.34.1 h1:pVCQO7BMAK3s1jWhgi5v1W6lwZ6Veiekfc2vsgRS06Y= +github.com/Shopify/sarama v1.34.1/go.mod h1:NZSNswsnStpq8TUdFaqnpXm2Do6KRzTIjdBdVlL1YRM= 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.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= -github.com/Shopify/toxiproxy/v2 v2.3.0 h1:62YkpiP4bzdhKMH+6uC5E95y608k3zDwdzuBMsnn3uQ= github.com/Shopify/toxiproxy/v2 v2.3.0/go.mod h1:KvQTtB6RjCJY4zqNJn7C7JDFgsG5uoHYDirfUfpIm0c= +github.com/Shopify/toxiproxy/v2 v2.4.0 h1:O1e4Jfvr/hefNTNu+8VtdEG5lSeamJRo4aKhMOKNM64= +github.com/Shopify/toxiproxy/v2 v2.4.0/go.mod h1:3ilnjng821bkozDRxNoo64oI/DKqM+rOyJzb564+bvg= 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= @@ -249,6 +252,8 @@ github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDO github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/aerospike/aerospike-client-go/v5 v5.8.0 h1:EUV2wG80yIenQqOyUlf5NfyhagPIwoeL09MJIE+xILE= +github.com/aerospike/aerospike-client-go/v5 v5.8.0/go.mod h1:rJ/KpmClE7kiBPfvAPrGw9WuNOiz8v2uKbQaUyYPXtI= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/participle/v2 v2.0.0-alpha9 h1:TnflwDbtf5/aG6JMbmdiA+YB3bLg0sc6yRtmAfedfN4= @@ -304,8 +309,8 @@ github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/ github.com/aws/aws-sdk-go v1.35.24/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.38.68/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM= github.com/aws/aws-sdk-go-v2 v1.7.0/go.mod h1:tb9wi5s61kTDA5qCkcDbt3KRVV74GGslQkl/DRdX/P4= @@ -612,8 +617,8 @@ github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6 github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= @@ -633,8 +638,8 @@ github.com/dropbox/godropbox v0.0.0-20180512210157-31879d3884b9/go.mod h1:glr97h github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dynatrace-oss/dynatrace-metric-utils-go v0.3.0 h1:q2Ayh9s6Cr75bS5URiOUAoyFXemgKQaBJphbhAaJHCY= -github.com/dynatrace-oss/dynatrace-metric-utils-go v0.3.0/go.mod h1:qw0E9EJ0PnSlhWawDNuqE0zhc1hqOBUCFIAj3dd9DNw= +github.com/dynatrace-oss/dynatrace-metric-utils-go v0.4.0 h1:DNKHy0pt6iKh5w/FqWTlNL/vvZE5zxPLfjfm0Zqclc4= +github.com/dynatrace-oss/dynatrace-metric-utils-go v0.4.0/go.mod h1:qw0E9EJ0PnSlhWawDNuqE0zhc1hqOBUCFIAj3dd9DNw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= @@ -1436,7 +1441,6 @@ github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.14.2/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.4/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= @@ -1868,8 +1872,8 @@ github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= -github.com/prometheus/prometheus v0.36.0/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= @@ -2049,8 +2053,8 @@ github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFd github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.416 h1:kD1JlhMcIO2sV+Ps+V1c1DlxC0r/VeIxMQXzZ7eRvoY= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.416/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.418 h1:8F7BYx/udM6ohaXB5s94OTDkjS90EusRV/xSeI/yyrM= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.418/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/testcontainers/testcontainers-go v0.13.0 h1:OUujSlEGsXVo/ykPVZk3KanBNGN0TYb/7oKIPVn15JA= github.com/tg123/go-htpasswd v1.2.0 h1:UKp34m9H467/xklxUxU15wKRru7fwXoTojtxg25ITF0= github.com/tg123/go-htpasswd v1.2.0/go.mod h1:h7IzlfpvIWnVJhNZ0nQ9HaFxHb7pn5uFJYLlEUJa2sM= @@ -2178,6 +2182,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da h1:NimzV1aGyq29m5ukMK0AMWEhFaL/lrEOaephfuoiARg= +github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= @@ -2239,16 +2245,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/collector v0.52.0/go.mod h1:a9GvaOhyc0nVOUzqvdv5mxyWghCSso/WRO2GgRl4I1g= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= go.opentelemetry.io/collector/model v0.44.0/go.mod h1:4jo1R8uBDspLCxUGhQ0k3v/EFXFbW7s0AIy3LuGLbcU= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/pdata v0.52.0/go.mod h1:GJUTfTv8mlYpHRjcmHXVbvJr48EW/q/P/HuBvpXAE58= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/collector/semconv v0.52.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= @@ -2493,6 +2501,7 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -2508,8 +2517,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= 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-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2546,8 +2555,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2560,6 +2570,7 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2878,8 +2889,8 @@ google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2989,8 +3000,8 @@ google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= diff --git a/cmd/mdatagen/go.mod b/cmd/mdatagen/go.mod index 8d40235431be..b7d33f3d9a84 100644 --- a/cmd/mdatagen/go.mod +++ b/cmd/mdatagen/go.mod @@ -7,8 +7,8 @@ require ( github.com/go-playground/universal-translator v0.18.0 github.com/go-playground/validator/v10 v10.11.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/cmd/mdatagen/go.sum b/cmd/mdatagen/go.sum index fff29f71989b..78bfeab39c7b 100644 --- a/cmd/mdatagen/go.sum +++ b/cmd/mdatagen/go.sum @@ -174,10 +174,10 @@ github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8 github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= diff --git a/cmd/mdatagen/loader.go b/cmd/mdatagen/loader.go index 64dec1dcb640..00a185880d83 100644 --- a/cmd/mdatagen/loader.go +++ b/cmd/mdatagen/loader.go @@ -67,9 +67,9 @@ func (mvt *ValueType) UnmarshalText(text []byte) error { case "double": mvt.ValueType = pcommon.ValueTypeDouble case "bool": - mvt.ValueType = pcommon.ValueTypeDouble + mvt.ValueType = pcommon.ValueTypeBool case "bytes": - mvt.ValueType = pcommon.ValueTypeDouble + mvt.ValueType = pcommon.ValueTypeBytes default: return fmt.Errorf("invalid type: %q", vtStr) } @@ -197,7 +197,7 @@ func loadMetadata(filePath string) (metadata, error) { func validateMetadata(out metadata) error { v := validator.New() if err := v.RegisterValidation("notblank", validators.NotBlank); err != nil { - return fmt.Errorf("failed registering notblank validator: %v", err) + return fmt.Errorf("failed registering notblank validator: %w", err) } // Provides better validation error messages. @@ -210,7 +210,7 @@ func validateMetadata(out metadata) error { } if err := en_translations.RegisterDefaultTranslations(v, tr); err != nil { - return fmt.Errorf("failed registering translations: %v", err) + return fmt.Errorf("failed registering translations: %w", err) } if err := v.RegisterTranslation("nosuchattribute", tr, func(ut ut.Translator) error { @@ -219,13 +219,14 @@ func validateMetadata(out metadata) error { t, _ := ut.T("nosuchattribute", fe.Field()) return t }); err != nil { - return fmt.Errorf("failed registering nosuchattribute: %v", err) + return fmt.Errorf("failed registering nosuchattribute: %w", err) } v.RegisterStructValidation(metricValidation, metric{}) if err := v.Struct(&out); err != nil { - if verr, ok := err.(validator.ValidationErrors); ok { + var verr validator.ValidationErrors + if errors.As(err, &verr) { m := verr.Translate(tr) buf := strings.Builder{} buf.WriteString("error validating struct:\n") @@ -234,7 +235,7 @@ func validateMetadata(out metadata) error { } return errors.New(buf.String()) } - return fmt.Errorf("unknown validation error: %v", err) + return fmt.Errorf("unknown validation error: %w", err) } // Set metric data interface. diff --git a/cmd/mdatagen/loader_test.go b/cmd/mdatagen/loader_test.go index ce3de45036ca..a34660961e16 100644 --- a/cmd/mdatagen/loader_test.go +++ b/cmd/mdatagen/loader_test.go @@ -19,6 +19,7 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" ) @@ -39,13 +40,21 @@ func Test_loadMetadata(t *testing.T) { "enumAttribute": { Description: "Attribute with a known set of values.", Value: "", - Enum: []string{"red", "green", "blue"}}, + Enum: []string{"red", "green", "blue"}, + }, "freeFormAttribute": { Description: "Attribute that can take on any value.", Value: ""}, "freeFormAttributeWithValue": { Description: "Attribute that has alternate value set.", - Value: "state"}}, + Value: "state"}, + "booleanValueType": { + Description: "Attribute with a boolean value.", + Value: "0", + Type: ValueType{ + ValueType: pcommon.ValueTypeBool, + }, + }}, Metrics: map[metricName]metric{ "system.cpu.time": { Enabled: (func() *bool { t := true; return &t })(), @@ -57,7 +66,7 @@ func Test_loadMetadata(t *testing.T) { Aggregated: Aggregated{Aggregation: "cumulative"}, Mono: Mono{Monotonic: true}, }, - Attributes: []attributeName{"freeFormAttribute", "freeFormAttributeWithValue", "enumAttribute"}, + Attributes: []attributeName{"freeFormAttribute", "freeFormAttributeWithValue", "enumAttribute", "booleanValueType"}, }, "system.cpu.utilization": { Enabled: (func() *bool { f := false; return &f })(), @@ -66,7 +75,7 @@ func Test_loadMetadata(t *testing.T) { Gauge: &gauge{ MetricValueType: MetricValueType{pmetric.NumberDataPointValueTypeDouble}, }, - Attributes: []attributeName{"enumAttribute"}, + Attributes: []attributeName{"enumAttribute", "booleanValueType"}, }, }, }, diff --git a/cmd/mdatagen/main.go b/cmd/mdatagen/main.go index 1f0b65e8a7cb..23c23e4e0d80 100644 --- a/cmd/mdatagen/main.go +++ b/cmd/mdatagen/main.go @@ -54,7 +54,7 @@ func run(ymlPath string, useExpGen bool) error { md, err := loadMetadata(filepath.Clean(ymlPath)) if err != nil { - return fmt.Errorf("failed loading %v: %v", ymlPath, err) + return fmt.Errorf("failed loading %v: %w", ymlPath, err) } _, filename, _, ok := runtime.Caller(0) @@ -106,7 +106,7 @@ func generateMetrics(ymlDir string, thisDir string, md metadata, useExpGen bool) buf := bytes.Buffer{} if err := tmpl.Execute(&buf, templateContext{metadata: md, Package: "metadata"}); err != nil { - return fmt.Errorf("failed executing template: %v", err) + return fmt.Errorf("failed executing template: %w", err) } formatted, err := format.Source(buf.Bytes()) @@ -122,16 +122,16 @@ func generateMetrics(ymlDir string, thisDir string, md metadata, useExpGen bool) outputDir := filepath.Join(ymlDir, "internal", "metadata") if err := os.MkdirAll(outputDir, 0700); err != nil { - return fmt.Errorf("unable to create output directory %q: %v", outputDir, err) + return fmt.Errorf("unable to create output directory %q: %w", outputDir, err) } for _, f := range []string{filepath.Join(outputDir, outputFileV1), filepath.Join(outputDir, outputFileV2)} { if err := os.Remove(f); err != nil && !errors.Is(err, os.ErrNotExist) { - return fmt.Errorf("unable to remove genererated file %q: %v", f, err) + return fmt.Errorf("unable to remove genererated file %q: %w", f, err) } } outputFilepath := filepath.Join(outputDir, outputFile) if err := ioutil.WriteFile(outputFilepath, formatted, 0600); err != nil { - return fmt.Errorf("failed writing %q: %v", outputFilepath, err) + return fmt.Errorf("failed writing %q: %w", outputFilepath, err) } return nil @@ -153,12 +153,12 @@ func generateDocumentation(ymlDir string, thisDir string, md metadata, useExpGen tmplCtx := templateContext{metadata: md, ExpGen: useExpGen, Package: "metadata"} if err := tmpl.Execute(&buf, tmplCtx); err != nil { - return fmt.Errorf("failed executing template: %v", err) + return fmt.Errorf("failed executing template: %w", err) } outputFile := filepath.Join(ymlDir, "documentation.md") if err := ioutil.WriteFile(outputFile, buf.Bytes(), 0600); err != nil { - return fmt.Errorf("failed writing %q: %v", outputFile, err) + return fmt.Errorf("failed writing %q: %w", outputFile, err) } return nil diff --git a/cmd/mdatagen/metric-metadata.yaml b/cmd/mdatagen/metric-metadata.yaml index 7ee068b63622..7ee9139c6182 100644 --- a/cmd/mdatagen/metric-metadata.yaml +++ b/cmd/mdatagen/metric-metadata.yaml @@ -24,6 +24,8 @@ attributes: description: # Optional: array of attribute values if they are static values. enum: + # Optional: attribute type. Default: string. + type: # Required: map of metric names with the key being the metric name and value # being described below. diff --git a/cmd/mdatagen/metrics_v2.tmpl b/cmd/mdatagen/metrics_v2.tmpl index 518b5f77609b..c74f83125979 100644 --- a/cmd/mdatagen/metrics_v2.tmpl +++ b/cmd/mdatagen/metrics_v2.tmpl @@ -97,7 +97,7 @@ func (m *metric{{ $name.Render }}) init() { } func (m *metric{{ $name.Render }}) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val {{ $metric.Data.MetricValueType.BasicType }} -{{- range $metric.Attributes -}}, {{ .RenderUnexported }}AttributeValue string {{ end }}) { +{{- range $metric.Attributes -}}, {{ .RenderUnexported }}AttributeValue {{ if (attributeInfo .).Type.ValueType }} {{ (attributeInfo .).Type.Primitive }}{{ else }}string{{ end }}{{ end }}) { if !m.settings.Enabled { return } @@ -106,8 +106,18 @@ func (m *metric{{ $name.Render }}) recordDataPoint(start pcommon.Timestamp, ts p dp.SetTimestamp(ts) dp.Set{{ $metric.Data.MetricValueType }}Val(val) {{- range $metric.Attributes }} + {{- if eq (attributeInfo .).Type.Primitive "bool" }} + dp.Attributes().Insert("{{ attributeKey .}}", pcommon.NewValueBool({{ .RenderUnexported }}AttributeValue)) + {{- else if eq (attributeInfo .).Type.Primitive "int64" }} + dp.Attributes().Insert("{{ attributeKey .}}", pcommon.NewValueInt({{ .RenderUnexported }}AttributeValue)) + {{- else if eq (attributeInfo .).Type.Primitive "float64" }} + dp.Attributes().Insert("{{ attributeKey .}}", pcommon.NewValueDouble({{ .RenderUnexported }}AttributeValue)) + {{- else if eq (attributeInfo .).Type.Primitive "[]byte" }} + dp.Attributes().Insert("{{ attributeKey .}}", pcommon.NewValueMBytes({{ .RenderUnexported }}AttributeValue)) + {{- else }} dp.Attributes().Insert("{{ attributeKey .}}", pcommon.NewValueString({{ .RenderUnexported }}AttributeValue)) {{- end }} + {{- end }} } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -261,7 +271,7 @@ func (mb *MetricsBuilder) Record{{ $name.Render }}DataPoint(ts pcommon.Timestamp {{- else }}, val {{ $metric.Data.MetricValueType.BasicType }} {{- end }} {{- range $metric.Attributes -}} - , {{ .RenderUnexported }}AttributeValue {{ if (attributeInfo .).Enum }}Attribute{{ .Render }}{{ else }}string{{ end }} + , {{ .RenderUnexported }}AttributeValue {{ if (attributeInfo .).Enum }}Attribute{{ .Render }}{{ else }}{{ if (attributeInfo .).Type.ValueType }} {{ (attributeInfo .).Type.Primitive }}{{ else }}string{{ end }}{{ end }} {{- end }}) {{- if $metric.Data.HasMetricInputType }} error{{ end }} { {{- if $metric.Data.HasMetricInputType }} diff --git a/cmd/mdatagen/testdata/all_options.yaml b/cmd/mdatagen/testdata/all_options.yaml index d940586065a6..c622791e8468 100644 --- a/cmd/mdatagen/testdata/all_options.yaml +++ b/cmd/mdatagen/testdata/all_options.yaml @@ -12,6 +12,11 @@ attributes: description: Attribute with a known set of values. enum: [red, green, blue] + booleanValueType: + description: Attribute with a boolean value. + type: bool + value: false + metrics: # A metric enabled by default. system.cpu.time: @@ -23,7 +28,7 @@ metrics: value_type: double monotonic: true aggregation: cumulative - attributes: [freeFormAttribute, freeFormAttributeWithValue, enumAttribute] + attributes: [freeFormAttribute, freeFormAttributeWithValue, enumAttribute, booleanValueType] # An optional metric. system.cpu.utilization: @@ -32,4 +37,4 @@ metrics: unit: 1 gauge: value_type: double - attributes: [enumAttribute] + attributes: [enumAttribute, booleanValueType] diff --git a/exporter/alibabacloudlogserviceexporter/go.mod b/exporter/alibabacloudlogserviceexporter/go.mod index d8c44f3314a9..d0b4e4fcc4a3 100644 --- a/exporter/alibabacloudlogserviceexporter/go.mod +++ b/exporter/alibabacloudlogserviceexporter/go.mod @@ -7,9 +7,9 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/exporter/alibabacloudlogserviceexporter/go.sum b/exporter/alibabacloudlogserviceexporter/go.sum index 92497d3f1134..b5c0355509e0 100644 --- a/exporter/alibabacloudlogserviceexporter/go.sum +++ b/exporter/alibabacloudlogserviceexporter/go.sum @@ -377,12 +377,12 @@ go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/awscloudwatchlogsexporter/exporter.go b/exporter/awscloudwatchlogsexporter/exporter.go index 593e918b0ae1..7bf9d0377417 100644 --- a/exporter/awscloudwatchlogsexporter/exporter.go +++ b/exporter/awscloudwatchlogsexporter/exporter.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck package awscloudwatchlogsexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awscloudwatchlogsexporter" import ( @@ -66,8 +65,6 @@ func newCwLogsPusher(expConfig *Config, params component.ExporterCreateSettings) return nil, err } - expConfig.Validate() - pusher := cwlogs.NewPusher(aws.String(expConfig.LogGroupName), aws.String(expConfig.LogStreamName), *awsConfig.MaxRetries, *svcStructuredLog, params.Logger) logsExporter := &exporter{ diff --git a/exporter/awscloudwatchlogsexporter/exporter_test.go b/exporter/awscloudwatchlogsexporter/exporter_test.go index e12e42d50587..818363166da0 100644 --- a/exporter/awscloudwatchlogsexporter/exporter_test.go +++ b/exporter/awscloudwatchlogsexporter/exporter_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck package awscloudwatchlogsexporter import ( @@ -110,7 +109,11 @@ func BenchmarkLogToCWLog(b *testing.B) { resource := testResource() log := testLogRecord() for i := 0; i < b.N; i++ { - logToCWLog(attrsValue(resource.Attributes()), log) + _, err := logToCWLog(attrsValue(resource.Attributes()), log) + if err != nil { + b.Errorf("logToCWLog() failed %v", err) + return + } } } diff --git a/exporter/awscloudwatchlogsexporter/go.mod b/exporter/awscloudwatchlogsexporter/go.mod index d98dd1650386..6b93a8d2af6e 100644 --- a/exporter/awscloudwatchlogsexporter/go.mod +++ b/exporter/awscloudwatchlogsexporter/go.mod @@ -3,13 +3,13 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsclo go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/google/uuid v1.3.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/exporter/awscloudwatchlogsexporter/go.sum b/exporter/awscloudwatchlogsexporter/go.sum index b42d495eec58..4f7fb69cf2c3 100644 --- a/exporter/awscloudwatchlogsexporter/go.sum +++ b/exporter/awscloudwatchlogsexporter/go.sum @@ -5,8 +5,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -193,10 +193,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/awsemfexporter/README.md b/exporter/awsemfexporter/README.md index 74565f3d49a6..eba3b6dae771 100644 --- a/exporter/awsemfexporter/README.md +++ b/exporter/awsemfexporter/README.md @@ -12,25 +12,25 @@ Convert OpenTelemetry ```Int64DataPoints```, ```DoubleDataPoints```, ```SummaryD The following exporter configuration parameters are supported. -| Name | Description | Default | -| :---------------- | :--------------------------------------------------------------------- | ------- | -| `log_group_name` | Customized log group name which supports `{ClusterName}` and `{TaskId}` placeholders. One valid example is `/aws/metrics/{ClusterName}`. It will search for `ClusterName` (or `aws.ecs.cluster.name`) resource attribute in the metrics data and replace with the actual cluster name. If none of them are found in the resource attribute map, `{ClusterName}` will be replaced by `undefined`. Similar way, for the `{TaskId}`, it searches for `TaskId` (or `aws.ecs.task.id`) key in the resource attribute map. For `{NodeName}`, it searches for `NodeName` (or `k8s.node.name`) |"/metrics/default"| -| `log_stream_name` | Customized log stream name which supports `{TaskId}`, `{ClusterName}`, `{NodeName}`, `{ContainerInstanceId}`, and `{TaskDefinitionFamily}` placeholders. One valid example is `{TaskId}`. It will search for `TaskId` (or `aws.ecs.task.id`) resource attribute in the metrics data and replace with the actual task id. If none of them are found in the resource attribute map, `{TaskId}` will be replaced by `undefined`. Similarly, for the `{TaskDefinitionFamily}`, it searches for `TaskDefinitionFamily` (or `aws.ecs.task.family`). For the `{ClusterName}`, it searches for `ClusterName` (or `aws.ecs.cluster.name`). For `{NodeName}`, it searches for `NodeName` (or `k8s.node.name`). For `{ContainerInstanceId}`, it searches for `ContainerInstanceId` (or `aws.ecs.container.instance.id`). (Note: ContainerInstanceId (or `aws.ecs.container.instance.id`) only works for AWS ECS EC2 launch type. |"otel-stream"| -| `namespace` | Customized CloudWatch metrics namespace | "default" | -| `endpoint` | Optionally override the default CloudWatch service endpoint. | | -| `no_verify_ssl` | Enable or disable TLS certificate verification. | false | -| `proxy_address` | Upload Structured Logs to AWS CloudWatch through a proxy. | | -| `region` | Send Structured Logs to AWS CloudWatch in a specific region. If this field is not present in config, environment variable "AWS_REGION" can then be used to set region.| determined by metadata | -| `role_arn` | IAM role to upload segments to a different account. | | -| `max_retries` | Maximum number of retries before abandoning an attempt to post data. | 1 | -| `dimension_rollup_option`| DimensionRollupOption is the option for metrics dimension rollup. Three options are available. |"ZeroAndSingleDimensionRollup" (Enable both zero dimension rollup and single dimension rollup)| -| `resource_to_telemetry_conversion` | "resource_to_telemetry_conversion" is the option for converting resource attributes to telemetry attributes. It has only one config onption- `enabled`. For metrics, if `enabled=true`, all the resource attributes will be converted to metric labels by default. See `Resource Attributes to Metric Labels` section below for examples. | `enabled=false` | -| `output_destination` | "output_destination" is an option to specify the EMFExporter output. Currently, two options are available. "cloudwatch" or "stdout" | `cloudwatch` | -| `parse_json_encoded_attr_values` | List of attribute keys whose corresponding values are JSON-encoded strings and will be converted to JSON structures in emf logs. For example, the attribute string value "{\\"x\\":5,\\"y\\":6}" will be converted to a json object: ```{"x": 5, "y": 6}```| [ ] | +| Name | Description | Default | +|:---------------------------------------------| :--------------------------------------------------------------------- | ------- | +| `log_group_name` | Customized log group name which supports `{ClusterName}` and `{TaskId}` placeholders. One valid example is `/aws/metrics/{ClusterName}`. It will search for `ClusterName` (or `aws.ecs.cluster.name`) resource attribute in the metrics data and replace with the actual cluster name. If none of them are found in the resource attribute map, `{ClusterName}` will be replaced by `undefined`. Similar way, for the `{TaskId}`, it searches for `TaskId` (or `aws.ecs.task.id`) key in the resource attribute map. For `{NodeName}`, it searches for `NodeName` (or `k8s.node.name`) |"/metrics/default"| +| `log_stream_name` | Customized log stream name which supports `{TaskId}`, `{ClusterName}`, `{NodeName}`, `{ContainerInstanceId}`, and `{TaskDefinitionFamily}` placeholders. One valid example is `{TaskId}`. It will search for `TaskId` (or `aws.ecs.task.id`) resource attribute in the metrics data and replace with the actual task id. If none of them are found in the resource attribute map, `{TaskId}` will be replaced by `undefined`. Similarly, for the `{TaskDefinitionFamily}`, it searches for `TaskDefinitionFamily` (or `aws.ecs.task.family`). For the `{ClusterName}`, it searches for `ClusterName` (or `aws.ecs.cluster.name`). For `{NodeName}`, it searches for `NodeName` (or `k8s.node.name`). For `{ContainerInstanceId}`, it searches for `ContainerInstanceId` (or `aws.ecs.container.instance.id`). (Note: ContainerInstanceId (or `aws.ecs.container.instance.id`) only works for AWS ECS EC2 launch type. |"otel-stream"| +| `namespace` | Customized CloudWatch metrics namespace | "default" | +| `endpoint` | Optionally override the default CloudWatch service endpoint. | | +| `no_verify_ssl` | Enable or disable TLS certificate verification. | false | +| `proxy_address` | Upload Structured Logs to AWS CloudWatch through a proxy. | | +| `region` | Send Structured Logs to AWS CloudWatch in a specific region. If this field is not present in config, environment variable "AWS_REGION" can then be used to set region.| determined by metadata | +| `role_arn` | IAM role to upload segments to a different account. | | +| `max_retries` | Maximum number of retries before abandoning an attempt to post data. | 1 | +| `dimension_rollup_option` | DimensionRollupOption is the option for metrics dimension rollup. Three options are available. |"ZeroAndSingleDimensionRollup" (Enable both zero dimension rollup and single dimension rollup)| +| `resource_to_telemetry_conversion` | "resource_to_telemetry_conversion" is the option for converting resource attributes to telemetry attributes. It has only one config onption- `enabled`. For metrics, if `enabled=true`, all the resource attributes will be converted to metric labels by default. See `Resource Attributes to Metric Labels` section below for examples. | `enabled=false` | +| `output_destination` | "output_destination" is an option to specify the EMFExporter output. Currently, two options are available. "cloudwatch" or "stdout" | `cloudwatch` | +| `parse_json_encoded_attr_values` | List of attribute keys whose corresponding values are JSON-encoded strings and will be converted to JSON structures in emf logs. For example, the attribute string value "{\\"x\\":5,\\"y\\":6}" will be converted to a json object: ```{"x": 5, "y": 6}```| [ ] | | [`metric_declarations`](#metric_declaration) | List of rules for filtering exported metrics and their dimensions. | [ ] | -| [`metric_descriptors`](#metric_descriptor) | List of rules for inserting or updating metric descriptors.| [ ]| +| [`metric_descriptors`](#metric_descriptor) | List of rules for inserting or updating metric descriptors.| [ ]| -### +### metric_declaration A metric_declaration section characterizes a rule to be used to set dimensions for exported metrics, filtered by the incoming metrics' labels and metric names. | Name | Description | Default | @@ -39,7 +39,7 @@ A metric_declaration section characterizes a rule to be used to set dimensions f | `metric_name_selectors` | List of regex strings to filter metric names by. | | | [`label_matchers`](#label_matcher) | (Optional) list of label matching rules to filter metrics by their labels. This rule is applied to any metric that matches any of the label matchers. | [ ] | -#### +#### label_matcher A label_matcher section defines a matching rule against the labels of the incoming metric. Only metrics that match the rules will be used by the surrounding `metric_declaration`. | Name | Description | Default | @@ -48,7 +48,7 @@ A label_matcher section defines a matching rule against the labels of the incomi | `separator` | (Optional) separator placed between concatenated label values. | ";" | | `regex` | Regex string to be matched against concatenated label values. | | -### +### metric_descriptor A metric descriptor section allows the schema of a metric to be overwritten before sending out to the CloudWatch backend service. Currently, we only support unit override. | Name | Description | Default | diff --git a/exporter/awsemfexporter/emf_exporter.go b/exporter/awsemfexporter/emf_exporter.go index 790d92c95e35..ce262cdada34 100644 --- a/exporter/awsemfexporter/emf_exporter.go +++ b/exporter/awsemfexporter/emf_exporter.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck,gocritic package awsemfexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemfexporter" import ( @@ -46,7 +45,7 @@ const ( ) type emfExporter struct { - //Each (log group, log stream) keeps a separate pusher because of each (log group, log stream) requires separate stream token. + // Each (log group, log stream) keeps a separate pusher because of each (log group, log stream) requires separate stream token. groupStreamToPusherMap map[string]map[string]cwlogs.Pusher svcStructuredLog *cwlogs.Client config config.Exporter @@ -82,8 +81,6 @@ func newEmfPusher( svcStructuredLog := cwlogs.NewClient(logger, awsConfig, params.BuildInfo, expConfig.LogGroupName, session) collectorIdentifier, _ := uuid.NewRandom() - expConfig.Validate() - emfExporter := &emfExporter{ svcStructuredLog: svcStructuredLog, config: config, @@ -164,7 +161,7 @@ func (emf *emfExporter) pushMetricsData(_ context.Context, md pmetric.Metrics) e if emfPusher != nil { returnError := emfPusher.AddLogEntry(putLogEvent) if returnError != nil { - return wrapErrorIfBadRequest(&returnError) + return wrapErrorIfBadRequest(returnError) } } } @@ -174,8 +171,8 @@ func (emf *emfExporter) pushMetricsData(_ context.Context, md pmetric.Metrics) e for _, emfPusher := range emf.listPushers() { returnError := emfPusher.ForceFlush() if returnError != nil { - //TODO now we only have one logPusher, so it's ok to return after first error occurred - err := wrapErrorIfBadRequest(&returnError) + // TODO now we only have one logPusher, so it's ok to return after first error occurred + err := wrapErrorIfBadRequest(returnError) if err != nil { emf.logger.Error("Error force flushing logs. Skipping to next logPusher.", zap.Error(err)) } @@ -230,7 +227,7 @@ func (emf *emfExporter) Shutdown(ctx context.Context) error { for _, emfPusher := range emf.listPushers() { returnError := emfPusher.ForceFlush() if returnError != nil { - err := wrapErrorIfBadRequest(&returnError) + err := wrapErrorIfBadRequest(returnError) if err != nil { emf.logger.Error("Error when gracefully shutting down emf_exporter. Skipping to next logPusher.", zap.Error(err)) } @@ -249,10 +246,10 @@ func (emf *emfExporter) Start(ctx context.Context, host component.Host) error { return nil } -func wrapErrorIfBadRequest(err *error) error { - _, ok := (*err).(awserr.RequestFailure) - if ok && (*err).(awserr.RequestFailure).StatusCode() < 500 { - return consumererror.NewPermanent(*err) +func wrapErrorIfBadRequest(err error) error { + var rfErr awserr.RequestFailure + if errors.As(err, &rfErr) && rfErr.StatusCode() < 500 { + return consumererror.NewPermanent(err) } - return *err + return err } diff --git a/exporter/awsemfexporter/emf_exporter_test.go b/exporter/awsemfexporter/emf_exporter_test.go index 8aafdf7497a9..cc720473d76b 100644 --- a/exporter/awsemfexporter/emf_exporter_test.go +++ b/exporter/awsemfexporter/emf_exporter_test.go @@ -18,7 +18,6 @@ import ( "context" "errors" "os" - "strings" "testing" "github.com/aws/aws-sdk-go/aws/awserr" @@ -546,9 +545,7 @@ func TestPushMetricsDataWithErr(t *testing.T) { func TestNewExporterWithoutConfig(t *testing.T) { factory := NewFactory() expCfg := factory.CreateDefaultConfig().(*Config) - env := stashEnv() - defer popEnv(env) - os.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") + t.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") assert.Nil(t, expCfg.logger) exp, err := newEmfPusher(expCfg, componenttest.NewNopExporterCreateSettings()) @@ -591,6 +588,8 @@ func TestNewExporterWithMetricDeclarations(t *testing.T) { exp, err := newEmfPusher(expCfg, params) assert.Nil(t, err) assert.NotNil(t, exp) + err = expCfg.Validate() + assert.Nil(t, err) emfExporter := exp.(*emfExporter) config := emfExporter.config.(*Config) @@ -622,10 +621,10 @@ func TestNewExporterWithoutSession(t *testing.T) { func TestWrapErrorIfBadRequest(t *testing.T) { awsErr := awserr.NewRequestFailure(nil, 400, "").(error) - err := wrapErrorIfBadRequest(&awsErr) + err := wrapErrorIfBadRequest(awsErr) assert.True(t, consumererror.IsPermanent(err)) awsErr = awserr.NewRequestFailure(nil, 500, "").(error) - err = wrapErrorIfBadRequest(&awsErr) + err = wrapErrorIfBadRequest(awsErr) assert.False(t, consumererror.IsPermanent(err)) } @@ -634,9 +633,7 @@ func TestWrapErrorIfBadRequest(t *testing.T) { func TestNewEmfExporterWithoutConfig(t *testing.T) { factory := NewFactory() expCfg := factory.CreateDefaultConfig().(*Config) - env := stashEnv() - defer popEnv(env) - os.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") + t.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") assert.Nil(t, expCfg.logger) exp, err := newEmfExporter(expCfg, componenttest.NewNopExporterCreateSettings()) @@ -644,19 +641,3 @@ func TestNewEmfExporterWithoutConfig(t *testing.T) { assert.Nil(t, exp) assert.NotNil(t, expCfg.logger) } - -func stashEnv() []string { - env := os.Environ() - os.Clearenv() - - return env -} - -func popEnv(env []string) { - os.Clearenv() - - for _, e := range env { - p := strings.SplitN(e, "=", 2) - os.Setenv(p[0], p[1]) - } -} diff --git a/exporter/awsemfexporter/go.mod b/exporter/awsemfexporter/go.mod index 97ebfd3ac4db..8241aa18270a 100644 --- a/exporter/awsemfexporter/go.mod +++ b/exporter/awsemfexporter/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsemf go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/census-instrumentation/opencensus-proto v0.3.0 github.com/golang/protobuf v1.5.2 github.com/google/uuid v1.3.0 @@ -13,9 +13,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.28.0 ) diff --git a/exporter/awsemfexporter/go.sum b/exporter/awsemfexporter/go.sum index dbff3d9226dc..cfe9560360a6 100644 --- a/exporter/awsemfexporter/go.sum +++ b/exporter/awsemfexporter/go.sum @@ -5,8 +5,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -197,12 +197,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/awsemfexporter/grouped_metric_test.go b/exporter/awsemfexporter/grouped_metric_test.go index 503bee9373ff..28dafa45b679 100644 --- a/exporter/awsemfexporter/grouped_metric_test.go +++ b/exporter/awsemfexporter/grouped_metric_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck,gocritic package awsemfexporter import ( @@ -156,7 +155,8 @@ func TestAddToGroupedMetric(t *testing.T) { for i := 0; i < metrics.Len(); i++ { metric := metrics.At(i) - addToGroupedMetric(&metric, groupedMetrics, metadata, true, zap.NewNop(), nil, nil) + err := addToGroupedMetric(&metric, groupedMetrics, metadata, true, zap.NewNop(), nil, nil) + assert.Nil(t, err) } expectedLabels := map[string]string{ @@ -204,7 +204,8 @@ func TestAddToGroupedMetric(t *testing.T) { for i := 0; i < metrics.Len(); i++ { metric := metrics.At(i) - addToGroupedMetric(&metric, groupedMetrics, metadata, true, logger, nil, nil) + err := addToGroupedMetric(&metric, groupedMetrics, metadata, true, logger, nil, nil) + assert.Nil(t, err) } assert.Equal(t, 1, len(groupedMetrics)) @@ -267,24 +268,27 @@ func TestAddToGroupedMetric(t *testing.T) { for i := 0; i < metrics.Len(); i++ { metric := metrics.At(i) - addToGroupedMetric(&metric, groupedMetrics, metadata, true, logger, nil, nil) + err := addToGroupedMetric(&metric, groupedMetrics, metadata, true, logger, nil, nil) + assert.Nil(t, err) } assert.Equal(t, 3, len(groupedMetrics)) for _, group := range groupedMetrics { for metricName := range group.metrics { - if metricName == "int-gauge" || metricName == "int-sum" { + switch metricName { + case "int-gauge", "int-sum": assert.Equal(t, 2, len(group.metrics)) assert.Equal(t, int64(1608068109347), group.metadata.timestampMs) - } else if metricName == "summary" { + case "summary": assert.Equal(t, 1, len(group.metrics)) assert.Equal(t, int64(1608068110347), group.metadata.timestampMs) - } else { + default: // double-gauge should use the default timestamp assert.Equal(t, 1, len(group.metrics)) assert.Equal(t, "double-gauge", metricName) assert.Equal(t, timestamp, group.metadata.timestampMs) } + } expectedLabels := map[string]string{ oTellibDimensionKey: "cloudwatch-otel", @@ -314,7 +318,8 @@ func TestAddToGroupedMetric(t *testing.T) { }, instrumentationLibraryName: instrumentationLibName, } - addToGroupedMetric(&metric, groupedMetrics, metricMetadata1, true, logger, nil, nil) + err := addToGroupedMetric(&metric, groupedMetrics, metricMetadata1, true, logger, nil, nil) + assert.Nil(t, err) metricMetadata2 := cWMetricMetadata{ groupedMetricMetadata: groupedMetricMetadata{ @@ -325,7 +330,8 @@ func TestAddToGroupedMetric(t *testing.T) { }, instrumentationLibraryName: instrumentationLibName, } - addToGroupedMetric(&metric, groupedMetrics, metricMetadata2, true, logger, nil, nil) + err = addToGroupedMetric(&metric, groupedMetrics, metricMetadata2, true, logger, nil, nil) + assert.Nil(t, err) assert.Equal(t, 2, len(groupedMetrics)) seenLogGroup1 := false @@ -380,7 +386,8 @@ func TestAddToGroupedMetric(t *testing.T) { for i := 0; i < metrics.Len(); i++ { metric := metrics.At(i) - addToGroupedMetric(&metric, groupedMetrics, metadata, true, obsLogger, nil, nil) + err := addToGroupedMetric(&metric, groupedMetrics, metadata, true, obsLogger, nil, nil) + assert.Nil(t, err) } assert.Equal(t, 1, len(groupedMetrics)) @@ -413,7 +420,8 @@ func TestAddToGroupedMetric(t *testing.T) { obs, logs := observer.New(zap.WarnLevel) obsLogger := zap.New(obs) - addToGroupedMetric(&metric, groupedMetrics, metadata, true, obsLogger, nil, nil) + err := addToGroupedMetric(&metric, groupedMetrics, metadata, true, obsLogger, nil, nil) + assert.Nil(t, err) assert.Equal(t, 0, len(groupedMetrics)) // Test output warning logs @@ -433,7 +441,8 @@ func TestAddToGroupedMetric(t *testing.T) { t.Run("Nil metric", func(t *testing.T) { groupedMetrics := make(map[interface{}]*groupedMetric) - addToGroupedMetric(nil, groupedMetrics, metadata, true, logger, nil, nil) + err := addToGroupedMetric(nil, groupedMetrics, metadata, true, logger, nil, nil) + assert.Nil(t, err) assert.Equal(t, 0, len(groupedMetrics)) }) @@ -502,7 +511,8 @@ func BenchmarkAddToGroupedMetric(b *testing.B) { groupedMetrics := make(map[interface{}]*groupedMetric) for i := 0; i < numMetrics; i++ { metric := metrics.At(i) - addToGroupedMetric(&metric, groupedMetrics, metadata, true, logger, nil, nil) + err := addToGroupedMetric(&metric, groupedMetrics, metadata, true, logger, nil, nil) + assert.Nil(b, err) } } } diff --git a/exporter/awsemfexporter/metric_declaration_test.go b/exporter/awsemfexporter/metric_declaration_test.go index 924d76cc762d..71d7be3aa6c8 100644 --- a/exporter/awsemfexporter/metric_declaration_test.go +++ b/exporter/awsemfexporter/metric_declaration_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck package awsemfexporter import ( @@ -115,7 +114,8 @@ func TestGetConcatenatedLabels(t *testing.T) { Separator: tc.separator, Regex: ".+", } - lm.init() + err := lm.init() + assert.Nil(t, err) t.Run(tc.testName, func(t *testing.T) { concatenatedLabels := lm.getConcatenatedLabels(labels) assert.Equal(t, tc.expected, concatenatedLabels) @@ -220,7 +220,8 @@ func TestLabelMatcherMatches(t *testing.T) { } for _, tc := range testCases { - tc.labelMatcher.init() + err := tc.labelMatcher.init() + assert.Nil(t, err) t.Run(tc.testName, func(t *testing.T) { matches := tc.labelMatcher.Matches(tc.labels) assert.Equal(t, tc.expected, matches) diff --git a/exporter/awsemfexporter/metric_translator_test.go b/exporter/awsemfexporter/metric_translator_test.go index 0be3a924cbd3..80404f66ef61 100644 --- a/exporter/awsemfexporter/metric_translator_test.go +++ b/exporter/awsemfexporter/metric_translator_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck,gocritic package awsemfexporter import ( @@ -497,7 +496,8 @@ func TestTranslateOtToGroupedMetric(t *testing.T) { setupDataPointCache() groupedMetrics := make(map[interface{}]*groupedMetric) - translator.translateOTelToGroupedMetric(tc.metric, groupedMetrics, config) + err := translator.translateOTelToGroupedMetric(tc.metric, groupedMetrics, config) + assert.Nil(t, err) assert.NotNil(t, groupedMetrics) assert.Equal(t, 2, len(groupedMetrics)) @@ -529,7 +529,8 @@ func TestTranslateOtToGroupedMetric(t *testing.T) { } rm := internaldata.OCToMetrics(oc.Node, oc.Resource, oc.Metrics).ResourceMetrics().At(0) groupedMetrics := make(map[interface{}]*groupedMetric) - translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + err := translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + assert.Nil(t, err) assert.Equal(t, 0, len(groupedMetrics)) }) } @@ -548,12 +549,12 @@ func TestTranslateCWMetricToEMF(t *testing.T) { fields[oTellibDimensionKey] = "cloudwatch-otel" fields["spanName"] = "test" fields["spanCounter"] = 0 - //add stringified json as attribute values + // add stringified json as attribute values fields["kubernetes"] = "{\"container_name\":\"cloudwatch-agent\",\"docker\":{\"container_id\":\"fc1b0a4c3faaa1808e187486a3a90cbea883dccaf2e2c46d4069d663b032a1ca\"},\"host\":\"ip-192-168-58-245.ec2.internal\",\"labels\":{\"controller-revision-hash\":\"5bdbf497dc\",\"name\":\"cloudwatch-agent\",\"pod-template-generation\":\"1\"},\"namespace_name\":\"amazon-cloudwatch\",\"pod_id\":\"e23f3413-af2e-4a98-89e0-5df2251e7f05\",\"pod_name\":\"cloudwatch-agent-26bl6\",\"pod_owners\":[{\"owner_kind\":\"DaemonSet\",\"owner_name\":\"cloudwatch-agent\"}]}" fields["Sources"] = "[\"cadvisor\",\"pod\",\"calculated\"]" config := &Config{ - //include valid json string, a non-existing key, and keys whose value are not json/string + // include valid json string, a non-existing key, and keys whose value are not json/string ParseJSONEncodedAttributeValues: []string{"kubernetes", "Sources", "NonExistingAttributeKey", "spanName", "spanCounter"}, logger: zap.NewNop(), } @@ -883,7 +884,8 @@ func TestTranslateGroupedMetricToCWMetric(t *testing.T) { logger: logger, } for _, decl := range tc.metricDeclarations { - decl.init(logger) + err := decl.init(logger) + assert.Nil(t, err) } cWMetric := translateGroupedMetricToCWMetric(tc.groupedMetric, config) assert.NotNil(t, cWMetric) @@ -2070,7 +2072,8 @@ func BenchmarkTranslateOtToGroupedMetricWithInstrLibrary(b *testing.B) { b.ResetTimer() for n := 0; n < b.N; n++ { groupedMetric := make(map[interface{}]*groupedMetric) - translator.translateOTelToGroupedMetric(&rm, groupedMetric, config) + err := translator.translateOTelToGroupedMetric(&rm, groupedMetric, config) + assert.Nil(b, err) } } @@ -2092,7 +2095,8 @@ func BenchmarkTranslateOtToGroupedMetricWithoutConfigReplacePattern(b *testing.B b.ResetTimer() for n := 0; n < b.N; n++ { groupedMetrics := make(map[interface{}]*groupedMetric) - translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + err := translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + assert.Nil(b, err) } } @@ -2114,7 +2118,8 @@ func BenchmarkTranslateOtToGroupedMetricWithConfigReplaceWithResource(b *testing b.ResetTimer() for n := 0; n < b.N; n++ { groupedMetrics := make(map[interface{}]*groupedMetric) - translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + err := translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + assert.Nil(b, err) } } @@ -2136,7 +2141,8 @@ func BenchmarkTranslateOtToGroupedMetricWithConfigReplaceWithLabel(b *testing.B) b.ResetTimer() for n := 0; n < b.N; n++ { groupedMetrics := make(map[interface{}]*groupedMetric) - translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + err := translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + assert.Nil(b, err) } } @@ -2153,7 +2159,8 @@ func BenchmarkTranslateOtToGroupedMetricWithoutInstrLibrary(b *testing.B) { b.ResetTimer() for n := 0; n < b.N; n++ { groupedMetrics := make(map[interface{}]*groupedMetric) - translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + err := translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + assert.Nil(b, err) } } @@ -2221,7 +2228,8 @@ func BenchmarkTranslateGroupedMetricToCWMetricWithFiltering(b *testing.B) { MetricNameSelectors: []string{"metric1", "metric2"}, } logger := zap.NewNop() - m.init(logger) + err := m.init(logger) + assert.Nil(b, err) config := &Config{ MetricDeclarations: []*MetricDeclaration{m}, DimensionRollupOption: zeroAndSingleDimensionRollup, @@ -2410,7 +2418,8 @@ func TestTranslateOtToGroupedMetricForLogGroupAndStream(t *testing.T) { groupedMetrics := make(map[interface{}]*groupedMetric) rm := test.inputMetrics.ResourceMetrics().At(0) - translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + err := translator.translateOTelToGroupedMetric(&rm, groupedMetrics, config) + assert.Nil(t, err) assert.NotNil(t, groupedMetrics) assert.Equal(t, 1, len(groupedMetrics)) diff --git a/exporter/awskinesisexporter/go.mod b/exporter/awskinesisexporter/go.mod index 59a6d195b6a8..ee69e92da84f 100644 --- a/exporter/awskinesisexporter/go.mod +++ b/exporter/awskinesisexporter/go.mod @@ -3,11 +3,11 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awskin go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -15,7 +15,7 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/google/uuid v1.3.0 github.com/jaegertracing/jaeger v1.35.1 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 ) @@ -40,7 +40,7 @@ require ( github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/exporter/awskinesisexporter/go.sum b/exporter/awskinesisexporter/go.sum index 90a1be36d052..002c46a7ff4a 100644 --- a/exporter/awskinesisexporter/go.sum +++ b/exporter/awskinesisexporter/go.sum @@ -9,8 +9,8 @@ github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -248,12 +248,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/awskinesisexporter/internal/producer/batcher.go b/exporter/awskinesisexporter/internal/producer/batcher.go index 8995e613ca63..70ae2236e77a 100644 --- a/exporter/awskinesisexporter/internal/producer/batcher.go +++ b/exporter/awskinesisexporter/internal/producer/batcher.go @@ -16,6 +16,7 @@ package producer // import "github.com/open-telemetry/opentelemetry-collector-co import ( "context" + "errors" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" @@ -58,8 +59,9 @@ func (b *batcher) Put(ctx context.Context, bt *batch.Batch) error { }) if err != nil { - if aerr, ok := err.(awserr.Error); ok { - switch aerr.Code() { + var awsErr awserr.Error + if errors.As(err, &awsErr) { + switch awsErr.Code() { case kinesis.ErrCodeResourceNotFoundException, kinesis.ErrCodeInvalidArgumentException: err = consumererror.NewPermanent(err) } diff --git a/exporter/awsprometheusremotewriteexporter/README.md b/exporter/awsprometheusremotewriteexporter/README.md index 95f829c4f837..41d7c02473e5 100644 --- a/exporter/awsprometheusremotewriteexporter/README.md +++ b/exporter/awsprometheusremotewriteexporter/README.md @@ -1,7 +1,7 @@ ## DEPRECATION NOTICE The AWS Prometheus Remote Write Exporter will be removed at some point after `v0.49.0`. Users who want to send metrics to Amazon Managed Service -for Prometheus will need to instead use the [Prometheus Remote Write Exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/prometheusremotewriteexporter/README.md) along with the [Sigv4 Authenticator Extension](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/sigv4authauthextension/README.md) +for Prometheus will need to instead use the [Prometheus Remote Write Exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/prometheusremotewriteexporter/README.md) along with the [Sigv4 Authenticator Extension](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/sigv4authextension/README.md) to achieve the same result. # AWS Prometheus Remote Write Exporter diff --git a/exporter/awsprometheusremotewriteexporter/auth.go b/exporter/awsprometheusremotewriteexporter/auth.go index 846c1576816e..53fa6065c196 100644 --- a/exporter/awsprometheusremotewriteexporter/auth.go +++ b/exporter/awsprometheusremotewriteexporter/auth.go @@ -81,7 +81,7 @@ func (si *signingRoundTripper) RoundTrip(req *http.Request) (*http.Response, err // Sign the request _, err := si.signer.Sign(req2, body, si.service, si.region, time.Now()) if err != nil { - return nil, fmt.Errorf("error signing the request: %v", err) + return nil, fmt.Errorf("error signing the request: %w", err) } // Send the request to Prometheus Remote Write Backend. diff --git a/exporter/awsprometheusremotewriteexporter/factory_test.go b/exporter/awsprometheusremotewriteexporter/factory_test.go index 9c822a4321a3..a7c3e150e712 100644 --- a/exporter/awsprometheusremotewriteexporter/factory_test.go +++ b/exporter/awsprometheusremotewriteexporter/factory_test.go @@ -17,7 +17,6 @@ package awsprometheusremotewriteexporter import ( "context" - "os" "testing" "github.com/stretchr/testify/assert" @@ -51,8 +50,8 @@ func TestCreateMetricsExporter(t *testing.T) { // Some form of AWS credentials chain required to test valid auth case // This is a set of mock credentials strictly for testing purposes. Users // should not set their credentials like this in production. - os.Setenv("AWS_ACCESS_KEY", "mock_value") - os.Setenv("AWS_SECRET_ACCESS_KEY", "mock_value2") + t.Setenv("AWS_ACCESS_KEY", "mock_value") + t.Setenv("AWS_SECRET_ACCESS_KEY", "mock_value2") invalidConfigWithAuth := af.CreateDefaultConfig().(*Config) invalidConfigWithAuth.AuthConfig = AuthConfig{Region: "", Service: "service"} diff --git a/exporter/awsprometheusremotewriteexporter/go.mod b/exporter/awsprometheusremotewriteexporter/go.mod index d8084c341621..063c4b747de9 100644 --- a/exporter/awsprometheusremotewriteexporter/go.mod +++ b/exporter/awsprometheusremotewriteexporter/go.mod @@ -3,10 +3,10 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awspro go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( @@ -34,7 +34,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.53.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/common v0.34.0 // indirect - github.com/prometheus/prometheus v0.36.0 // indirect + github.com/prometheus/prometheus v0.36.1 // indirect github.com/rs/cors v1.8.2 // indirect github.com/tidwall/gjson v1.10.2 // indirect github.com/tidwall/match v1.1.1 // indirect @@ -42,8 +42,8 @@ require ( github.com/tidwall/tinylru v1.1.0 // indirect github.com/tidwall/wal v1.1.7 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/exporter/awsprometheusremotewriteexporter/go.sum b/exporter/awsprometheusremotewriteexporter/go.sum index 6009a232ade7..6534af3d152c 100644 --- a/exporter/awsprometheusremotewriteexporter/go.sum +++ b/exporter/awsprometheusremotewriteexporter/go.sum @@ -41,8 +41,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -293,8 +293,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= -github.com/prometheus/prometheus v0.36.0/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -340,12 +340,12 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/awsxrayexporter/README.md b/exporter/awsxrayexporter/README.md index 321df660c77f..6d3ebf966065 100644 --- a/exporter/awsxrayexporter/README.md +++ b/exporter/awsxrayexporter/README.md @@ -1,5 +1,11 @@ # AWS X-Ray Tracing Exporter for OpenTelemetry Collector +| Status | | +| ------------------------ |------------------| +| Stability | [beta] | +| Supported pipeline types | traces | +| Distributions | [contrib], [AWS] | + This exporter converts OpenTelemetry spans to [AWS X-Ray Segment Documents](https://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html) and then sends them directly to X-Ray using the @@ -66,3 +72,7 @@ This exporter follows default credential resolution for the Follow the [guidelines](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html) for the credential configuration. + +[beta]:https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[AWS]:https://aws-otel.github.io/docs/getting-started/x-ray#configuring-the-aws-x-ray-exporter \ No newline at end of file diff --git a/exporter/awsxrayexporter/awsxray.go b/exporter/awsxrayexporter/awsxray.go index 77bd886c8127..62f7272c2c3f 100644 --- a/exporter/awsxrayexporter/awsxray.go +++ b/exporter/awsxrayexporter/awsxray.go @@ -16,6 +16,7 @@ package awsxrayexporter // import "github.com/open-telemetry/opentelemetry-colle import ( "context" + "errors" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/xray" @@ -67,7 +68,7 @@ func newTracesExporter( output, localErr := xrayClient.PutTraceSegments(&input) if localErr != nil { logger.Debug("response error", zap.Error(localErr)) - err = wrapErrorIfBadRequest(&localErr) // record error + err = wrapErrorIfBadRequest(localErr) // record error } if output != nil { logger.Debug("response: " + output.String()) @@ -106,10 +107,10 @@ func extractResourceSpans(config config.Exporter, logger *zap.Logger, td ptrace. return documents } -func wrapErrorIfBadRequest(err *error) error { - _, ok := (*err).(awserr.RequestFailure) - if ok && (*err).(awserr.RequestFailure).StatusCode() < 500 { - return consumererror.NewPermanent(*err) +func wrapErrorIfBadRequest(err error) error { + var rfErr awserr.RequestFailure + if errors.As(err, &rfErr) && rfErr.StatusCode() < 500 { + return consumererror.NewPermanent(err) } - return *err + return err } diff --git a/exporter/awsxrayexporter/awsxray_test.go b/exporter/awsxrayexporter/awsxray_test.go index 3a67bdc3269d..3a8c2db4d708 100644 --- a/exporter/awsxrayexporter/awsxray_test.go +++ b/exporter/awsxrayexporter/awsxray_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck package awsxrayexporter import ( @@ -20,7 +19,6 @@ import ( "encoding/binary" "fmt" "math/rand" - "os" "testing" "time" @@ -37,7 +35,7 @@ import ( ) func TestTraceExport(t *testing.T) { - traceExporter := initializeTracesExporter() + traceExporter := initializeTracesExporter(t) ctx := context.Background() td := constructSpanData() err := traceExporter.ConsumeTraces(ctx, td) @@ -49,11 +47,11 @@ func TestTraceExport(t *testing.T) { func TestXraySpanTraceResourceExtraction(t *testing.T) { td := constructSpanData() logger, _ := zap.NewProduction() - assert.Len(t, extractResourceSpans(generateConfig(), logger, td), 2, "2 spans have xay trace id") + assert.Len(t, extractResourceSpans(generateConfig(t), logger, td), 2, "2 spans have xay trace id") } func TestXrayAndW3CSpanTraceExport(t *testing.T) { - traceExporter := initializeTracesExporter() + traceExporter := initializeTracesExporter(t) ctx := context.Background() td := constructXrayAndW3CSpanData() err := traceExporter.ConsumeTraces(ctx, td) @@ -65,29 +63,30 @@ func TestXrayAndW3CSpanTraceExport(t *testing.T) { func TestXrayAndW3CSpanTraceResourceExtraction(t *testing.T) { td := constructXrayAndW3CSpanData() logger, _ := zap.NewProduction() - assert.Len(t, extractResourceSpans(generateConfig(), logger, td), 2, "2 spans have xay trace id") + assert.Len(t, extractResourceSpans(generateConfig(t), logger, td), 2, "2 spans have xay trace id") } func TestW3CSpanTraceResourceExtraction(t *testing.T) { t.Skip("Flaky test, see https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/9255") td := constructW3CSpanData() logger, _ := zap.NewProduction() - assert.Len(t, extractResourceSpans(generateConfig(), logger, td), 0, "0 spans have xray trace id") + assert.Len(t, extractResourceSpans(generateConfig(t), logger, td), 0, "0 spans have xray trace id") } func BenchmarkForTracesExporter(b *testing.B) { - traceExporter := initializeTracesExporter() + traceExporter := initializeTracesExporter(b) for i := 0; i < b.N; i++ { b.StopTimer() ctx := context.Background() td := constructSpanData() b.StartTimer() - traceExporter.ConsumeTraces(ctx, td) + err := traceExporter.ConsumeTraces(ctx, td) + assert.Error(b, err) } } -func initializeTracesExporter() component.TracesExporter { - exporterConfig := generateConfig() +func initializeTracesExporter(t testing.TB) component.TracesExporter { + exporterConfig := generateConfig(t) mconn := new(awsutil.Conn) traceExporter, err := newTracesExporter(exporterConfig, componenttest.NewNopExporterCreateSettings(), mconn) if err != nil { @@ -96,11 +95,11 @@ func initializeTracesExporter() component.TracesExporter { return traceExporter } -func generateConfig() config.Exporter { - os.Setenv("AWS_ACCESS_KEY_ID", "AKIASSWVJUY4PZXXXXXX") - os.Setenv("AWS_SECRET_ACCESS_KEY", "XYrudg2H87u+ADAAq19Wqx3D41a09RsTXXXXXXXX") - os.Setenv("AWS_DEFAULT_REGION", "us-east-1") - os.Setenv("AWS_REGION", "us-east-1") +func generateConfig(t testing.TB) config.Exporter { + t.Setenv("AWS_ACCESS_KEY_ID", "AKIASSWVJUY4PZXXXXXX") + t.Setenv("AWS_SECRET_ACCESS_KEY", "XYrudg2H87u+ADAAq19Wqx3D41a09RsTXXXXXXXX") + t.Setenv("AWS_DEFAULT_REGION", "us-east-1") + t.Setenv("AWS_REGION", "us-east-1") factory := NewFactory() exporterConfig := factory.CreateDefaultConfig() exporterConfig.(*Config).Region = "us-east-1" diff --git a/exporter/awsxrayexporter/go.mod b/exporter/awsxrayexporter/go.mod index f1190b930605..63988a4c144b 100644 --- a/exporter/awsxrayexporter/go.mod +++ b/exporter/awsxrayexporter/go.mod @@ -3,13 +3,13 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxra go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/exporter/awsxrayexporter/go.sum b/exporter/awsxrayexporter/go.sum index 4aa7a2c54d16..4aae500292a5 100644 --- a/exporter/awsxrayexporter/go.sum +++ b/exporter/awsxrayexporter/go.sum @@ -5,8 +5,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -195,12 +195,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/awsxrayexporter/internal/translator/cause.go b/exporter/awsxrayexporter/internal/translator/cause.go index 1ae9534493bb..dab820168a51 100644 --- a/exporter/awsxrayexporter/internal/translator/cause.go +++ b/exporter/awsxrayexporter/internal/translator/cause.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck package translator // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/awsxrayexporter/internal/translator" import ( @@ -180,11 +179,14 @@ func parseException(exceptionType string, message string, stacktrace string, lan func fillJavaStacktrace(stacktrace string, exceptions []awsxray.Exception) []awsxray.Exception { r := textproto.NewReader(bufio.NewReader(strings.NewReader(stacktrace))) - // Skip first line containing top level exception / message - r.ReadLine() + // Skip first line containing top level message exception := &exceptions[0] + _, err := r.ReadLine() + if err != nil { + return exceptions + } var line string - line, err := r.ReadLine() + line, err = r.ReadLine() if err != nil { return exceptions } @@ -371,11 +373,14 @@ func fillPythonStacktrace(stacktrace string, exceptions []awsxray.Exception) []a func fillJavaScriptStacktrace(stacktrace string, exceptions []awsxray.Exception) []awsxray.Exception { r := textproto.NewReader(bufio.NewReader(strings.NewReader(stacktrace))) - // Skip first line containing top level exception / message - r.ReadLine() + // Skip first line containing top level message exception := &exceptions[0] + _, err := r.ReadLine() + if err != nil { + return exceptions + } var line string - line, err := r.ReadLine() + line, err = r.ReadLine() if err != nil { return exceptions } @@ -427,11 +432,14 @@ func fillJavaScriptStacktrace(stacktrace string, exceptions []awsxray.Exception) func fillDotnetStacktrace(stacktrace string, exceptions []awsxray.Exception) []awsxray.Exception { r := textproto.NewReader(bufio.NewReader(strings.NewReader(stacktrace))) - // Skip first line containing top level exception / message - r.ReadLine() + // Skip first line containing top level message exception := &exceptions[0] + _, err := r.ReadLine() + if err != nil { + return exceptions + } var line string - line, err := r.ReadLine() + line, err = r.ReadLine() if err != nil { return exceptions } @@ -502,10 +510,13 @@ func fillGoStacktrace(stacktrace string, exceptions []awsxray.Exception) []awsxr r := textproto.NewReader(bufio.NewReader(strings.NewReader(stacktrace))) - // Skip first line containing top level exception / message - _, _ = r.ReadLine() + // Skip first line containing top level message exception := &exceptions[0] - line, err := r.ReadLine() + _, err := r.ReadLine() + if err != nil { + return exceptions + } + line, err = r.ReadLine() if err != nil { return exceptions } diff --git a/exporter/awsxrayexporter/internal/translator/writer_pool_test.go b/exporter/awsxrayexporter/internal/translator/writer_pool_test.go index 0304aa4cd4f5..563dbf6b1763 100644 --- a/exporter/awsxrayexporter/internal/translator/writer_pool_test.go +++ b/exporter/awsxrayexporter/internal/translator/writer_pool_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck package translator import ( @@ -56,7 +55,8 @@ func BenchmarkWithoutPool(b *testing.B) { buffer := bytes.NewBuffer(make([]byte, 0, 2048)) encoder := json.NewEncoder(buffer) segment, _ := MakeSegment(span, pcommon.NewResource(), nil, false) - encoder.Encode(*segment) + err := encoder.Encode(*segment) + assert.NoError(b, err) logger.Info(buffer.String()) } } @@ -70,7 +70,8 @@ func BenchmarkWithPool(b *testing.B) { b.StartTimer() w := wp.borrow() segment, _ := MakeSegment(span, pcommon.NewResource(), nil, false) - w.Encode(*segment) + err := w.Encode(*segment) + assert.Nil(b, err) logger.Info(w.String()) } } diff --git a/exporter/azuremonitorexporter/README.md b/exporter/azuremonitorexporter/README.md index a21b5a90d672..85988c62878b 100644 --- a/exporter/azuremonitorexporter/README.md +++ b/exporter/azuremonitorexporter/README.md @@ -10,7 +10,7 @@ The following settings are required: The following settings can be optionally configured: -- `endpoint` (default = "https://dc.services.visualstudio.com/v2/track"): The endpoint URL where data will be submitted. +- `endpoint` (default = `https://dc.services.visualstudio.com/v2/track`): The endpoint URL where data will be submitted. - `maxbatchsize` (default = 1024): The maximum number of telemetry items that can be submitted in each request. If this many items are buffered, the buffer will be flushed before `maxbatchinterval` expires. - `maxbatchinterval` (default = 10s): The maximum time to wait before sending a batch of telemetry. diff --git a/exporter/azuremonitorexporter/go.mod b/exporter/azuremonitorexporter/go.mod index e2842ce778ad..775b8ab9ecea 100644 --- a/exporter/azuremonitorexporter/go.mod +++ b/exporter/azuremonitorexporter/go.mod @@ -5,9 +5,9 @@ go 1.17 require ( github.com/microsoft/ApplicationInsights-Go v0.4.4 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 golang.org/x/net v0.0.0-20220225172249-27dd8689420f ) diff --git a/exporter/azuremonitorexporter/go.sum b/exporter/azuremonitorexporter/go.sum index a94d7edc449c..d0e101272f5c 100644 --- a/exporter/azuremonitorexporter/go.sum +++ b/exporter/azuremonitorexporter/go.sum @@ -206,12 +206,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/carbonexporter/exporter_test.go b/exporter/carbonexporter/exporter_test.go index 6069eef9c1bb..a0cbe4ce4664 100644 --- a/exporter/carbonexporter/exporter_test.go +++ b/exporter/carbonexporter/exporter_test.go @@ -17,6 +17,7 @@ package carbonexporter import ( "bufio" "context" + "errors" "fmt" "io" "net" @@ -184,11 +185,11 @@ func TestConsumeMetricsData(t *testing.T) { // Actual metric validation is done by other tests, here it // is just flow. _, err := reader.ReadBytes(byte('\n')) - if err != nil && err != io.EOF { + if err != nil && !errors.Is(err, io.EOF) { assert.NoError(t, err) // Just to print any error } - if err == io.EOF { + if errors.Is(err, io.EOF) { break } wg.Done() @@ -250,11 +251,11 @@ func Test_connPool_Concurrency(t *testing.T) { // Actual metric validation is done by other tests, here it // is just flow. _, err := reader.ReadBytes(byte('\n')) - if err != nil && err != io.EOF { + if err != nil && !errors.Is(err, io.EOF) { assert.NoError(t, err) // Just to print any error } - if err == io.EOF { + if errors.Is(err, io.EOF) { break } recvWG.Done() diff --git a/exporter/carbonexporter/go.mod b/exporter/carbonexporter/go.mod index a323319f77fb..65fbd157cffd 100644 --- a/exporter/carbonexporter/go.mod +++ b/exporter/carbonexporter/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 google.golang.org/protobuf v1.28.0 @@ -31,7 +31,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/exporter/carbonexporter/go.sum b/exporter/carbonexporter/go.sum index 988e7a94cc91..34e25fbc2373 100644 --- a/exporter/carbonexporter/go.sum +++ b/exporter/carbonexporter/go.sum @@ -185,12 +185,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/clickhouseexporter/go.mod b/exporter/clickhouseexporter/go.mod index 2ce2e6222889..ce5991d00429 100644 --- a/exporter/clickhouseexporter/go.mod +++ b/exporter/clickhouseexporter/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/clickh go 1.17 require ( - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -13,7 +13,7 @@ require go.uber.org/multierr v1.8.0 require ( github.com/ClickHouse/clickhouse-go v1.5.4 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/exporter/clickhouseexporter/go.sum b/exporter/clickhouseexporter/go.sum index 0a7294008952..d47c4b57901a 100644 --- a/exporter/clickhouseexporter/go.sum +++ b/exporter/clickhouseexporter/go.sum @@ -201,10 +201,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/coralogixexporter/go.mod b/exporter/coralogixexporter/go.mod index 4f7b3a8a96c5..eaebe1d5e43f 100644 --- a/exporter/coralogixexporter/go.mod +++ b/exporter/coralogixexporter/go.mod @@ -4,13 +4,13 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( github.com/coralogix/opentelemetry-cx-protobuf-api/coralogixpb v0.0.0-20211201100428-d2a5d0ecf53e github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.47.0 ) @@ -41,7 +41,7 @@ require ( github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/exporter/coralogixexporter/go.sum b/exporter/coralogixexporter/go.sum index 12329e282f4e..7b6de959c4a7 100644 --- a/exporter/coralogixexporter/go.sum +++ b/exporter/coralogixexporter/go.sum @@ -220,12 +220,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/datadogexporter/config/config.go b/exporter/datadogexporter/config/config.go index e09b268dd6ac..5f659262cadf 100644 --- a/exporter/datadogexporter/config/config.go +++ b/exporter/datadogexporter/config/config.go @@ -26,8 +26,10 @@ import ( "go.opentelemetry.io/collector/config/confignet" "go.opentelemetry.io/collector/confmap" "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/service/featuregate" "go.uber.org/zap" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/valid" ) @@ -439,7 +441,7 @@ type Config struct { // Deprecated: [v0.54.0] Will be unexported in a future minor version. func (c *Config) Sanitize(logger *zap.Logger) error { for _, err := range c.warnings { - logger.Warn(fmt.Sprintf("Deprecated: %v", err)) + logger.Warn(fmt.Sprintf("%v", err)) } return nil @@ -451,7 +453,7 @@ func (c *Config) Validate() error { } if err := valid.Hostname(c.Hostname); c.Hostname != "" && err != nil { - return fmt.Errorf("hostname field is invalid: %s", err) + return fmt.Errorf("hostname field is invalid: %w", err) } if c.API.Key == "" { @@ -531,5 +533,14 @@ func (c *Config) Unmarshal(configMap *confmap.Conf) error { if c.Traces.SampleRate != 0 { c.warnings = append(c.warnings, fmt.Errorf(deprecationTemplate, "traces.sample_rate", "v0.52.0", 9771)) } + + const settingName = "host_metadata::hostname_source" + if !configMap.IsSet(settingName) && !featuregate.GetRegistry().IsEnabled(metadata.HostnamePreviewFeatureGate) { + c.warnings = append(c.warnings, fmt.Errorf( + "%q will change its default value on a future version. Use the %q feature gate to preview this and other hostname changes", + settingName, + metadata.HostnamePreviewFeatureGate, + )) + } return nil } diff --git a/exporter/datadogexporter/config/warning_deprecated_test.go b/exporter/datadogexporter/config/warning_deprecated_test.go index be7411e2f50c..54824fa7045a 100644 --- a/exporter/datadogexporter/config/warning_deprecated_test.go +++ b/exporter/datadogexporter/config/warning_deprecated_test.go @@ -17,11 +17,18 @@ package config // import "github.com/open-telemetry/opentelemetry-collector-cont import ( "testing" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata" + "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/confmap" + "go.opentelemetry.io/collector/service/featuregate" ) func TestDeprecationSendMonotonic(t *testing.T) { + // Override 'exporter.datadog.hostname.preview' feature flag value to remove warning + featuregate.GetRegistry().Apply(map[string]bool{metadata.HostnamePreviewFeatureGate: true}) + defer featuregate.GetRegistry().Apply(map[string]bool{metadata.HostnamePreviewFeatureGate: false}) + tests := []struct { name string cfgMap *confmap.Conf diff --git a/exporter/datadogexporter/example/example_k8s_manifest.yaml b/exporter/datadogexporter/example/example_k8s_manifest.yaml index b4c42c0bdf20..258803116b6e 100644 --- a/exporter/datadogexporter/example/example_k8s_manifest.yaml +++ b/exporter/datadogexporter/example/example_k8s_manifest.yaml @@ -282,7 +282,7 @@ metadata: rules: - apiGroups: [""] resources: ["pods"] - verbs: ["watch", "list"] + verbs: ["get", "watch", "list"] --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding diff --git a/exporter/datadogexporter/factory.go b/exporter/datadogexporter/factory.go index e5825f00b6bb..f04a152f68fd 100644 --- a/exporter/datadogexporter/factory.go +++ b/exporter/datadogexporter/factory.go @@ -29,6 +29,7 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" + "go.opentelemetry.io/collector/service/featuregate" ddconfig "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/config" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata" @@ -47,6 +48,8 @@ type factory struct { onceProvider sync.Once hostProvider provider.HostnameProvider providerErr error + + registry *featuregate.Registry } func (f *factory) HostnameProvider(set component.TelemetrySettings, configHostname string) (provider.HostnameProvider, error) { @@ -56,9 +59,8 @@ func (f *factory) HostnameProvider(set component.TelemetrySettings, configHostna return f.hostProvider, f.providerErr } -// NewFactory creates a Datadog exporter factory -func NewFactory() component.ExporterFactory { - f := &factory{} +func newFactoryWithRegistry(registry *featuregate.Registry) component.ExporterFactory { + f := &factory{registry: registry} return component.NewExporterFactory( typeStr, f.createDefaultConfig, @@ -67,6 +69,11 @@ func NewFactory() component.ExporterFactory { ) } +// NewFactory creates a Datadog exporter factory +func NewFactory() component.ExporterFactory { + return newFactoryWithRegistry(featuregate.GetRegistry()) +} + func defaulttimeoutSettings() exporterhelper.TimeoutSettings { return exporterhelper.TimeoutSettings{ Timeout: 15 * time.Second, @@ -75,7 +82,7 @@ func defaulttimeoutSettings() exporterhelper.TimeoutSettings { // createDefaultConfig creates the default exporter configuration // TODO (#8396): Remove `os.Getenv` everywhere. -func (*factory) createDefaultConfig() config.Exporter { +func (f *factory) createDefaultConfig() config.Exporter { env := os.Getenv("DD_ENV") if env == "" { env = "none" @@ -96,6 +103,11 @@ func (*factory) createDefaultConfig() config.Exporter { tracesEndpoint = fmt.Sprintf("https://trace.agent.%s", site) } + hostnameSource := ddconfig.HostnameSourceFirstResource + if f.registry.IsEnabled(metadata.HostnamePreviewFeatureGate) { + hostnameSource = ddconfig.HostnameSourceConfigOrSystem + } + return &ddconfig.Config{ ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)), TimeoutSettings: defaulttimeoutSettings(), @@ -147,7 +159,7 @@ func (*factory) createDefaultConfig() config.Exporter { HostMetadata: ddconfig.HostMetadataConfig{ Enabled: true, - HostnameSource: ddconfig.HostnameSourceFirstResource, + HostnameSource: hostnameSource, }, SendMetadata: true, @@ -164,7 +176,6 @@ func (f *factory) createMetricsExporter( cfg := c.(*ddconfig.Config) - set.Logger.Info("sanitizing Datadog metrics exporter configuration") if err := cfg.Sanitize(set.Logger); err != nil { return nil, err } @@ -229,7 +240,6 @@ func (f *factory) createTracesExporter( cfg := c.(*ddconfig.Config) - set.Logger.Info("sanitizing Datadog traces exporter configuration") if err := cfg.Sanitize(set.Logger); err != nil { return nil, err } diff --git a/exporter/datadogexporter/factory_test.go b/exporter/datadogexporter/factory_test.go index 4f5532a9f7e2..24663f339591 100644 --- a/exporter/datadogexporter/factory_test.go +++ b/exporter/datadogexporter/factory_test.go @@ -17,7 +17,6 @@ package datadogexporter import ( "context" "encoding/json" - "os" "path/filepath" "testing" @@ -37,26 +36,16 @@ import ( // Test that the factory creates the default configuration func TestCreateDefaultConfig(t *testing.T) { - assert.NoError(t, os.Setenv("DD_API_KEY", "API_KEY")) - assert.NoError(t, os.Setenv("DD_SITE", "SITE")) - assert.NoError(t, os.Setenv("DD_URL", "URL")) - assert.NoError(t, os.Setenv("DD_APM_URL", "APM_URL")) - assert.NoError(t, os.Setenv("DD_HOST", "HOST")) - assert.NoError(t, os.Setenv("DD_ENV", "ENV")) - assert.NoError(t, os.Setenv("DD_SERVICE", "SERVICE")) - assert.NoError(t, os.Setenv("DD_VERSION", "VERSION")) - assert.NoError(t, os.Setenv("DD_TAGS", "TAGS")) - defer func() { - assert.NoError(t, os.Unsetenv("DD_API_KEY")) - assert.NoError(t, os.Unsetenv("DD_SITE")) - assert.NoError(t, os.Unsetenv("DD_URL")) - assert.NoError(t, os.Unsetenv("DD_APM_URL")) - assert.NoError(t, os.Unsetenv("DD_HOST")) - assert.NoError(t, os.Unsetenv("DD_ENV")) - assert.NoError(t, os.Unsetenv("DD_SERVICE")) - assert.NoError(t, os.Unsetenv("DD_VERSION")) - assert.NoError(t, os.Unsetenv("DD_TAGS")) - }() + t.Setenv("DD_API_KEY", "API_KEY") + t.Setenv("DD_SITE", "SITE") + t.Setenv("DD_URL", "URL") + t.Setenv("DD_APM_URL", "APM_URL") + t.Setenv("DD_HOST", "HOST") + t.Setenv("DD_ENV", "ENV") + t.Setenv("DD_SERVICE", "SERVICE") + t.Setenv("DD_VERSION", "VERSION") + t.Setenv("DD_TAGS", "TAGS") + factory := NewFactory() cfg := factory.CreateDefaultConfig() @@ -248,21 +237,12 @@ func TestLoadConfig(t *testing.T) { // TestLoadConfigEnvVariables tests that the loading configuration takes into account // environment variables for default values func TestLoadConfigEnvVariables(t *testing.T) { - assert.NoError(t, os.Setenv("DD_API_KEY", "replacedapikey")) - assert.NoError(t, os.Setenv("DD_HOST", "testhost")) - assert.NoError(t, os.Setenv("DD_SITE", "datadoghq.test")) - assert.NoError(t, os.Setenv("DD_TAGS", "envexample:tag envexample2:tag")) - assert.NoError(t, os.Setenv("DD_URL", "https://api.datadoghq.com")) - assert.NoError(t, os.Setenv("DD_APM_URL", "https://trace.agent.datadoghq.com")) - - defer func() { - assert.NoError(t, os.Unsetenv("DD_API_KEY")) - assert.NoError(t, os.Unsetenv("DD_HOST")) - assert.NoError(t, os.Unsetenv("DD_SITE")) - assert.NoError(t, os.Unsetenv("DD_TAGS")) - assert.NoError(t, os.Unsetenv("DD_URL")) - assert.NoError(t, os.Unsetenv("DD_APM_URL")) - }() + t.Setenv("DD_API_KEY", "replacedapikey") + t.Setenv("DD_HOST", "testhost") + t.Setenv("DD_SITE", "datadoghq.test") + t.Setenv("DD_TAGS", "envexample:tag envexample2:tag") + t.Setenv("DD_URL", "https://api.datadoghq.com") + t.Setenv("DD_APM_URL", "https://trace.agent.datadoghq.com") factories, err := componenttest.NopFactories() assert.NoError(t, err) diff --git a/exporter/datadogexporter/go.mod b/exporter/datadogexporter/go.mod index 3f284803b640..7a320d059a10 100644 --- a/exporter/datadogexporter/go.mod +++ b/exporter/datadogexporter/go.mod @@ -7,22 +7,25 @@ require ( github.com/DataDog/datadog-agent/pkg/quantile v0.36.0-rc.4.0.20220426134022-b55bccd5073f github.com/DataDog/datadog-agent/pkg/trace/exportable v0.0.0-20201016145401-4646cf596b02 github.com/DataDog/sketches-go v1.4.1 - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.31.0 - github.com/aws/aws-sdk-go v1.44.28 + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.2 + github.com/aws/aws-sdk-go v1.44.33 github.com/cenkalti/backoff/v4 v4.1.3 github.com/gogo/protobuf v1.3.2 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.53.0 github.com/patrickmn/go-cache v2.1.0+incompatible github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 gopkg.in/DataDog/dd-trace-go.v1 v1.38.1 gopkg.in/zorkian/go-datadog-api.v2 v2.30.0 + k8s.io/apimachinery v0.24.1 + k8s.io/client-go v0.24.1 ) require ( @@ -31,6 +34,8 @@ require ( github.com/DataDog/datadog-agent/pkg/util/log v0.0.0-20201009092105-58e18918b2db // indirect github.com/DataDog/datadog-go v4.8.2+incompatible // indirect github.com/Microsoft/go-winio v0.5.2 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/cenkalti/backoff v2.2.1+incompatible // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect @@ -38,28 +43,42 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect + github.com/emicklei/go-restful v2.9.5+incompatible // indirect + github.com/go-logr/logr v1.2.3 // indirect github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.5 // indirect + github.com/go-openapi/swag v0.19.14 // indirect github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect github.com/golang/protobuf v1.5.2 // indirect + github.com/google/gnostic v0.5.7-v3refs // indirect + github.com/google/gofuzz v1.2.0 // indirect + github.com/imdario/mergo v0.3.11 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf v1.4.1 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/openshift/api v0.0.0-20210521075222-e273a339932a // indirect + github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect github.com/philhofer/fwd v1.1.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/shirou/gopsutil v2.20.9+incompatible // indirect github.com/sirupsen/logrus v1.8.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.2.0 // indirect github.com/tinylib/msgp v1.1.2 // indirect github.com/zorkian/go-datadog-api v2.30.0+incompatible // indirect @@ -69,17 +88,31 @@ require ( go.opentelemetry.io/otel/trace v1.7.0 // indirect go.uber.org/atomic v1.9.0 // indirect golang.org/x/net v0.0.0-20220412020605-290c469a71a5 // indirect + golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 // indirect + golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect + google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3 // indirect google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect + gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/api v0.24.1 // indirect + k8s.io/klog/v2 v2.60.1 // indirect + k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 // indirect + k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect + sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect + sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect ) replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig => ../../internal/k8sconfig + replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders => ../../internal/metadataproviders replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry => ../../pkg/resourcetotelemetry diff --git a/exporter/datadogexporter/go.sum b/exporter/datadogexporter/go.sum index 46b74e004938..50e1f86c8fd9 100644 --- a/exporter/datadogexporter/go.sum +++ b/exporter/datadogexporter/go.sum @@ -54,13 +54,23 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= +github.com/Azure/go-autorest/autorest v0.11.12/go.mod h1:eipySxLmqSyC5s5k1CLupqet0PSENBEDP93LQ9a8QYw= +github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/DataDog/agent-payload/v5 v5.0.22 h1:XaMYtdvdjRWLwvoQhZM3Se0YmOeMYgEvdKVLwPsxEaU= @@ -84,8 +94,8 @@ github.com/DataDog/sketches-go v1.0.0/go.mod h1:O+XkJHWk9w4hDwY2ZUDU31ZC9sNYlYo8 github.com/DataDog/sketches-go v1.4.1 h1:j5G6as+9FASM2qC36lvpvQAj9qsv/jUs3FtO8CwZNAY= github.com/DataDog/sketches-go v1.4.1/go.mod h1:xJIXldczJyyjnbDop7ZZcLxJdV3+7Kra7H1KMgpgkLk= github.com/DataDog/zstd v1.3.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.31.0 h1:EnFLvwFv8onlnjYFSrQ4EMSm6uWRBZHOItR/Tz0Jnqk= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.31.0/go.mod h1:s7Gpwj0tk7XnVCm4BQEmx/mbS36SuTCY/vMB2SNxe8o= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.2 h1:aMWts6QP6yqlluU7KXl6j1zdPLW/PNNKHwm9804M5t4= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.2/go.mod h1:s7Gpwj0tk7XnVCm4BQEmx/mbS36SuTCY/vMB2SNxe8o= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= @@ -94,7 +104,11 @@ github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.22.0/go.mod h1:lm3THZ8reqBDBQKQyb5HB3sY1lKp3grEbQ81aWSgPp4= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= @@ -106,10 +120,12 @@ github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hC github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-metrics v0.3.0/go.mod h1:zXjbSimjXTd7vOpY8B0/2LpvNvDoXBuplAD+gJD3GYs= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM= 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/config v1.0.0/go.mod h1:WysE/OpUgE37tjtmtJd8GXgT8s1euilE5XtUkRNUQ1w= @@ -183,13 +199,14 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= @@ -198,7 +215,10 @@ github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFP github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI= github.com/elastic/go-elasticsearch/v7 v7.17.1/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible h1:spTtZBk5DYEvbxMVutUuTyh1Ao2r4iyvLdACqsl/Ljk= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -211,15 +231,20 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= +github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/garyburd/redigo v1.6.3/go.mod h1:rTb6epsqigu3kYKBnaF028A7Tf/Aw5s0cqA47doKKqw= +github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -236,6 +261,9 @@ github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp github.com/go-ldap/ldap/v3 v3.1.3/go.mod h1:3rbOH3jRS2u6jg2rJnKAMLE/xQyCKIveG2Sa/Cohzb8= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= +github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -246,9 +274,23 @@ github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiU github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.14 h1:gm3vOOXfiuw5i9p5N9xJvfjvuofpyvLA9Wr6QfK5Fng= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-pg/pg/v10 v10.0.0/go.mod h1:XHU1AkQW534GFuUdSiQ46+Xw6Ah+9+b8DlT4YwhiXL8= github.com/go-pg/zerochecker v0.2.0/go.mod h1:NJZ4wKL0NmTtz0GKCoJ8kym6Xn/EQzXRl2OnAe7MmDo= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -305,6 +347,7 @@ github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4er github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= @@ -340,6 +383,9 @@ github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/gomodule/redigo v1.7.0/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= +github.com/google/gnostic v0.5.7-v3refs h1:FhTMOKj2VhjpouxvWJAV1TL304uMlb9zcDqkl6cEI54= +github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -356,6 +402,7 @@ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8 github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= @@ -388,9 +435,12 @@ github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0 github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/mux v1.5.0/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/graph-gophers/graphql-go v1.3.0/go.mod h1:9CQHMSxwO4MprSdzoIEobiHpoLtHm77vfxsvsIN5Vuc= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= @@ -450,6 +500,8 @@ github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpO github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= @@ -518,10 +570,13 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= @@ -541,9 +596,11 @@ github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO4 github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -560,6 +617,11 @@ github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= @@ -605,6 +667,7 @@ github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= @@ -617,19 +680,24 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/ginkgo v1.14.1/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -637,11 +705,17 @@ github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1Cpa github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.2/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c= github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/openshift/api v0.0.0-20210521075222-e273a339932a h1:aBPwLqCg66SbQd+HrjB1GhgTfPtqSY4aeB022tEYmE0= +github.com/openshift/api v0.0.0-20210521075222-e273a339932a/go.mod h1:izBmoXbUu3z5kUa4FjZhvekTsyzIWiOoaIgJiZBBMQs= +github.com/openshift/build-machinery-go v0.0.0-20210423112049-9415d7ebd33e/go.mod h1:b1BuldmJlbA/xYtdZvKi+7j5YGB44qJUJDZ9zwiNCfE= +github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 h1:ZHRIMCFIJN1p9LsJt4HQ+akDrys4PrYnXzOWI5LK03I= +github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142/go.mod h1:fjS8r9mqDVsPb5td3NehsNOAWa4uiFkYEfVZioQ2gH0= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -706,6 +780,7 @@ github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzu github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= @@ -784,12 +859,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v0.11.0/go.mod h1:G8UCk+KooF2HLkgo8RHX9epABH/aRGYET7gQOqBVdB0= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= @@ -833,6 +908,7 @@ golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaE golang.org/x/crypto v0.0.0-20190506204251-e1dfcc566284/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= @@ -841,11 +917,14 @@ golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -897,10 +976,12 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -925,6 +1006,7 @@ golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= @@ -932,6 +1014,7 @@ golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211020060615-d418f374d309/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -955,6 +1038,7 @@ golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -987,6 +1071,7 @@ golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1029,6 +1114,7 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1057,6 +1143,8 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAgl golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1076,7 +1164,9 @@ golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxb golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220411224347-583f2d630306 h1:+gHMid33q6pen7kv9xvT+JRinntgeXO2AeZVd0AWD3w= golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1096,6 +1186,7 @@ golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1125,6 +1216,7 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200527183253-8e7acdbce89d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -1232,6 +1324,7 @@ google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1333,12 +1426,14 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= +gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/jinzhu/gorm.v1 v1.9.1/go.mod h1:56JJPUzbikvTVnoyP1nppSkbJ2L8sunqTBDY2fDrmFg= gopkg.in/olivere/elastic.v3 v3.0.75/go.mod h1:yDEuSnrM51Pc8dM5ov7U8aI/ToR3PG0llA8aRv2qmw0= gopkg.in/olivere/elastic.v5 v5.0.84/go.mod h1:LXF6q9XNBxpMqrcgax95C6xyARXWbbCXUrtTxrNrxJI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= @@ -1349,6 +1444,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= @@ -1369,17 +1465,50 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.17.0/go.mod h1:npsyOePkeP0CPwyGfXDHxvypiYMJxBWAMpQxCaJ4ZxI= +k8s.io/api v0.21.1/go.mod h1:FstGROTmsSHBarKc8bylzXih8BLNYTiS3TZcsoEDg2s= +k8s.io/api v0.24.1 h1:BjCMRDcyEYz03joa3K1+rbshwh1Ay6oB53+iUx2H8UY= +k8s.io/api v0.24.1/go.mod h1:JhoOvNiLXKTPQ60zh2g0ewpA+bnEYf5q44Flhquh4vQ= k8s.io/apimachinery v0.17.0/go.mod h1:b9qmWdKlLuU9EBh+06BtLcSf/Mu89rWL33naRxs1uZg= +k8s.io/apimachinery v0.21.1/go.mod h1:jbreFvJo3ov9rj7eWT7+sYiRx+qZuCYXwWT1bcDswPY= +k8s.io/apimachinery v0.24.1 h1:ShD4aDxTQKN5zNf8K1RQ2u98ELLdIW7jEnlO9uAMX/I= +k8s.io/apimachinery v0.24.1/go.mod h1:82Bi4sCzVBdpYjyI4jY6aHX+YCUchUIrZrXKedjd2UM= k8s.io/client-go v0.17.0/go.mod h1:TYgR6EUHs6k45hb6KWjVD6jFZvJV4gHDikv/It0xz+k= +k8s.io/client-go v0.21.1/go.mod h1:/kEw4RgW+3xnBGzvp9IWxKSNA+lXn3A7AuH3gdOAzLs= +k8s.io/client-go v0.24.1 h1:w1hNdI9PFrzu3OlovVeTnf4oHDt+FJLd9Ndluvnb42E= +k8s.io/client-go v0.24.1/go.mod h1:f1kIDqcEYmwXS/vTbbhopMUbhKp2JhOeVTfxgaCIlF8= +k8s.io/code-generator v0.21.1/go.mod h1:hUlps5+9QaTrKx+jiM4rmq7YmH8wPOIko64uZCHDh6Q= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/gengo v0.0.0-20201214224949-b6c5ce23f027/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= +k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/klog/v2 v2.8.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= +k8s.io/klog/v2 v2.60.1 h1:VW25q3bZx9uE3vvdL6M8ezOX79vA2Aq1nEWLqNQclHc= +k8s.io/klog/v2 v2.60.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= +k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7/go.mod h1:wXW5VT87nVfh/iLV8FpR2uDvrFyomxbtb1KivDbvPTE= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42 h1:Gii5eqf+GmIEwGNKQYQClCayuJCe2/4fZUvF7VG99sU= +k8s.io/kube-openapi v0.0.0-20220328201542-3ee0da9b0b42/go.mod h1:Z/45zLw8lUo4wdiUkI+v/ImEGAvu3WatcZl3lPMR4Rk= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc= +k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= mellium.im/sasl v0.2.1/go.mod h1:ROaEDLQNuf9vjKqE1SrAfnsobm2YKXT1gnN1uDp1PjQ= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 h1:kDi4JBNAsJWfz1aEXhO8Jg87JJaPNLh5tIzYHgStQ9Y= +sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2/go.mod h1:B+TnT182UBxE84DiCz4CVE26eOSDAeYCpfDnC2kdKMY= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.1.0/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1 h1:bKCqE9GvQ5tiVHn5rfn1r+yao3aLQEaLzkkmAkf+A6Y= +sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/exporter/datadogexporter/internal/metadata/host.go b/exporter/datadogexporter/internal/metadata/host.go index 5edfea37e14e..70f9131a41c3 100644 --- a/exporter/datadogexporter/internal/metadata/host.go +++ b/exporter/datadogexporter/internal/metadata/host.go @@ -16,22 +16,37 @@ package metadata // import "github.com/open-telemetry/opentelemetry-collector-co import ( "context" + "fmt" + "sync" "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/service/featuregate" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/internal/azure" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/internal/docker" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/internal/ec2" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/internal/gcp" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/internal/k8s" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/internal/system" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/provider" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/valid" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/utils/cache" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/docker" ) -// UsePreviewHostnameLogic decides whether to use the preview hostname logic or not. -const UsePreviewHostnameLogic = false +const ( + HostnamePreviewFeatureGate = "exporter.datadog.hostname.preview" + defaultHostnameChangeLogMessage = "The default hostname on this host will change on a future minor version. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/10424" + previewHostnameFailedLogMessage = "failed to get preview hostname. Please report this to Datadog." +) + +func init() { + featuregate.GetRegistry().MustRegister(featuregate.Gate{ + ID: HostnamePreviewFeatureGate, + Description: "When enabled, the Datadog exporter uses the 'preview' hostname resolution rules, which are consistent with Datadog cloud integration hostname resolution rules, and sets 'host_metadata::hostname_source: config_or_system' by default.", + Enabled: false, + }) +} func buildPreviewProvider(set component.TelemetrySettings, configHostname string) (provider.HostnameProvider, error) { dockerProvider, err := docker.NewProvider() @@ -39,17 +54,42 @@ func buildPreviewProvider(set component.TelemetrySettings, configHostname string return nil, err } + azureProvider := azure.NewProvider() + ec2Provider, err := ec2.NewProvider(set.Logger) + if err != nil { + return nil, fmt.Errorf("failed to build EC2 provider: %w", err) + } + gcpProvider := gcp.NewProvider() + + clusterNameProvider, err := provider.ChainCluster(set.Logger, + map[string]provider.ClusterNameProvider{ + "azure": azureProvider, + "ec2": ec2Provider, + "gcp": gcpProvider, + }, + []string{"azure", "ec2", "gcp"}, + ) + if err != nil { + return nil, fmt.Errorf("failed to build Kubernetes cluster name provider: %w", err) + } + + k8sProvider, err := k8s.NewProvider(set.Logger, clusterNameProvider) + if err != nil { + return nil, fmt.Errorf("failed to build Kubernetes hostname provider: %w", err) + } + chain, err := provider.Chain( set.Logger, map[string]provider.HostnameProvider{ - "config": provider.Config(configHostname), - "docker": dockerProvider, - "azure": azure.NewProvider(), - "ec2": ec2.NewProvider(set.Logger), - "gcp": gcp.NewProvider(), - "system": system.NewProvider(set.Logger), + "config": provider.Config(configHostname), + "azure": azureProvider, + "ec2": ec2Provider, + "gcp": gcpProvider, + "kubernetes": k8sProvider, + "docker": dockerProvider, + "system": system.NewProvider(set.Logger), }, - []string{"config", "docker", "azure", "ec2", "gcp", "system"}, + []string{"config", "azure", "ec2", "gcp", "kubernetes", "docker", "system"}, ) if err != nil { @@ -60,20 +100,37 @@ func buildPreviewProvider(set component.TelemetrySettings, configHostname string } func buildCurrentProvider(set component.TelemetrySettings, configHostname string) (provider.HostnameProvider, error) { + ec2Provider, err := ec2.NewProvider(set.Logger) + if err != nil { + return nil, fmt.Errorf("failed to build EC2 provider: %w", err) + } + return ¤tProvider{ logger: set.Logger, configHostname: configHostname, systemProvider: system.NewProvider(set.Logger), - ec2Provider: ec2.NewProvider(set.Logger), + ec2Provider: ec2Provider, }, nil } func GetHostnameProvider(set component.TelemetrySettings, configHostname string) (provider.HostnameProvider, error) { - if UsePreviewHostnameLogic { - return buildPreviewProvider(set, configHostname) + previewProvider, err := buildPreviewProvider(set, configHostname) + if err != nil { + return nil, err + } else if featuregate.GetRegistry().IsEnabled(HostnamePreviewFeatureGate) { + return previewProvider, err + } + + currentProvider, err := buildCurrentProvider(set, configHostname) + if err != nil { + return nil, err } - return buildCurrentProvider(set, configHostname) + return &warnProvider{ + logger: set.Logger, + curProvider: currentProvider, + previewProvider: previewProvider, + }, nil } var _ provider.HostnameProvider = (*currentProvider)(nil) @@ -121,3 +178,37 @@ func (c *currentProvider) Hostname(ctx context.Context) (string, error) { cache.Cache.Set(cache.CanonicalHostnameKey, hostname, cache.NoExpiration) return hostname, nil } + +var _ provider.HostnameProvider = (*warnProvider)(nil) + +type warnProvider struct { + onceDefaultChanged sync.Once + oncePreviewHostnameFailed sync.Once + + logger *zap.Logger + curProvider provider.HostnameProvider + previewProvider provider.HostnameProvider +} + +func (p *warnProvider) Hostname(ctx context.Context) (string, error) { + curHostname, err := p.curProvider.Hostname(ctx) + if err != nil { + return "", err + } + + previewHostname, err := p.previewProvider.Hostname(ctx) + if err != nil { + p.oncePreviewHostnameFailed.Do(func() { + p.logger.Warn(previewHostnameFailedLogMessage, zap.Error(err)) + }) + } else if curHostname != previewHostname { + p.onceDefaultChanged.Do(func() { + p.logger.Warn(defaultHostnameChangeLogMessage, + zap.String("current default hostname", curHostname), + zap.String("future default hostname", previewHostname), + ) + }) + } + + return curHostname, nil +} diff --git a/exporter/datadogexporter/internal/metadata/host_test.go b/exporter/datadogexporter/internal/metadata/host_test.go index 9b66be28de1e..94decbd0a10b 100644 --- a/exporter/datadogexporter/internal/metadata/host_test.go +++ b/exporter/datadogexporter/internal/metadata/host_test.go @@ -16,13 +16,18 @@ package metadata import ( "context" + "errors" "os" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + "go.uber.org/zap/zaptest/observer" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/provider" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/utils/cache" ) @@ -46,11 +51,7 @@ func TestHost(t *testing.T) { // Disable EC2 Metadata service to prevent fetching hostname from there, // in case the test is running on an EC2 instance - const awsEc2MetadataDisabled = "AWS_EC2_METADATA_DISABLED" - curr := os.Getenv(awsEc2MetadataDisabled) - err = os.Setenv(awsEc2MetadataDisabled, "true") - require.NoError(t, err) - defer os.Setenv(awsEc2MetadataDisabled, curr) + t.Setenv("AWS_EC2_METADATA_DISABLED", "true") p, err = buildCurrentProvider(componenttest.NewNopTelemetrySettings(), "") require.NoError(t, err) @@ -60,3 +61,105 @@ func TestHost(t *testing.T) { require.NoError(t, err) assert.Contains(t, host, osHostname) } + +var _ provider.HostnameProvider = (*ErrorHostnameProvider)(nil) + +type ErrorHostnameProvider string + +func (p ErrorHostnameProvider) Hostname(context.Context) (string, error) { + return "", errors.New(string(p)) +} + +func TestWarnProvider(t *testing.T) { + tests := []struct { + name string + curProvider provider.HostnameProvider + previewProvider provider.HostnameProvider + + expectedLogs []observer.LoggedEntry + hostname string + err string + }{ + { + name: "current provider fails", + curProvider: ErrorHostnameProvider("errorCurrentHostname"), + previewProvider: provider.Config("previewHostname"), + err: "errorCurrentHostname", + }, + { + name: "preview provider fails", + curProvider: provider.Config("currentHostname"), + previewProvider: ErrorHostnameProvider("errorPreviewHostname"), + hostname: "currentHostname", + expectedLogs: []observer.LoggedEntry{ + { + Entry: zapcore.Entry{ + Level: zap.WarnLevel, + Message: previewHostnameFailedLogMessage, + }, + Context: []zapcore.Field{ + { + Key: "error", + Type: zapcore.ErrorType, + Interface: errors.New("errorPreviewHostname"), + }, + }, + }, + }, + }, + { + name: "preview provider and current provider match", + curProvider: provider.Config("hostname"), + previewProvider: provider.Config("hostname"), + hostname: "hostname", + }, + { + name: "preview provider and current provider don't match", + curProvider: provider.Config("currentHostname"), + previewProvider: provider.Config("previewHostname"), + hostname: "currentHostname", + expectedLogs: []observer.LoggedEntry{ + { + Entry: zapcore.Entry{ + Level: zap.WarnLevel, + Message: defaultHostnameChangeLogMessage, + }, + Context: []zapcore.Field{ + { + Key: "current default hostname", + Type: zapcore.StringType, + String: "currentHostname", + }, + { + Key: "future default hostname", + Type: zapcore.StringType, + String: "previewHostname", + }, + }, + }, + }, + }, + } + + for _, testInstance := range tests { + t.Run(testInstance.name, func(t *testing.T) { + core, observed := observer.New(zapcore.DebugLevel) + provider := &warnProvider{ + logger: zap.New(core), + curProvider: testInstance.curProvider, + previewProvider: testInstance.previewProvider, + } + + hostname, err := provider.Hostname(context.Background()) + if err != nil || testInstance.err != "" { + assert.EqualError(t, err, testInstance.err) + } else { + assert.Equal(t, testInstance.hostname, hostname) + } + assert.ElementsMatch(t, + testInstance.expectedLogs, + observed.AllUntimed(), + ) + }) + } +} diff --git a/exporter/datadogexporter/internal/metadata/internal/azure/provider.go b/exporter/datadogexporter/internal/metadata/internal/azure/provider.go index 26da6b56a973..9389d5289f4e 100644 --- a/exporter/datadogexporter/internal/metadata/internal/azure/provider.go +++ b/exporter/datadogexporter/internal/metadata/internal/azure/provider.go @@ -16,6 +16,8 @@ package azure // import "github.com/open-telemetry/opentelemetry-collector-contr import ( "context" + "fmt" + "strings" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/provider" @@ -23,6 +25,7 @@ import ( ) var _ provider.HostnameProvider = (*Provider)(nil) +var _ provider.ClusterNameProvider = (*Provider)(nil) type Provider struct { detector azure.Provider @@ -38,6 +41,23 @@ func (p *Provider) Hostname(ctx context.Context) (string, error) { return metadata.VMID, nil } +// ClusterName gets the AKS cluster name from the resource group name. +func (p *Provider) ClusterName(ctx context.Context) (string, error) { + metadata, err := p.detector.Metadata(ctx) + if err != nil { + return "", err + } + + // Code comes from https://github.com/DataDog/datadog-agent/blob/1b4afdd6a/pkg/util/cloudproviders/azure/azure.go#L72 + // It expects the resource group name to have the format (MC|mc)_resource-group_cluster-name_zone. + splitAll := strings.Split(metadata.ResourceGroupName, "_") + if len(splitAll) < 4 || strings.ToLower(splitAll[0]) != "mc" { + return "", fmt.Errorf("cannot parse the clustername from resource group name: %s", metadata.ResourceGroupName) + } + + return splitAll[len(splitAll)-2], nil +} + // NewProvider creates a new Azure hostname provider. func NewProvider() *Provider { return &Provider{detector: azure.NewProvider()} diff --git a/exporter/datadogexporter/internal/metadata/internal/azure/provider_test.go b/exporter/datadogexporter/internal/metadata/internal/azure/provider_test.go index 01ead7ab09b4..48b99e212ae5 100644 --- a/exporter/datadogexporter/internal/metadata/internal/azure/provider_test.go +++ b/exporter/datadogexporter/internal/metadata/internal/azure/provider_test.go @@ -32,7 +32,7 @@ func TestProvider(t *testing.T) { VMID: "vmID", VMSize: "vmSize", SubscriptionID: "subscriptionID", - ResourceGroupName: "resourceGroup", + ResourceGroupName: "MC_aks-kenafeh_aks-kenafeh-eu_westeurope", VMScaleSetName: "myScaleset", }, nil) @@ -40,4 +40,8 @@ func TestProvider(t *testing.T) { hostname, err := provider.Hostname(context.Background()) require.NoError(t, err) assert.Equal(t, "vmID", hostname) + + clusterName, err := provider.ClusterName(context.Background()) + require.NoError(t, err) + assert.Equal(t, "aks-kenafeh-eu", clusterName) } diff --git a/exporter/datadogexporter/internal/metadata/internal/ec2/ec2.go b/exporter/datadogexporter/internal/metadata/internal/ec2/ec2.go index 3f8d446b0264..18a2f91e78c9 100644 --- a/exporter/datadogexporter/internal/metadata/internal/ec2/ec2.go +++ b/exporter/datadogexporter/internal/metadata/internal/ec2/ec2.go @@ -20,9 +20,12 @@ import ( "sync" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/provider" + ec2provider "github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders/aws/ec2" + "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/session" + "github.com/aws/aws-sdk-go/service/ec2" "go.uber.org/zap" ) @@ -88,16 +91,25 @@ func (hi *HostInfo) GetHostname(logger *zap.Logger) string { } var _ provider.HostnameProvider = (*Provider)(nil) +var _ provider.ClusterNameProvider = (*Provider)(nil) type Provider struct { once sync.Once hostInfo HostInfo - logger *zap.Logger + detector ec2provider.Provider + logger *zap.Logger } -func NewProvider(logger *zap.Logger) *Provider { - return &Provider{logger: logger} +func NewProvider(logger *zap.Logger) (*Provider, error) { + sess, err := session.NewSession() + if err != nil { + return nil, err + } + return &Provider{ + logger: logger, + detector: ec2provider.NewProvider(sess), + }, nil } func (p *Provider) fillHostInfo() { @@ -113,6 +125,63 @@ func (p *Provider) Hostname(ctx context.Context) (string, error) { return p.hostInfo.InstanceID, nil } +// instanceTags gets the EC2 tags for the current instance. +func (p *Provider) instanceTags(ctx context.Context) (*ec2.DescribeTagsOutput, error) { + // Get EC2 metadata to find the region and instance ID + meta, err := p.detector.Get(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get metadata: %w", err) + } + + // Get the EC2 tags for the instance id. + // Similar to: + // - https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/39dbc1ac8/processor/resourcedetectionprocessor/internal/aws/ec2/ec2.go#L118-L151 + // - https://github.com/DataDog/datadog-agent/blob/1b4afdd6a03e8fabcc169b924931b2bb8935dab9/pkg/util/ec2/ec2_tags.go#L104-L134 + sess, err := session.NewSession(&aws.Config{ + Region: aws.String(meta.Region), + }) + if err != nil { + return nil, fmt.Errorf("failed to build AWS session: %w", err) + } + + svc := ec2.New(sess) + return svc.DescribeTagsWithContext(ctx, + &ec2.DescribeTagsInput{ + Filters: []*ec2.Filter{{ + Name: aws.String("resource-id"), + Values: []*string{ + aws.String(meta.InstanceID), + }, + }}, + }) +} + +// clusterNameFromTags gets the AWS EC2 Cluster name from the tags on an EC2 instance. +func clusterNameFromTags(ec2Tags *ec2.DescribeTagsOutput) (string, error) { + // Similar to: + // - https://github.com/DataDog/datadog-agent/blob/1b4afdd6a03/pkg/util/ec2/ec2.go#L256-L271 + const clusterNameTagPrefix = "kubernetes.io/cluster/" + for _, tag := range ec2Tags.Tags { + if strings.HasPrefix(*tag.Key, clusterNameTagPrefix) { + if len(*tag.Key) == len(clusterNameTagPrefix) { + return "", fmt.Errorf("missing cluster name in %q tag", *tag.Key) + } + return strings.Split(*tag.Key, "/")[2], nil + } + } + + return "", fmt.Errorf("no tag found with prefix %q", clusterNameTagPrefix) +} + +// ClusterName gets the cluster name from an AWS EC2 machine. +func (p *Provider) ClusterName(ctx context.Context) (string, error) { + ec2Tags, err := p.instanceTags(ctx) + if err != nil { + return "", fmt.Errorf("failed to get EC2 instance tags: %w", err) + } + return clusterNameFromTags(ec2Tags) +} + func (p *Provider) HostInfo() *HostInfo { p.fillHostInfo() return &p.hostInfo diff --git a/exporter/datadogexporter/internal/metadata/internal/ec2/ec2_test.go b/exporter/datadogexporter/internal/metadata/internal/ec2/ec2_test.go index 3f9f7c5add90..29d333173c61 100644 --- a/exporter/datadogexporter/internal/metadata/internal/ec2/ec2_test.go +++ b/exporter/datadogexporter/internal/metadata/internal/ec2/ec2_test.go @@ -16,6 +16,7 @@ package ec2 import ( "testing" + "github.com/aws/aws-sdk-go/service/ec2" "github.com/stretchr/testify/assert" "go.uber.org/zap" ) @@ -50,3 +51,60 @@ func TestGetHostname(t *testing.T) { } assert.Equal(t, customHost, hostInfo.GetHostname(logger)) } + +func strp(s string) *string { + return &s +} + +func TestClusterNameFromEC2Tags(t *testing.T) { + tests := []struct { + name string + ec2Tags *ec2.DescribeTagsOutput + clusterName string + err string + }{ + { + name: "missing cluster name tag", + ec2Tags: &ec2.DescribeTagsOutput{ + NextToken: strp("NextToken"), + Tags: []*ec2.TagDescription{ + {Key: strp("some key"), Value: strp("some value")}, + }, + }, + err: "no tag found with prefix \"kubernetes.io/cluster/\"", + }, + { + name: "cluster name tag only has the prefix", + ec2Tags: &ec2.DescribeTagsOutput{ + NextToken: strp("NextToken"), + Tags: []*ec2.TagDescription{ + {Key: strp("some key"), Value: strp("some value")}, + {Key: strp("kubernetes.io/cluster/"), Value: strp("some value")}, + }, + }, + err: "missing cluster name in \"kubernetes.io/cluster/\" tag", + }, + { + name: "cluster name is available", + ec2Tags: &ec2.DescribeTagsOutput{ + NextToken: strp("NextToken"), + Tags: []*ec2.TagDescription{ + {Key: strp("some key"), Value: strp("some value")}, + {Key: strp("kubernetes.io/cluster/myclustername"), Value: strp("some value")}, + }, + }, + clusterName: "myclustername", + }, + } + + for _, testInstance := range tests { + t.Run(testInstance.name, func(t *testing.T) { + clusterName, err := clusterNameFromTags(testInstance.ec2Tags) + if err != nil || testInstance.err != "" { + assert.EqualError(t, err, testInstance.err) + } else { + assert.Equal(t, testInstance.clusterName, clusterName) + } + }) + } +} diff --git a/exporter/datadogexporter/internal/metadata/internal/gcp/provider.go b/exporter/datadogexporter/internal/metadata/internal/gcp/provider.go index f4f5a9f2a250..99cc67e74ba9 100644 --- a/exporter/datadogexporter/internal/metadata/internal/gcp/provider.go +++ b/exporter/datadogexporter/internal/metadata/internal/gcp/provider.go @@ -25,6 +25,7 @@ import ( ) var _ provider.HostnameProvider = (*Provider)(nil) +var _ provider.ClusterNameProvider = (*Provider)(nil) var _ gcpDetector = gcp.NewDetector() @@ -32,6 +33,7 @@ type gcpDetector interface { ProjectID() (string, error) CloudPlatform() gcp.Platform GCEHostName() (string, error) + GKEClusterName() (string, error) } type Provider struct { @@ -62,6 +64,10 @@ func (p *Provider) Hostname(context.Context) (string, error) { return fmt.Sprintf("%s.%s", name, cloudAccount), nil } +func (p *Provider) ClusterName(ctx context.Context) (string, error) { + return p.detector.GKEClusterName() +} + // NewProvider creates a new GCP hostname provider. func NewProvider() *Provider { return &Provider{detector: gcp.NewDetector()} diff --git a/exporter/datadogexporter/internal/metadata/internal/gcp/provider_test.go b/exporter/datadogexporter/internal/metadata/internal/gcp/provider_test.go index 846b3dbe75d7..b7b5f6282ae4 100644 --- a/exporter/datadogexporter/internal/metadata/internal/gcp/provider_test.go +++ b/exporter/datadogexporter/internal/metadata/internal/gcp/provider_test.go @@ -55,6 +55,10 @@ func (m *mockDetector) GCEHostName() (string, error) { return m.instanceName, nil } +func (m *mockDetector) GKEClusterName() (string, error) { + return "", fmt.Errorf("not available") +} + func TestProvider(t *testing.T) { tests := []struct { name string diff --git a/exporter/datadogexporter/internal/metadata/internal/k8s/nodename.go b/exporter/datadogexporter/internal/metadata/internal/k8s/nodename.go new file mode 100644 index 000000000000..30611399c85b --- /dev/null +++ b/exporter/datadogexporter/internal/metadata/internal/k8s/nodename.go @@ -0,0 +1,93 @@ +// 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 k8s // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/internal/k8s" + +import ( + "context" + "fmt" + "io/ioutil" + "os" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig" + + "go.uber.org/zap" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + k8s "k8s.io/client-go/kubernetes" +) + +type nodeNameProvider interface { + NodeName(context.Context) (string, error) +} + +var _ nodeNameProvider = (*nodeNameProviderImpl)(nil) + +type nodeNameProviderImpl struct { + logger *zap.Logger + client k8s.Interface +} + +func (p *nodeNameProviderImpl) namespace() string { + namespacePath := "/var/run/secrets/kubernetes.io/serviceaccount/namespace" + val, err := ioutil.ReadFile(namespacePath) + if err == nil && val != nil { + return string(val) + } + p.logger.Warn("Could not fetch k8s namespace, using 'default'", zap.Error(err)) + return "default" +} + +func (p *nodeNameProviderImpl) NodeName(ctx context.Context) (string, error) { + namespace := p.namespace() + + // NOTE: The pod name may not match the OS hostname, e.g. if it has been modified + // via the 'setHostnameAsFQDN' and 'hostname' fields in the pod spec. + // The query below will error out in that case. See: + // https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11033 + podName, err := os.Hostname() + if err != nil { + return "", fmt.Errorf("could not fetch pod hostname: %w", err) + } + + // NOTE: If changing this, check if the RBAC rules on the docs or examples need updates. + pod, err := p.client.CoreV1().Pods(namespace).Get(ctx, podName, metav1.GetOptions{}) + if err != nil { + return "", err + } + return pod.Spec.NodeName, nil +} + +var _ nodeNameProvider = (*nodeNameUnavailable)(nil) + +type nodeNameUnavailable struct { + err error +} + +func (n *nodeNameUnavailable) NodeName(context.Context) (string, error) { + return "", fmt.Errorf("k8s client is unavailable: %w", n.err) +} + +func newNodeNameProvider() nodeNameProvider { + client, err := k8sconfig.MakeClient(k8sconfig.APIConfig{ + AuthType: k8sconfig.AuthTypeServiceAccount, + }) + + if err != nil { + return &nodeNameUnavailable{err: err} + } + + return &nodeNameProviderImpl{ + client: client, + } +} diff --git a/exporter/datadogexporter/internal/metadata/internal/k8s/provider.go b/exporter/datadogexporter/internal/metadata/internal/k8s/provider.go new file mode 100644 index 000000000000..8540c239a8a4 --- /dev/null +++ b/exporter/datadogexporter/internal/metadata/internal/k8s/provider.go @@ -0,0 +1,57 @@ +// 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 k8s // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/internal/k8s" + +import ( + "context" + "fmt" + + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/provider" + + "go.uber.org/zap" +) + +var _ provider.HostnameProvider = (*Provider)(nil) + +type Provider struct { + logger *zap.Logger + nodeNameProvider nodeNameProvider + clusterNameProvider provider.ClusterNameProvider +} + +// Hostname returns the Kubernetes node name followed by the cluster name if available. +func (p *Provider) Hostname(ctx context.Context) (string, error) { + nodeName, err := p.nodeNameProvider.NodeName(ctx) + if err != nil { + return "", fmt.Errorf("node name not available: %w", err) + } + + clusterName, err := p.clusterNameProvider.ClusterName(ctx) + if err != nil { + p.logger.Debug("failed to get valid cluster name", zap.Error(err)) + return nodeName, nil + } + + return fmt.Sprintf("%s-%s", nodeName, clusterName), nil +} + +// NewProvider creates a new Kubernetes hostname provider. +func NewProvider(logger *zap.Logger, clusterProvider provider.ClusterNameProvider) (*Provider, error) { + return &Provider{ + logger: logger, + nodeNameProvider: newNodeNameProvider(), + clusterNameProvider: clusterProvider, + }, nil +} diff --git a/exporter/datadogexporter/internal/metadata/internal/k8s/provider_test.go b/exporter/datadogexporter/internal/metadata/internal/k8s/provider_test.go new file mode 100644 index 000000000000..477c878fa700 --- /dev/null +++ b/exporter/datadogexporter/internal/metadata/internal/k8s/provider_test.go @@ -0,0 +1,90 @@ +// 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 k8s + +import ( + "context" + "errors" + "testing" + + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/provider" + + "github.com/stretchr/testify/assert" + "go.uber.org/zap" +) + +var _ provider.ClusterNameProvider = (*StringProvider)(nil) +var _ nodeNameProvider = (*StringProvider)(nil) + +type StringProvider string + +func (p StringProvider) ClusterName(context.Context) (string, error) { return string(p), nil } +func (p StringProvider) NodeName(context.Context) (string, error) { return string(p), nil } + +var _ provider.ClusterNameProvider = (*ErrorProvider)(nil) +var _ nodeNameProvider = (*ErrorProvider)(nil) + +type ErrorProvider string + +func (p ErrorProvider) ClusterName(context.Context) (string, error) { return "", errors.New(string(p)) } +func (p ErrorProvider) NodeName(context.Context) (string, error) { return "", errors.New(string(p)) } + +func TestProvider(t *testing.T) { + tests := []struct { + name string + + nodeNameProvider nodeNameProvider + clusterNameProvider provider.ClusterNameProvider + + hostname string + err string + }{ + { + name: "no node name", + nodeNameProvider: ErrorProvider("errNodeName"), + clusterNameProvider: StringProvider("clusterName"), + err: "node name not available: errNodeName", + }, + { + name: "node name but no cluster name", + nodeNameProvider: StringProvider("nodeName"), + clusterNameProvider: ErrorProvider("errClusterName"), + hostname: "nodeName", + }, + { + name: "node and cluster name", + nodeNameProvider: StringProvider("nodeName"), + clusterNameProvider: StringProvider("clusterName"), + hostname: "nodeName-clusterName", + }, + } + + for _, testInstance := range tests { + t.Run(testInstance.name, func(t *testing.T) { + provider := &Provider{ + logger: zap.NewNop(), + nodeNameProvider: testInstance.nodeNameProvider, + clusterNameProvider: testInstance.clusterNameProvider, + } + + hostname, err := provider.Hostname(context.Background()) + if err != nil || testInstance.err != "" { + assert.EqualError(t, err, testInstance.err) + } else { + assert.Equal(t, testInstance.hostname, hostname) + } + }) + } +} diff --git a/exporter/datadogexporter/internal/metadata/metadata.go b/exporter/datadogexporter/internal/metadata/metadata.go index ac5d4a30b86b..6cc5debb3ec8 100644 --- a/exporter/datadogexporter/internal/metadata/metadata.go +++ b/exporter/datadogexporter/internal/metadata/metadata.go @@ -26,6 +26,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/pdata/pcommon" conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + "go.opentelemetry.io/collector/service/featuregate" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/internal/ec2" @@ -97,7 +98,9 @@ type Meta struct { func metadataFromAttributes(attrs pcommon.Map) *HostMetadata { hm := &HostMetadata{Meta: &Meta{}, Tags: &HostTags{}} - if hostname, ok := attributes.HostnameFromAttributes(attrs, UsePreviewHostnameLogic); ok { + var usePreviewHostnameLogic = featuregate.GetRegistry().IsEnabled(HostnamePreviewFeatureGate) + + if hostname, ok := attributes.HostnameFromAttributes(attrs, usePreviewHostnameLogic); ok { hm.InternalHostname = hostname hm.Meta.Hostname = hostname } @@ -110,11 +113,11 @@ func metadataFromAttributes(attrs pcommon.Map) *HostMetadata { hm.Meta.EC2Hostname = ec2HostInfo.EC2Hostname hm.Tags.OTel = append(hm.Tags.OTel, ec2HostInfo.EC2Tags...) } else if ok && cloudProvider.StringVal() == conventions.AttributeCloudProviderGCP { - gcpHostInfo := gcp.HostInfoFromAttributes(attrs, UsePreviewHostnameLogic) + gcpHostInfo := gcp.HostInfoFromAttributes(attrs, usePreviewHostnameLogic) hm.Tags.GCP = gcpHostInfo.GCPTags hm.Meta.HostAliases = append(hm.Meta.HostAliases, gcpHostInfo.HostAliases...) } else if ok && cloudProvider.StringVal() == conventions.AttributeCloudProviderAzure { - azureHostInfo := azure.HostInfoFromAttributes(attrs, UsePreviewHostnameLogic) + azureHostInfo := azure.HostInfoFromAttributes(attrs, usePreviewHostnameLogic) hm.Meta.HostAliases = append(hm.Meta.HostAliases, azureHostInfo.HostAliases...) } diff --git a/exporter/datadogexporter/internal/metadata/provider/clustername.go b/exporter/datadogexporter/internal/metadata/provider/clustername.go new file mode 100644 index 000000000000..74d333fac44d --- /dev/null +++ b/exporter/datadogexporter/internal/metadata/provider/clustername.go @@ -0,0 +1,60 @@ +// 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 provider // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter/internal/metadata/provider" + +import ( + "context" + "fmt" + + "go.uber.org/zap" +) + +type ClusterNameProvider interface { + ClusterName(context.Context) (string, error) +} + +var _ ClusterNameProvider = (*chainClusterProvider)(nil) + +type chainClusterProvider struct { + logger *zap.Logger + providers map[string]ClusterNameProvider + priorityList []string +} + +func (p *chainClusterProvider) ClusterName(ctx context.Context) (string, error) { + for _, source := range p.priorityList { + zapSource := zap.String("source", source) + provider := p.providers[source] + clusterName, err := provider.ClusterName(ctx) + if err == nil { + p.logger.Info("Resolved cluster name", zapSource, zap.String("cluster name", clusterName)) + return clusterName, nil + } + p.logger.Debug("Unavailable cluster name provider", zapSource, zap.Error(err)) + } + + return "", fmt.Errorf("no cluster name provider was available") +} + +// Chain providers into a single provider that returns the first available hostname. +func ChainCluster(logger *zap.Logger, providers map[string]ClusterNameProvider, priorityList []string) (ClusterNameProvider, error) { + for _, source := range priorityList { + if _, ok := providers[source]; !ok { + return nil, fmt.Errorf("%q source is not available in providers", source) + } + } + + return &chainClusterProvider{logger: logger, providers: providers, priorityList: priorityList}, nil +} diff --git a/exporter/datadogexporter/internal/metadata/provider/clustername_test.go b/exporter/datadogexporter/internal/metadata/provider/clustername_test.go new file mode 100644 index 000000000000..cfe00bf25e6f --- /dev/null +++ b/exporter/datadogexporter/internal/metadata/provider/clustername_test.go @@ -0,0 +1,112 @@ +// 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 provider + +import ( + "context" + "errors" + "testing" + + "github.com/stretchr/testify/assert" + "go.uber.org/zap" +) + +var _ ClusterNameProvider = (*StringClusterProvider)(nil) + +type StringClusterProvider string + +func (p StringClusterProvider) ClusterName(context.Context) (string, error) { return string(p), nil } + +var _ ClusterNameProvider = (*ErrorClusterProvider)(nil) + +type ErrorClusterProvider string + +func (p ErrorClusterProvider) ClusterName(context.Context) (string, error) { + return "", errors.New(string(p)) +} + +func TestChainCluster(t *testing.T) { + tests := []struct { + name string + providers map[string]ClusterNameProvider + priorityList []string + + buildErr string + + clusterName string + queryErr string + }{ + { + name: "missing provider in priority list", + providers: map[string]ClusterNameProvider{ + "p1": StringClusterProvider("p1ClusterName"), + "p2": ErrorClusterProvider("errP2"), + }, + priorityList: []string{"p1", "p2", "p3"}, + + buildErr: "\"p3\" source is not available in providers", + }, + { + name: "all providers fail", + providers: map[string]ClusterNameProvider{ + "p1": ErrorClusterProvider("errP1"), + "p2": ErrorClusterProvider("errP2"), + "p3": StringClusterProvider("p3ClusterName"), + }, + priorityList: []string{"p1", "p2"}, + + queryErr: "no cluster name provider was available", + }, + { + name: "no providers fail", + providers: map[string]ClusterNameProvider{ + "p1": StringClusterProvider("p1ClusterName"), + "p2": StringClusterProvider("p2ClusterName"), + "p3": StringClusterProvider("p3ClusterName"), + }, + priorityList: []string{"p1", "p2", "p3"}, + + clusterName: "p1ClusterName", + }, + { + name: "some providers fail", + providers: map[string]ClusterNameProvider{ + "p1": ErrorClusterProvider("p1Err"), + "p2": StringClusterProvider("p2ClusterName"), + "p3": ErrorClusterProvider("p3Err"), + }, + priorityList: []string{"p1", "p2", "p3"}, + + clusterName: "p2ClusterName", + }, + } + + for _, testInstance := range tests { + t.Run(testInstance.name, func(t *testing.T) { + provider, err := ChainCluster(zap.NewNop(), testInstance.providers, testInstance.priorityList) + if err != nil || testInstance.buildErr != "" { + assert.EqualError(t, err, testInstance.buildErr) + return + } + + clusterName, err := provider.ClusterName(context.Background()) + if err != nil || testInstance.queryErr != "" { + assert.EqualError(t, err, testInstance.queryErr) + } else { + assert.Equal(t, testInstance.clusterName, clusterName) + } + }) + } +} diff --git a/exporter/datadogexporter/internal/metadata/provider/provider.go b/exporter/datadogexporter/internal/metadata/provider/provider.go index 6e02dd69adfb..ca1fd75dbb3a 100644 --- a/exporter/datadogexporter/internal/metadata/provider/provider.go +++ b/exporter/datadogexporter/internal/metadata/provider/provider.go @@ -59,7 +59,7 @@ func Chain(logger *zap.Logger, providers map[string]HostnameProvider, priorityLi } } - return &chainProvider{logger: logger, providers: providers}, nil + return &chainProvider{logger: logger, providers: providers, priorityList: priorityList}, nil } var _ HostnameProvider = (*configProvider)(nil) @@ -83,7 +83,7 @@ func Config(hostname string) HostnameProvider { var _ HostnameProvider = (*onceProvider)(nil) type onceProvider struct { - once *sync.Once + once sync.Once hostname string err error provider HostnameProvider diff --git a/exporter/datadogexporter/internal/model/attributes/hostname.go b/exporter/datadogexporter/internal/model/attributes/hostname.go index 93562c97f103..edf8954f70be 100644 --- a/exporter/datadogexporter/internal/model/attributes/hostname.go +++ b/exporter/datadogexporter/internal/model/attributes/hostname.go @@ -76,6 +76,17 @@ func HostnameFromAttributes(attrs pcommon.Map, usePreviewRules bool) (string, bo return candidateHost, ok } +func k8sHostnameFromAttributes(attrs pcommon.Map) (string, bool) { + if k8sNodeName, ok := attrs.Get(AttributeK8sNodeName); ok { + if k8sClusterName, ok := getClusterName(attrs); ok { + return k8sNodeName.StringVal() + "-" + k8sClusterName, true + } + return k8sNodeName.StringVal(), true + } + + return "", false +} + func unsanitizedHostnameFromAttributes(attrs pcommon.Map, usePreviewRules bool) (string, bool) { // Custom hostname: useful for overriding in k8s/cloud envs if customHostname, ok := attrs.Get(AttributeDatadogHostname); ok { @@ -88,11 +99,10 @@ func unsanitizedHostnameFromAttributes(attrs pcommon.Map, usePreviewRules bool) } // Kubernetes: node-cluster if cluster name is available, else node - if k8sNodeName, ok := attrs.Get(AttributeK8sNodeName); ok { - if k8sClusterName, ok := getClusterName(attrs); ok { - return k8sNodeName.StringVal() + "-" + k8sClusterName, true - } - return k8sNodeName.StringVal(), true + k8sName, k8sOk := k8sHostnameFromAttributes(attrs) + + if !usePreviewRules && k8sOk { + return k8sName, true } cloudProvider, ok := attrs.Get(conventions.AttributeCloudProvider) @@ -104,6 +114,10 @@ func unsanitizedHostnameFromAttributes(attrs pcommon.Map, usePreviewRules bool) return azure.HostnameFromAttributes(attrs, usePreviewRules) } + if usePreviewRules && k8sOk { + return k8sName, true + } + // host id from cloud provider if hostID, ok := attrs.Get(conventions.AttributeHostID); ok { return hostID.StringVal(), true diff --git a/exporter/datadogexporter/internal/model/attributes/hostname_test.go b/exporter/datadogexporter/internal/model/attributes/hostname_test.go index 4e22b73717dc..79f471a91f70 100644 --- a/exporter/datadogexporter/internal/model/attributes/hostname_test.go +++ b/exporter/datadogexporter/internal/model/attributes/hostname_test.go @@ -239,6 +239,30 @@ func TestHostnameKubernetes(t *testing.T) { assert.True(t, ok) assert.Equal(t, hostname, "nodeName") + // Node name, no cluster name, AWS EC2, no preview + attrs = testutils.NewAttributeMap(map[string]string{ + AttributeK8sNodeName: testNodeName, + conventions.AttributeContainerID: testContainerID, + conventions.AttributeHostID: testHostID, + conventions.AttributeHostName: testHostName, + conventions.AttributeCloudProvider: conventions.AttributeCloudProviderAWS, + }) + hostname, ok = HostnameFromAttributes(attrs, false) + assert.True(t, ok) + assert.Equal(t, hostname, "nodeName") + + // Node name, no cluster name, AWS EC2, preview + attrs = testutils.NewAttributeMap(map[string]string{ + AttributeK8sNodeName: testNodeName, + conventions.AttributeContainerID: testContainerID, + conventions.AttributeHostID: testHostID, + conventions.AttributeHostName: testHostName, + conventions.AttributeCloudProvider: conventions.AttributeCloudProviderAWS, + }) + hostname, ok = HostnameFromAttributes(attrs, true) + assert.True(t, ok) + assert.Equal(t, hostname, testHostID) + // no node name, cluster name attrs = testutils.NewAttributeMap(map[string]string{ conventions.AttributeK8SClusterName: testClusterName, diff --git a/exporter/datadogexporter/internal/model/translator/metrics_translator.go b/exporter/datadogexporter/internal/model/translator/metrics_translator.go index 22bfa8061c42..623952a61003 100644 --- a/exporter/datadogexporter/internal/model/translator/metrics_translator.go +++ b/exporter/datadogexporter/internal/model/translator/metrics_translator.go @@ -20,6 +20,7 @@ import ( "fmt" "math" "strconv" + "sync" "github.com/DataDog/datadog-agent/pkg/quantile" "go.opentelemetry.io/collector/pdata/pmetric" @@ -36,6 +37,8 @@ type Translator struct { prevPts *ttlCache logger *zap.Logger cfg translatorConfig + + onceHostnameChanged sync.Once } // New creates a new translator with given options. @@ -64,7 +67,11 @@ func New(logger *zap.Logger, options ...Option) (*Translator, error) { } cache := newTTLCache(cfg.sweepInterval, cfg.deltaTTL) - return &Translator{cache, logger, cfg}, nil + return &Translator{ + prevPts: cache, + logger: logger, + cfg: cfg, + }, nil } // isCumulativeMonotonic checks if a metric is a cumulative monotonic metric @@ -406,6 +413,24 @@ func (t *Translator) MapMetrics(ctx context.Context, md pmetric.Metrics, consume } } + // Log related to the preview hostname feature flag. + // TODO (#10424): Remove this once the feature flag is enabled by default. + if !t.cfg.previewHostnameFromAttributes && host != "" { + previewHost, oldOk := attributes.HostnameFromAttributes(rm.Resource().Attributes(), true) + if !oldOk { + previewHost, _ = t.cfg.fallbackHostnameProvider.Hostname(context.Background()) + } + if previewHost != host { + t.onceHostnameChanged.Do(func() { + t.logger.Warn( + "The hostname resolved from attributes on one of your metrics will change on a future minor version. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/10424", + zap.String("current hostname", host), + zap.String("future hostname", previewHost), + ) + }) + } + } + if host != "" { // Track hosts if the consumer is a HostConsumer. if c, ok := consumer.(HostConsumer); ok { diff --git a/exporter/datadogexporter/metrics_exporter.go b/exporter/datadogexporter/metrics_exporter.go index 2e7b08dfd4f2..eb20c8a0d3a6 100644 --- a/exporter/datadogexporter/metrics_exporter.go +++ b/exporter/datadogexporter/metrics_exporter.go @@ -26,6 +26,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/service/featuregate" "go.uber.org/multierr" "go.uber.org/zap" "gopkg.in/zorkian/go-datadog-api.v2" @@ -88,6 +89,10 @@ func translatorFromConfig(logger *zap.Logger, cfg *config.Config, hostProvider p options = append(options, translator.WithNumberMode(numberMode)) + if featuregate.GetRegistry().IsEnabled(metadata.HostnamePreviewFeatureGate) { + options = append(options, translator.WithPreviewHostnameFromAttributes()) + } + return translator.New(logger, options...) } diff --git a/exporter/datadogexporter/testdata/config.yaml b/exporter/datadogexporter/testdata/config.yaml index 239cbb21c647..19e03f9903ee 100644 --- a/exporter/datadogexporter/testdata/config.yaml +++ b/exporter/datadogexporter/testdata/config.yaml @@ -28,6 +28,8 @@ exporters: host_metadata: tags: [example:tag] + # Suppress warning related to `exporter.datadog.hostname.preview` feature gate + hostname_source: first_resource api: key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa @@ -44,6 +46,9 @@ exporters: datadog/default: api: key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + host_metadata: + # Suppress warning related to `exporter.datadog.hostname.preview` feature gate + hostname_source: first_resource datadog/hostmetadata: api: diff --git a/exporter/datadogexporter/translate_traces.go b/exporter/datadogexporter/translate_traces.go index c52788839195..d7a767732710 100644 --- a/exporter/datadogexporter/translate_traces.go +++ b/exporter/datadogexporter/translate_traces.go @@ -28,6 +28,7 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + "go.opentelemetry.io/collector/service/featuregate" "gopkg.in/DataDog/dd-trace-go.v1/ddtrace/ext" "gopkg.in/zorkian/go-datadog-api.v2" @@ -91,7 +92,7 @@ func convertToDatadogTd(td ptrace.Traces, fallbackHost string, cfg *config.Confi for i := 0; i < resourceSpans.Len(); i++ { rs := resourceSpans.At(i) - host, ok := attributes.HostnameFromAttributes(rs.Resource().Attributes(), metadata.UsePreviewHostnameLogic) + host, ok := attributes.HostnameFromAttributes(rs.Resource().Attributes(), featuregate.GetRegistry().IsEnabled(metadata.HostnamePreviewFeatureGate)) if !ok { host = fallbackHost } diff --git a/exporter/dynatraceexporter/README.md b/exporter/dynatraceexporter/README.md index 21d3b99be121..06feadd08f33 100644 --- a/exporter/dynatraceexporter/README.md +++ b/exporter/dynatraceexporter/README.md @@ -6,12 +6,17 @@ | Supported pipeline types | metrics | | Distributions | [contrib], [AWS] | -The [Dynatrace](https://dynatrace.com) metrics exporter exports metrics to the [metrics API v2](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/) +The [Dynatrace](https://www.dynatrace.com/integrations/opentelemetry/) metrics exporter exports metrics to the [Metrics API v2](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/metric-v2/post-ingest-metrics/) using the [metrics ingestion protocol](https://www.dynatrace.com/support/help/how-to-use-dynatrace/metrics/metric-ingestion/metric-ingestion-protocol/). -This enables Dynatrace to receive metrics collected by the OpenTelemetry Collector. +This enables Dynatrace to receive metrics collected by the OpenTelemetry Collector. +More information on exporting metrics to Dynatrace can be found in the +[Dynatrace documentation for OpenTelemetry metrics](https://www.dynatrace.com/support/help/shortlink/opentelemetry-metrics). -The requests sent to Dynatrace are authenticated using an API token mechanism documented [here](https://www.dynatrace.com/support/help/dynatrace-api/basics/dynatrace-api-authentication/). +For ingesting traces (spans) into Dynatrace, use the generic OTLP/HTTP exporter shipped with the Collector. +More information on exporting traces to Dynatrace can be found in the +[Dynatrace documentation for OpenTelemetry traces](https://www.dynatrace.com/support/help/extend-dynatrace/opentelemetry/opentelemetry-traces/opentelemetry-ingest). +> The requests sent to Dynatrace are authenticated using an API token mechanism documented [here](https://www.dynatrace.com/support/help/dynatrace-api/basics/dynatrace-api-authentication/). > Please review the Collector's [security > documentation](https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security.md), > which contains recommendations on securing sensitive information such as the @@ -51,7 +56,7 @@ exporters: If you run the Collector on a host or VM without a OneAgent you will need to configure the Metrics v2 API endpoint of your Dynatrace environment to send the metrics to as well as an API token. -Find out how to create a token in the [Dynatrace documentation](https://www.dynatrace.com/support/help/dynatrace-api/basics/dynatrace-api-authentication/) or navigate to **Settings > Integration > Dynatrace API** in your Dynatrace environment and create a token with the 'Ingest metrics' (`metrics.ingest`) scope enabled. It is recommended to limit token scope to only this permission. +Find out how to create a token in the [Dynatrace documentation](https://www.dynatrace.com/support/help/dynatrace-api/basics/dynatrace-api-authentication/) or navigate to **Access tokens** in your Dynatrace environment and create a token with the 'Ingest metrics' (`metrics.ingest`) scope enabled. It is recommended to limit token scope to only this permission. The endpoint for the Dynatrace Metrics API v2 is: @@ -281,4 +286,4 @@ by configuring the OpenTelemetry SDK to export DELTA values. [beta]:https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[AWS]:https://aws-otel.github.io/docs/partners/dynatrace \ No newline at end of file +[AWS]:https://aws-otel.github.io/docs/partners/dynatrace diff --git a/exporter/dynatraceexporter/go.mod b/exporter/dynatraceexporter/go.mod index 04032248657a..1917094b8c69 100644 --- a/exporter/dynatraceexporter/go.mod +++ b/exporter/dynatraceexporter/go.mod @@ -3,12 +3,12 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/dynatr go 1.17 require ( - github.com/dynatrace-oss/dynatrace-metric-utils-go v0.3.0 + github.com/dynatrace-oss/dynatrace-metric-utils-go v0.4.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/exporter/dynatraceexporter/go.sum b/exporter/dynatraceexporter/go.sum index dcfc3ba849e1..403868a6ae77 100644 --- a/exporter/dynatraceexporter/go.sum +++ b/exporter/dynatraceexporter/go.sum @@ -34,8 +34,8 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dynatrace-oss/dynatrace-metric-utils-go v0.3.0 h1:q2Ayh9s6Cr75bS5URiOUAoyFXemgKQaBJphbhAaJHCY= -github.com/dynatrace-oss/dynatrace-metric-utils-go v0.3.0/go.mod h1:qw0E9EJ0PnSlhWawDNuqE0zhc1hqOBUCFIAj3dd9DNw= +github.com/dynatrace-oss/dynatrace-metric-utils-go v0.4.0 h1:DNKHy0pt6iKh5w/FqWTlNL/vvZE5zxPLfjfm0Zqclc4= +github.com/dynatrace-oss/dynatrace-metric-utils-go v0.4.0/go.mod h1:qw0E9EJ0PnSlhWawDNuqE0zhc1hqOBUCFIAj3dd9DNw= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -191,10 +191,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/dynatraceexporter/internal/serialization/histogram.go b/exporter/dynatraceexporter/internal/serialization/histogram.go index f543e6d43b7b..a3b8b4c699bc 100644 --- a/exporter/dynatraceexporter/internal/serialization/histogram.go +++ b/exporter/dynatraceexporter/internal/serialization/histogram.go @@ -36,19 +36,14 @@ func serializeHistogram(name, prefix string, dims dimensions.NormalizedDimension return "", nil } - min, max := estimateHistMinMax(dp) + min, max, sum := histDataPointToSummary(dp) dm, err := dtMetric.NewMetric( name, dtMetric.WithPrefix(prefix), dtMetric.WithDimensions(dims), dtMetric.WithTimestamp(dp.Timestamp().AsTime()), - dtMetric.WithFloatSummaryValue( - min, - max, - dp.Sum(), - int64(dp.Count()), - ), + dtMetric.WithFloatSummaryValue(min, max, sum, int64(dp.Count())), ) if err != nil { @@ -58,58 +53,87 @@ func serializeHistogram(name, prefix string, dims dimensions.NormalizedDimension return dm.Serialize() } -// estimateHistMinMax returns the estimated minimum and maximum value in the histogram by using the min and max non-empty buckets. -func estimateHistMinMax(dp pmetric.HistogramDataPoint) (float64, float64) { +// histDataPointToSummary returns the estimated minimum and maximum value in the histogram by using the min and max non-empty buckets. +// It MAY NOT be called with a data point with dp.Count() == 0. +func histDataPointToSummary(dp pmetric.HistogramDataPoint) (float64, float64, float64) { bounds := dp.MExplicitBounds() counts := dp.MBucketCounts() - // shortcut in the case both max and min are provided - if dp.HasMin() && dp.HasMax() { - return dp.Min(), dp.Max() + // shortcut if min, max, and sum are provided + if dp.HasMin() && dp.HasMax() && dp.HasSum() { + return dp.Min(), dp.Max(), dp.Sum() } - // Because we do not know the actual min and max, we estimate them based on the min and max non-empty bucket - minIdx, maxIdx := -1, -1 - for y := 0; y < len(counts); y++ { - if counts[y] > 0 { - if minIdx == -1 { - minIdx = y - } - maxIdx = y - } + // a single-bucket histogram is a special case + if len(counts) == 1 { + return estimateSingleBucketHistogram(dp) } - if minIdx == -1 || maxIdx == -1 { - return 0, 0 - } + // If any of min, max, sum is not provided in the data point, + // loop through the buckets to estimate them. + // All three values are estimated in order to avoid looping multiple times + // or complicating the loop with branches. After the loop, estimates + // will be overridden with any values provided by the data point. + foundNonEmptyBucket := false + var min, max, sum float64 = 0, 0, 0 + + // Because we do not know the actual min, max, or sum, we estimate them based on non-empty buckets + for i := 0; i < len(counts); i++ { + // empty bucket + if counts[i] == 0 { + continue + } - var min, max float64 + // range for bucket counts[i] is bounds[i-1] to bounds[i] - if dp.HasMin() { - min = dp.Min() - } else { - // Use lower bound for min unless it is the first bucket which has no lower bound, then use upper - if minIdx == 0 { - min = bounds[minIdx] + // min estimation + if !foundNonEmptyBucket { + foundNonEmptyBucket = true + if i == 0 { + // if we're in the first bucket, the best estimate we can make for min is the upper bound + min = bounds[i] + } else { + min = bounds[i-1] + } + } + + // max estimation + if i == len(counts)-1 { + // if we're in the last bucket, the best estimate we can make for max is the lower bound + max = bounds[i-1] } else { - min = bounds[minIdx-1] + max = bounds[i] + } + + // sum estimation + switch i { + case 0: + // in the first bucket, estimate sum using the upper bound + sum += float64(counts[i]) * bounds[i] + case len(counts) - 1: + // in the last bucket, estimate sum using the lower bound + sum += float64(counts[i]) * bounds[i-1] + default: + // in any other bucket, estimate sum using the bucket midpoint + sum += float64(counts[i]) * (bounds[i] + bounds[i-1]) / 2 } } + // Override estimates with any values provided by the data point + if dp.HasMin() { + min = dp.Min() + } if dp.HasMax() { max = dp.Max() - } else { - // Use upper bound for max unless it is the last bucket which has no upper bound, then use lower - if maxIdx == len(counts)-1 { - max = bounds[maxIdx-1] - } else { - max = bounds[maxIdx] - } + } + if dp.HasSum() { + sum = dp.Sum() } // Set min to average when higher than average. This can happen when most values are lower than first boundary (falling in first bucket). // Set max to average when lower than average. This can happen when most values are higher than last boundary (falling in last bucket). - avg := dp.Sum() / float64(dp.Count()) + // dp.Count() will never be zero + avg := sum / float64(dp.Count()) if min > avg { min = avg } @@ -117,5 +141,29 @@ func estimateHistMinMax(dp pmetric.HistogramDataPoint) (float64, float64) { max = avg } - return min, max + return min, max, sum +} + +func estimateSingleBucketHistogram(dp pmetric.HistogramDataPoint) (float64, float64, float64) { + min, max, sum := 0.0, 0.0, 0.0 + + if dp.HasSum() { + sum = dp.Sum() + } + + mean := sum / float64(dp.Count()) + + if dp.HasMin() { + min = dp.Min() + } else { + min = mean + } + + if dp.HasMax() { + max = dp.Max() + } else { + max = mean + } + + return min, max, sum } diff --git a/exporter/dynatraceexporter/internal/serialization/histogram_test.go b/exporter/dynatraceexporter/internal/serialization/histogram_test.go index 562e5e71f621..d076af2f6695 100644 --- a/exporter/dynatraceexporter/internal/serialization/histogram_test.go +++ b/exporter/dynatraceexporter/internal/serialization/histogram_test.go @@ -131,4 +131,197 @@ func Test_serializeHistogram(t *testing.T) { assert.NoError(t, err) assert.Equal(t, "prefix.min_max_hist gauge,min=3,max=7,sum=10,count=2 1626438600000", got) }) + + t.Run("when min is not provided it should be estimated", func(t *testing.T) { + t.Run("values between first two boundaries", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5}) + hist.SetMBucketCounts([]uint64{0, 1, 0, 3, 2, 0}) + hist.SetCount(6) + hist.SetSum(21.2) + + min, _, _ := histDataPointToSummary(hist) + + assert.Equal(t, 1.0, min, "use bucket min") + }) + + t.Run("first bucket has value", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5}) + hist.SetMBucketCounts([]uint64{1, 0, 0, 3, 0, 4}) + hist.SetCount(8) + hist.SetSum(34.5) + + min, _, _ := histDataPointToSummary(hist) + + assert.Equal(t, 1.0, min, "use the first boundary as estimation instead of Inf") + }) + + t.Run("only the first bucket has values, use the mean", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5}) + hist.SetMBucketCounts([]uint64{3, 0, 0, 0, 0, 0}) + hist.SetCount(3) + hist.SetSum(0.75) + + min, _, _ := histDataPointToSummary(hist) + + assert.Equal(t, 0.25, min) + }) + t.Run("just one bucket from -Inf to Inf", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{}) + hist.SetMBucketCounts([]uint64{4}) + hist.SetCount(4) + hist.SetSum(8.8) + + min, _, _ := histDataPointToSummary(hist) + + assert.Equal(t, 2.2, min, "calculate the mean as min value") + }) + t.Run("just one bucket from -Inf to Inf", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{}) + hist.SetMBucketCounts([]uint64{1}) + hist.SetCount(1) + hist.SetSum(1.2) + + min, _, _ := histDataPointToSummary(hist) + + assert.Equal(t, 1.2, min, "calculate the mean as min value") + }) + t.Run("only the last bucket has a value", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5}) + hist.SetMBucketCounts([]uint64{0, 0, 0, 0, 0, 3}) + hist.SetCount(3) + hist.SetSum(15.6) + + min, _, _ := histDataPointToSummary(hist) + + assert.Equal(t, 5.0, min, "use the lower bound") + }) + }) + + t.Run("when max is not provided it should be estimated", func(t *testing.T) { + t.Run("values between the last two boundaries", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5}) + hist.SetMBucketCounts([]uint64{0, 1, 0, 3, 2, 0}) + hist.SetSum(21.2) + hist.SetCount(6) + + _, max, _ := histDataPointToSummary(hist) + + assert.Equal(t, 5.0, max, "use bucket max") + }) + + t.Run("last bucket has value", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5}) + hist.SetMBucketCounts([]uint64{1, 0, 0, 3, 0, 4}) + hist.SetSum(34.5) + hist.SetCount(8) + + _, max, _ := histDataPointToSummary(hist) + + assert.Equal(t, 5.0, max, "use the last boundary as estimation instead of Inf") + }) + + t.Run("only the last bucket has values", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5}) + hist.SetMBucketCounts([]uint64{0, 0, 0, 0, 0, 2}) + hist.SetSum(20.2) + hist.SetCount(2) + + _, max, _ := histDataPointToSummary(hist) + + assert.Equal(t, 10.1, max, "use the mean (10.1) Otherwise, the max would be estimated as 5, and max >= avg would be violated") + }) + + t.Run("just one bucket from -Inf to Inf", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{}) + hist.SetMBucketCounts([]uint64{4}) + hist.SetSum(8.8) + hist.SetCount(4) + + _, max, _ := histDataPointToSummary(hist) + + assert.Equal(t, 2.2, max, "calculate the mean as max value") + }) + + t.Run("just one bucket from -Inf to Inf", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{}) + hist.SetMBucketCounts([]uint64{1}) + hist.SetSum(1.2) + hist.SetCount(1) + + _, max, _ := histDataPointToSummary(hist) + + assert.Equal(t, 1.2, max, "calculate the mean as max value") + }) + + t.Run("max is larger than sum", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{0, 5}) + hist.SetMBucketCounts([]uint64{0, 2, 0}) + hist.SetSum(2.3) + hist.SetCount(2) + + _, max, _ := histDataPointToSummary(hist) + + assert.Equal(t, 5.0, max, "use the estimated boundary") + }) + }) + + t.Run("when sum is not provided it should be estimated", func(t *testing.T) { + t.Run("single bucket histogram", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{}) + hist.SetMBucketCounts([]uint64{13}) + hist.SetCount(6) + + _, _, sum := histDataPointToSummary(hist) + + assert.Equal(t, 0.0, sum, "estimate zero (midpoint of [-Inf, Inf])") + }) + + t.Run("data in bounded buckets", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5}) + hist.SetMBucketCounts([]uint64{0, 3, 5, 0, 0, 0}) + hist.SetCount(6) + + _, _, sum := histDataPointToSummary(hist) + + assert.Equal(t, 3*1.5+5*2.5, sum, "estimate sum using bucket midpoints") + }) + + t.Run("data in unbounded buckets", func(t *testing.T) { + t.Run("first bucket", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5}) + hist.SetMBucketCounts([]uint64{2, 3, 5, 0, 0, 0}) + hist.SetCount(6) + + _, _, sum := histDataPointToSummary(hist) + + assert.Equal(t, 1*2+3*1.5+5*2.5, sum, "use bucket upper bound") + }) + + t.Run("last bucket", func(t *testing.T) { + hist := pmetric.NewHistogramDataPoint() + hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5}) + hist.SetMBucketCounts([]uint64{0, 3, 5, 0, 0, 2}) + hist.SetCount(6) + + _, _, sum := histDataPointToSummary(hist) + + assert.Equal(t, 3*1.5+5*2.5+2*5, sum, "use bucket upper bound") + }) + }) + }) } diff --git a/exporter/elasticexporter/exporter.go b/exporter/elasticexporter/exporter.go index ba10d87e9af4..4c7de9a46268 100644 --- a/exporter/elasticexporter/exporter.go +++ b/exporter/elasticexporter/exporter.go @@ -43,7 +43,7 @@ func newElasticTracesExporter( ) (component.TracesExporter, error) { exporter, err := newElasticExporter(cfg.(*Config), set.Logger) if err != nil { - return nil, fmt.Errorf("cannot configure Elastic APM trace exporter: %v", err) + return nil, fmt.Errorf("cannot configure Elastic APM trace exporter: %w", err) } return exporterhelper.NewTracesExporter(cfg, set, func(ctx context.Context, traces ptrace.Traces) error { var errs error @@ -63,7 +63,7 @@ func newElasticMetricsExporter( ) (component.MetricsExporter, error) { exporter, err := newElasticExporter(cfg.(*Config), set.Logger) if err != nil { - return nil, fmt.Errorf("cannot configure Elastic APM metrics exporter: %v", err) + return nil, fmt.Errorf("cannot configure Elastic APM metrics exporter: %w", err) } return exporterhelper.NewMetricsExporter(cfg, set, func(ctx context.Context, input pmetric.Metrics) error { var errs error @@ -84,7 +84,7 @@ type elasticExporter struct { func newElasticExporter(config *Config, logger *zap.Logger) (*elasticExporter, error) { if err := config.Validate(); err != nil { - return nil, fmt.Errorf("invalid config: %s", err) + return nil, fmt.Errorf("invalid config: %w", err) } transport, err := newTransport(config) if err != nil { @@ -96,7 +96,7 @@ func newElasticExporter(config *Config, logger *zap.Logger) (*elasticExporter, e func newTransport(config *Config) (transport.Transport, error) { transport, err := transport.NewHTTPTransport() if err != nil { - return nil, fmt.Errorf("error creating HTTP transport: %v", err) + return nil, fmt.Errorf("error creating HTTP transport: %w", err) } tlsConfig, err := config.LoadTLSConfig() if err != nil { diff --git a/exporter/elasticexporter/go.mod b/exporter/elasticexporter/go.mod index 459b0307eeac..2d1d0d91d245 100644 --- a/exporter/elasticexporter/go.mod +++ b/exporter/elasticexporter/go.mod @@ -7,9 +7,9 @@ require ( github.com/stretchr/testify v1.7.2 go.elastic.co/apm v1.15.0 go.elastic.co/fastjson v1.1.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/exporter/elasticexporter/go.sum b/exporter/elasticexporter/go.sum index 97553c406e10..c0f7d031b01b 100644 --- a/exporter/elasticexporter/go.sum +++ b/exporter/elasticexporter/go.sum @@ -214,12 +214,12 @@ go.elastic.co/fastjson v1.1.0 h1:3MrGBWWVIxe/xvsbpghtkFoPciPhOCmjsR/HfwEeQR4= go.elastic.co/fastjson v1.1.0/go.mod h1:boNGISWMjQsUPy/t6yqt2/1Wx4YNPSe+mZjlyw9vKKI= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/elasticsearchexporter/README.md b/exporter/elasticsearchexporter/README.md index 399bc4752e2e..5b48c6c7f904 100644 --- a/exporter/elasticsearchexporter/README.md +++ b/exporter/elasticsearchexporter/README.md @@ -66,7 +66,8 @@ This exporter supports sending OpenTelemetry logs to [Elasticsearch](https://www verifying the server's identity, if TLS is enabled. - `cert_file` (optional): Client TLS certificate. - `key_file` (optional): Client TLS key. -- `insecure` (optional): Disable verification of the server's identity, if TLS +- `insecure` (optional): In gRPC when set to true, this is used to disable the client transport security. In HTTP, this disables verifying the server's certificate chain and host name. +- `insecure_skip_verify` (optional): Will enable TLS but not verify the certificate. is enabled. ### Node Discovery diff --git a/exporter/elasticsearchexporter/exporter_test.go b/exporter/elasticsearchexporter/exporter_test.go index 720d6794e6c7..c554a3588cd6 100644 --- a/exporter/elasticsearchexporter/exporter_test.go +++ b/exporter/elasticsearchexporter/exporter_test.go @@ -20,7 +20,6 @@ import ( "encoding/json" "errors" "net/http" - "os" "runtime" "sync" "testing" @@ -107,18 +106,8 @@ func TestExporter_New(t *testing.T) { env = map[string]string{defaultElasticsearchEnvName: ""} } - oldEnv := make(map[string]string, len(env)) - defer func() { - for k, v := range oldEnv { - os.Setenv(k, v) - } - }() - - for k := range env { - oldEnv[k] = os.Getenv(k) - } for k, v := range env { - os.Setenv(k, v) + t.Setenv(k, v) } exporter, err := newExporter(zap.NewNop(), test.config) diff --git a/exporter/elasticsearchexporter/go.mod b/exporter/elasticsearchexporter/go.mod index 3aabc687fdd7..2574531f2612 100644 --- a/exporter/elasticsearchexporter/go.mod +++ b/exporter/elasticsearchexporter/go.mod @@ -8,8 +8,8 @@ require ( github.com/elastic/go-structform v0.0.9 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 diff --git a/exporter/elasticsearchexporter/go.sum b/exporter/elasticsearchexporter/go.sum index 0cfa9b5ec5fe..3ddf96376c49 100644 --- a/exporter/elasticsearchexporter/go.sum +++ b/exporter/elasticsearchexporter/go.sum @@ -195,10 +195,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/elasticsearchexporter/utils_test.go b/exporter/elasticsearchexporter/utils_test.go index 549a2e28809b..4fc715b161d8 100644 --- a/exporter/elasticsearchexporter/utils_test.go +++ b/exporter/elasticsearchexporter/utils_test.go @@ -17,6 +17,7 @@ package elasticsearchexporter import ( "bytes" "encoding/json" + "errors" "fmt" "net/http" "net/http/httptest" @@ -184,7 +185,8 @@ func handleErr(fn func(http.ResponseWriter, *http.Request) error) http.HandlerFu return func(w http.ResponseWriter, r *http.Request) { err := fn(w, r) if err != nil { - if httpError, ok := err.(*httpTestError); ok { + httpError := &httpTestError{} + if errors.As(err, &httpError) { http.Error(w, httpError.Message(), httpError.Status()) } else { http.Error(w, err.Error(), http.StatusInternalServerError) diff --git a/exporter/f5cloudexporter/go.mod b/exporter/f5cloudexporter/go.mod index 3cd508a43867..6597a1278cc4 100644 --- a/exporter/f5cloudexporter/go.mod +++ b/exporter/f5cloudexporter/go.mod @@ -5,9 +5,9 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 - google.golang.org/api v0.82.0 + google.golang.org/api v0.83.0 ) require ( @@ -36,7 +36,7 @@ require ( github.com/rogpeppe/go-internal v1.8.1 // indirect github.com/rs/cors v1.8.2 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect @@ -44,11 +44,11 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.21.0 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 // indirect + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/exporter/f5cloudexporter/go.sum b/exporter/f5cloudexporter/go.sum index a58301d2a2ca..0983f1a4e3a9 100644 --- a/exporter/f5cloudexporter/go.sum +++ b/exporter/f5cloudexporter/go.sum @@ -323,10 +323,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= @@ -428,8 +428,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -462,7 +462,7 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -636,8 +636,8 @@ google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -720,8 +720,8 @@ google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= diff --git a/exporter/fileexporter/go.mod b/exporter/fileexporter/go.mod index 2d846d520fb7..b5b535f9f52c 100644 --- a/exporter/fileexporter/go.mod +++ b/exporter/fileexporter/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/exporter/fileexporter/go.sum b/exporter/fileexporter/go.sum index afee6003eec7..ee96c15387d6 100644 --- a/exporter/fileexporter/go.sum +++ b/exporter/fileexporter/go.sum @@ -184,10 +184,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/googlecloudexporter/README.md b/exporter/googlecloudexporter/README.md index 3cd08b766178..9c73f436f416 100644 --- a/exporter/googlecloudexporter/README.md +++ b/exporter/googlecloudexporter/README.md @@ -45,27 +45,31 @@ These instructions are to get you up and running quickly with the GCP exporter i # This results in a loop of unnecessary retries. For now, disable retry_on_failure. retry_on_failure: enabled: false - logging: - loglevel: debug + log: + default_log_name: opentelemetry.io/collector-exported-log processors: memory_limiter: - check_interval: 1s - limit_mib: 4000 - spike_limit_mib: 800 + check_interval: 1s + limit_percentage: 65 + spike_limit_percentage: 20 batch: - # Google Cloud Monitoring limits batches to 200 metric points. - send_batch_max_size: 200 - send_batch_size: 200 + resourcedetection: + detectors: [gcp] + timeout: 10s service: pipelines: traces: receivers: [otlp] processors: [memory_limiter, batch] - exporters: [googlecloud, logging] + exporters: [googlecloud] metrics: receivers: [otlp] processors: [memory_limiter, batch] - exporters: [googlecloud, logging] + exporters: [googlecloud] + logs: + receivers: [otlp] + processors: [memory_limiter, batch] + exporters: [googlecloud] ``` 3. **Set up credentials.** @@ -129,8 +133,36 @@ These instructions are to get you up and running quickly with the GCP exporter i The following configuration options are supported: -- `project` (optional): GCP project identifier. -- `user_agent` (optional): Override the user agent string sent on requests to Cloud Monitoring (currently only applies to metrics). Specify `{{version}}` to include the application version number. Defaults to `opentelemetry-collector-contrib {{version}}`. +- `project` (default = Fetch from Credentials): GCP project identifier. +- `user_agent` (default = `opentelemetry-collector-contrib {{version}}`): Override the user agent string sent on requests to Cloud Monitoring (currently only applies to metrics). Specify `{{version}}` to include the application version number. +- `impersonate` (optional): Configuration for service account impersonation + - `target_principal`: TargetPrincipal is the email address of the service account to impersonate. + - `subject`: (optional) Subject is the sub field of a JWT. This field should only be set if you wish to impersonate as a user. This feature is useful when using domain wide delegation. + - `delegates`: (default = []) Delegates are the service account email addresses in a delegation chain. Each service account must be granted roles/iam.serviceAccountTokenCreatoron the next service account in the chain. +- `metric` (optional): Configuration for sending metrics to Cloud Monitoring. + - `prefix` (default = `workload.googleapis.com`): The prefix to add to metrics. + - `endpoint` (default = monitoring.googleapis.com): Endpoint where metric data is going to be sent to. + - `use_insecure` (default = false): If true, use gRPC as their communication transport. Only has effect if Endpoint is not "". + - `known_domains` (default = [googleapis.com, kubernetes.io, istio.io, knative.dev]): If a metric belongs to one of these domains it does not get a prefix. + - `skip_create_descriptor` (default = false): If set to true, do not send metric descriptors to GCM. + - `instrumentation_library_labels` (default = true): If true, set the instrumentation_source and instrumentation_version labels. + - `create_service_timeseries` (default = false): If true, this will send all timeseries using `CreateServiceTimeSeries`. Implicitly, this sets `skip_create_descriptor` to true. + - `create_metric_descriptor_buffer_size` (default = 10): Buffer size for the channel which asynchronously calls CreateMetricDescriptor. + - `service_resource_labels` (default = true): If true, the exporter will copy OTel's service.name, service.namespace, and service.instance.id resource attributes into the GCM timeseries metric labels. + - `resource_filters` (default = []): If provided, resource attributes matching any filter will be included in metric labels. + - `prefix`: Match resource keys by prefix. + - `cumulative_normalization` (default = true): If true, normalizes cumulative metrics without start times or with explicit reset points by subtracting subsequent points from the initial point. It is enabled by default. Since it caches starting points, it may result inincreased memory usage. + - `sum_of_squared_deviation` (default = false): If true, enables calculation of an estimated sum of squared deviation. It is an estimate, and is not exact. +- `trace` (optional): Configuration for sending traces to Cloud Trace. + - `endpoint` (default = cloudtrace.googleapis.com): Endpoint where trace data is going to be sent to. + - `use_insecure` (default = false): If true. use gRPC as their communication transport. Only has effect if Endpoint is not "". Replaces `use_insecure`. + - `attribute_mappings` (optional): AttributeMappings determines how to map from OpenTelemetry attribute keys to Google Cloud Trace keys. By default, it changes http and service keys so that they appear more prominently in the UI. + - `key`: Key is the OpenTelemetry attribute key + - `replacement`: Replacement is the attribute sent to Google Cloud Trace +- `log` (optional): Configuration for sending metrics to Cloud Logging. + - `endpoint` (default = logging.googleapis.com): Endpoint where log data is going to be sent to. D + - `use_insecure` (default = false): If true, use gRPC as their communication transport. Only has effect if Endpoint is not "". + - `default_log_name` (optional): Defines a default name for log entries. If left unset, and a log entry does not have the `gcp.log_name` attribute set, the exporter will return an error processing that entry. - `retry_on_failure` (optional): Configuration for how to handle retries when sending data to Google Cloud fails. - `enabled` (default = true) - `initial_interval` (default = 5s): Time to wait after the first failure before retrying; ignored if `enabled` is `false` @@ -146,71 +178,6 @@ The following configuration options are supported: Note: These `retry_on_failure` and `sending_queue` are provided (and documented) by the [Exporter Helper](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/exporterhelper#configuration) -Additional configuration for the metric exporter: - -- `metric.endpoint` (optional): Endpoint where metric data is going to be sent to. Replaces `endpoint`. -- `metric.use_insecure` (optional): If true, use gRPC as their communication transport. Only has effect if Endpoint is not "". -- `metric.known_domains` (optional): If a metric belongs to one of these domains it does not get a prefix. -- `metric.skip_create_descriptor` (optional): If set to true, do not send metric descriptors to GCM. -- `metric.instrumentation_library_labels` (optional): If true, set the instrumentation_source and instrumentation_version labels. Defaults to true. -- `metric.create_service_timeseries` (optional): If true, this will send all timeseries using `CreateServiceTimeSeries`. Implicitly, this sets `skip_create_descriptor` to true. -- `metric.create_metric_descriptor_buffer_size` (optional): Buffer size for the channel which asynchronously calls CreateMetricDescriptor. Default is 10. -- `metric.service_resource_labels` (optional): If true, the exporter will copy OTel's service.name, service.namespace, and service.instance.id resource attributes into the GCM timeseries metric labels. Default is true. -- `metric.resource_filters` (optional): If provided, resource attributes matching any filter will be included in metric labels. Defaults to empty, which won't include any additional resource labels. - - `prefix`: Match resource keys by prefix - -Additional configuration added for the trace exporter: - -- `trace.endpoint` (optional): Endpoint where trace data is going to be sent to. Replaces `endpoint`. -- `trace.use_insecure` (optional): If true. use gRPC as their communication transport. Only has effect if Endpoint is not "". Replaces `use_insecure`. -- `trace.attribute_mappings` (optional): AttributeMappings determines how to map from OpenTelemetry attribute keys to Google Cloud Trace keys. By default, it changes http and service keys so that they appear more prominently in the UI. - -Additional configuration for the logging exporter: - -- `log.default_log_name` (optional): Defines a default name for log entries. If left unset, and a log entry does not have the `gcp.log_name` -attribute set, the exporter will return an error processing that entry. - -Example: - -```yaml -exporters: - googlecloud: - # Google Cloud Monitoring returns an error if any of the points are invalid, but still accepts the valid points. - # Retrying successfully sent points is guaranteed to fail because the points were already written. - # This results in a loop of unnecessary retries. For now, disable retry_on_failure. - retry_on_failure: - enabled: false - project: my-project - user_agent: my-collector {{version}} - trace: - endpoint: cloudtrace.googleapis.com - use_insecure: false - attribute_mappings: - - key: service.name - replacement: g.co/gae/app/module - metric: - endpoint: monitoring.googleapis.com - use_insecure: false - prefix: workload.googleapis.com - skip_create_descriptor: false - known_domains: - - mycustomdomain.googleapis.com - instrumentation_library_labels: true - service_resource_labels: true - create_service_timeseries: false - create_metric_descriptor_buffer_size: 10 - resource_filters: - - prefix: k8s.* - - sending_queue: - enabled: true - num_consumers: 2 - queue_size: 50 - - log: - default_log_name: my-app -``` - Beyond standard YAML configuration as outlined in the sections that follow, exporters that leverage the net/http package (all do today) also respect the following proxy environment variables: @@ -222,7 +189,7 @@ following proxy environment variables: If set at Collector start time then exporters, regardless of protocol, will or will not proxy traffic as defined by these environment variables. -### Logging Exporter +### Logging Example The logging exporter processes OpenTelemetry log entries and exports them to GCP Cloud Logging. Logs can be collected using one of the opentelemetry-collector-contrib log receivers, such as the [filelogreceiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/filelogreceiver). @@ -260,11 +227,11 @@ exporters: processors: memory_limiter: - check_interval: 1s - limit_mib: 4000 - spike_limit_mib: 800 + check_interval: 1s + limit_percentage: 65 + spike_limit_percentage: 20 resourcedetection: - detectors: [gce, gke] + detectors: [gcp] timeout: 10s attributes: # Override the default log name. `gcp.log_name` takes precedence @@ -335,12 +302,9 @@ The upstream [severity parser](../../pkg/stanza/docs/types/severity.md) (along with the [regex parser](../../pkg/stanza/docs/operators/regex_parser.md)) allows for additional flexibility in parsing log severity from incoming entries. -## Recommendations +## Multi-Project exporting -It is recommended to always run a [batch processor](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor) -and [memory limiter](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor) for tracing pipelines to ensure -optimal network usage and avoiding memory overruns. You may also want to run an additional -[sampler](../../processor/probabilisticsamplerprocessor), depending on your needs. +By default, the exporter sends telemetry to the project specified by `project` in the configuration. This can be overridden on a per-metrics basis using the `gcp.project.id` resource attribute. For example, if a metric has a label `project`, you could use the `groupbyattrs` processor to promote it to a resource label, and the `resource` processor to rename the attribute from `project` to `gcp.project.id`. ## Features and Feature-Gates @@ -352,34 +316,13 @@ The `exporter.googlecloud.OTLPDirect` is enabled by default starting in v0.50.0, If you are broken by changes described there, or have encountered an issue with the new implementation, please open an issue [here](https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/issues/new) -If you disable the feature-gate, you can continue to set the legacy configuration options: +If you disable the feature-gate, you can continue to set removed legacy configuration options: -- `project` (optional): GCP project identifier. - `endpoint` (optional): Endpoint where data is going to be sent to. -- `user_agent` (optional): Override the user agent string sent on requests to Cloud Monitoring (currently only applies to metrics). Specify `{{version}}` to include the application version number. Defaults to `opentelemetry-collector-contrib {{version}}`. - `use_insecure` (optional): If true. use gRPC as their communication transport. Only has effect if Endpoint is not "". - `timeout` (optional): Timeout for all API calls. If not set, defaults to 12 seconds. - `resource_mappings` (optional): ResourceMapping defines mapping of resources from source (OpenCensus) to target (Google Cloud). - `label_mappings` (optional): Optional flag signals whether we can proceed with transformation if a label is missing in the resource. -- `retry_on_failure` (optional): Configuration for how to handle retries when sending data to Google Cloud fails. - - `enabled` (default = true) - - `initial_interval` (default = 5s): Time to wait after the first failure before retrying; ignored if `enabled` is `false` - - `max_interval` (default = 30s): Is the upper bound on backoff; ignored if `enabled` is `false` - - `max_elapsed_time` (default = 120s): Is the maximum amount of time spent trying to send a batch; ignored if `enabled` is `false` -- `sending_queue` (optional): Configuration for how to buffer traces before sending. - - `enabled` (default = true) - - `num_consumers` (default = 10): Number of consumers that dequeue batches; ignored if `enabled` is `false` - - `queue_size` (default = 5000): Maximum number of batches kept in memory before data; ignored if `enabled` is `false`; - User should calculate this as `num_seconds * requests_per_second` where: - - `num_seconds` is the number of seconds to buffer in case of a backend outage - - `requests_per_second` is the average number of requests per seconds. - -Note: These `retry_on_failure` and `sending_queue` are provided (and documented) by the [Exporter Helper](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/exporterhelper#configuration) - -Additional configuration for the metric exporter: - -- `metric.prefix` (optional): MetricPrefix overrides the prefix / namespace of the Google Cloud metric type identifier. If not set, defaults to "custom.googleapis.com/opencensus/" -- `metric.skip_create_descriptor` (optional): Whether to skip creating the metric descriptor. [beta]:https://github.com/open-telemetry/opentelemetry-collector#beta [contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/exporter/googlecloudexporter/go.mod b/exporter/googlecloudexporter/go.mod index 6587801ee8b7..10f179eaf1c8 100644 --- a/exporter/googlecloudexporter/go.mod +++ b/exporter/googlecloudexporter/go.mod @@ -4,17 +4,17 @@ go 1.17 require ( contrib.go.opencensus.io/exporter/stackdriver v0.13.13 - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.30.2-0.20220512190557-875976f87023 + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2 github.com/census-instrumentation/opencensus-proto v0.3.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 - google.golang.org/api v0.82.0 - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 + google.golang.org/api v0.83.0 + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 ) @@ -25,9 +25,9 @@ require ( cloud.google.com/go/logging v1.4.2 // indirect cloud.google.com/go/monitoring v1.5.0 // indirect cloud.google.com/go/trace v1.2.0 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.6.1 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.30.1 // indirect - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.2.3 // indirect @@ -47,7 +47,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/prometheus v0.35.0 // indirect + github.com/prometheus/prometheus v0.36.1 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect @@ -56,9 +56,9 @@ require ( go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.21.0 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect - golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect + golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect diff --git a/exporter/googlecloudexporter/go.sum b/exporter/googlecloudexporter/go.sum index e95cb098edbe..07c33f49f92f 100644 --- a/exporter/googlecloudexporter/go.sum +++ b/exporter/googlecloudexporter/go.sum @@ -1,5 +1,3 @@ -bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= -bazil.org/fuse v0.0.0-20200407214033-5883e5a4b512/go.mod h1:FbcW6z/2VytnFDhZfumh8Ss8zxHE6qpMP5sHTRe0EaM= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= @@ -45,7 +43,6 @@ cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wq cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/logging v1.4.2 h1:Mu2Q75VBDQlW1HlBMjTX4X84UFR73G1TiLlRYc/b7tA= cloud.google.com/go/logging v1.4.2/go.mod h1:jco9QZSx8HiVVqLJReq7z7bVdj0P1Jb9PDFs63T+axo= @@ -66,93 +63,20 @@ cloud.google.com/go/trace v1.2.0/go.mod h1:Wc8y/uYyOhPy12KEnXG9XGrvfMz5F5SrYecQl contrib.go.opencensus.io/exporter/stackdriver v0.13.13 h1:3KLhsPyyFp1pfZPicg8e1VMSeztIyWm+aE+iZQ8b9Kg= contrib.go.opencensus.io/exporter/stackdriver v0.13.13/go.mod h1:5pSSGY0Bhuk7waTHuDf4aQ8D2DrhgETRo9fy6k3Xlzc= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/AdaLogics/go-fuzz-headers v0.0.0-20210715213245-6c3934b029d8/go.mod h1:CzsSbkDixRphAF5hS6wbMKq0eI6ccJRb7/A0M6JBnwg= -github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/azure-sdk-for-go v63.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= -github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= -github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= -github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= -github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= -github.com/Azure/go-autorest/autorest v0.11.18/go.mod h1:dSiJPy22c3u0OtOKDNttNgqpNFY/GeWa7GH/Pz56QRA= -github.com/Azure/go-autorest/autorest v0.11.25/go.mod h1:7l8ybrIdUmGqZMTD0sRtAr8NvbHjfofbf8RSP2q7w7U= -github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= -github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= -github.com/Azure/go-autorest/autorest/adal v0.9.13/go.mod h1:W/MM4U6nLxnIskrw4UwWzlHfGjwUS50aOsc/I3yuU8M= -github.com/Azure/go-autorest/autorest/adal v0.9.18/go.mod h1:XVVeme+LZwABT8K5Lc3hA4nAe8LDBVle26gTrguhhPQ= -github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= -github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= -github.com/Azure/go-autorest/autorest/mocks v0.4.2/go.mod h1:Vy7OitM9Kei0i1Oj+LvyAWMXJHeKH1MVlzFugfVrmyU= -github.com/Azure/go-autorest/autorest/to v0.4.0/go.mod h1:fE8iZBn7LQR7zH/9XU2NcPR4o9jEImooCeWJcYV/zLE= -github.com/Azure/go-autorest/autorest/validation v0.3.1/go.mod h1:yhLgjC0Wda5DYXl6JAsWyUe4KVNffhoDhG0zVzUMo3E= -github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/logger v0.2.1/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= -github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.30.2-0.20220512190557-875976f87023 h1:a5qaC/K40oknHppvTFqQZkLMY7XZSvWyxcG/T6W6DF8= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.30.2-0.20220512190557-875976f87023/go.mod h1:kXt5P2nDYWk6ltkQi+YmcGCNMwS54nnYfLm8jrU0APk= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.6.1 h1:LNl8Tg6N6qChoiM6lKC1Z44Z+CkPAdYx45L/lJDgThs= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.6.1/go.mod h1:ZFRHg4zuQuc6sQyx16A53fB7kxPvPguSeE8GFVpT6rQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.30.1 h1:JftlZfpIvptFTzSD/BXuoK9i0nT3D1GSz1EEBr+jjuM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.30.1/go.mod h1:j+FS9VBW3mwtHBmm9KOJEy5Tq68fCp7fE/R9bV/flIM= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= -github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= -github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= -github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= -github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= -github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= -github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= -github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= -github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= -github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= -github.com/Microsoft/hcsshim v0.8.20/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= -github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= -github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= -github.com/Microsoft/hcsshim v0.9.2/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= -github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= -github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= -github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= -github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2 h1:FNWwTVLRrrJIDmkkJiLEXcdKye09TxgRhQHXWGT709Y= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2/go.mod h1:Rb8oT91vuHT7MEyikxGyU7RaKypEwr3fBjoaBcmw0Y4= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 h1:Dg+BIoU7Xz5QAj9VgDyhl5sz8Uz1IE1O6NAdJ1/Lmyk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2/go.mod h1:vCKAVz9WbhvBYuqNignSpjoyMtBT/CFELC3z98onw4o= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 h1:lw6BPuBgZKGwl4jm8xrU7AGnK8ohy7UT9hPM1+S16ts= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2/go.mod h1:j+FS9VBW3mwtHBmm9KOJEy5Tq68fCp7fE/R9bV/flIM= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= -github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= -github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= -github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= -github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.3/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.43.11/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.43.31/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -163,52 +87,19 @@ github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.3.2/go.mod h1:72H 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/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/benbjohnson/clock v1.0.3/go.mod h1:bGMdMPoPVvcYyt1gHDf4J2KE153Yf9BuiUKYMaxlTDM= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= -github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= -github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= -github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= -github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= -github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= -github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= -github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0= -github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= -github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= -github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= -github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= -github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= -github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= -github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= -github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= -github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= -github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -219,168 +110,9 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= -github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= -github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= -github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= -github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= -github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= -github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= -github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= -github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= -github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= -github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= -github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= -github.com/containerd/cgroups v1.0.3/go.mod h1:/ofk34relqNjSGyqPrmEULrO4Sc8LJhvJmWbUCUKqj8= -github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= -github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= -github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= -github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= -github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= -github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= -github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= -github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= -github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= -github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= -github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= -github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= -github.com/containerd/containerd v1.6.1/go.mod h1:1nJz5xCZPusx6jJU8Frfct988y0NpumIq9ODB0kLtoE= -github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= -github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= -github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= -github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= -github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= -github.com/containerd/continuity v0.2.2/go.mod h1:pWygW9u7LtS1o4N/Tn0FoCFDIXZ7rxcMX7HX1Dmibvk= -github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= -github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= -github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= -github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= -github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= -github.com/containerd/go-cni v1.1.0/go.mod h1:Rflh2EJ/++BA2/vY5ao3K6WJRR/bZKsX123aPk+kUtA= -github.com/containerd/go-cni v1.1.3/go.mod h1:Rflh2EJ/++BA2/vY5ao3K6WJRR/bZKsX123aPk+kUtA= -github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= -github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= -github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= -github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= -github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= -github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= -github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= -github.com/containerd/imgcrypt v1.1.3/go.mod h1:/TPA1GIDXMzbj01yd8pIbQiLdQxed5ue1wb8bP7PQu4= -github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= -github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= -github.com/containerd/stargz-snapshotter/estargz v0.4.1/go.mod h1:x7Q9dg9QYb4+ELgxmo4gBUeJB0tl5dqH1Sdz0nJU1QM= -github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= -github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= -github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= -github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= -github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= -github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= -github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= -github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= -github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= -github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= -github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= -github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v1.0.1/go.mod h1:AKuhXbN5EzmD4yTNtfSsX3tPcmtrBI6QcRV0NiNt15Y= -github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= -github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= -github.com/containernetworking/plugins v1.0.1/go.mod h1:QHCfGpaTwYTbbH+nZXKVTxNBDZcxSOplJT5ico8/FLE= -github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= -github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= -github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= -github.com/containers/ocicrypt v1.1.2/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= -github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= -github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= -github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-iptables v0.6.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q= -github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= -github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= -github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= -github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= -github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= -github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= -github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgziApxA= -github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= -github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= -github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/dgryski/go-sip13 v0.0.0-20200911182023-62edffca9245/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= -github.com/digitalocean/godo v1.78.0/go.mod h1:GBmu8MkjZmNARE7IXRPmkbbnocNN8+uBm0xbEVw2LCs= -github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= -github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= -github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.14+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= -github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= -github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= -github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= -github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= -github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= -github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= -github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= -github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= -github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/edsrzf/mmap-go v1.1.0/go.mod h1:19H/e8pUPLicwkyNgOykDXkJ9F0MHE+Z52B8EIth78Q= -github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= -github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= -github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -389,143 +121,27 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= -github.com/envoyproxy/go-control-plane v0.10.1/go.mod h1:AY7fTTXNdv/aJ2O5jwpxAPOWUZ7hQAEvzN5Pf27BkQQ= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.7/go.mod h1:dyJXwwfPK2VSqiB9Klm1J6romD608Ba7Hij42vrOBCo= -github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= -github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= -github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= -github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= -github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= -github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= -github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= -github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= -github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= -github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= -github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= -github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= -github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= -github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= -github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= -github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= -github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= -github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= -github.com/go-openapi/loads v0.21.1/go.mod h1:/DtAMXXneXFjbQMGEtbamCZb+4x7eGwkvZCvBmwUG+g= -github.com/go-openapi/runtime v0.23.1/go.mod h1:AKurw9fNre+h3ELZfk6ILsfvPN+bvvlaU/M9q/r9hpk= -github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= -github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= -github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= -github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= -github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/strfmt v0.21.2/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= -github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= -github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= -github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/swag v0.21.1/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= -github.com/go-openapi/validate v0.21.0/go.mod h1:rjnrwK57VJ7A8xqfpAOEKRH8yQSGUriMu5/zuPSQ1hg= -github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= -github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= -github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA= -github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4= -github.com/go-resty/resty/v2 v2.1.1-0.20191201195748-d7b97669fe48/go.mod h1:dZGr0i9PLlaaTD4H/hoZIDjQ+r6xq8mgbRzHZf7f2J8= -github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= -github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= -github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= -github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= -github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= -github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= -github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= -github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= -github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= -github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= -github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= -github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= -github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= -github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= -github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= -github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= -github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= -github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= -github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= -github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= -github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= -github.com/goccy/go-yaml v1.9.5/go.mod h1:U/jl18uSupI5rdI2jmuCswEA2htH9eXfferR3KfscvA= -github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= -github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= -github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= -github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= -github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4= -github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -560,10 +176,8 @@ github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -579,11 +193,7 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= -github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= @@ -603,12 +213,8 @@ github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20220318212150-b2ab0324ddda/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= -github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= @@ -617,432 +223,102 @@ github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/Oth github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= -github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= -github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleinterns/cloud-operations-api-mock v0.0.0-20200709193332-a1e58c29bdd3 h1:eHv/jVY/JNop1xg2J9cBb4EzyMpWZoNCP1BslSAIkOI= -github.com/gophercloud/gophercloud v0.24.0/go.mod h1:Q8fZtyi5zZxPS/j9aj3sSxtvj41AdQMDwyo1myduD5c= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= -github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= -github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= -github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= -github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= -github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= -github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= -github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0= -github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms= -github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= -github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-immutable-radix v1.2.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= -github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= -github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= -github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc= -github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hetznercloud/hcloud-go v1.33.1/go.mod h1:XX/TQub3ge0yWR2yHWmnDVIrB+MQbda1pHxkUmDlUME= -github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= -github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= -github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= -github.com/intel/goresctrl v0.2.0/go.mod h1:+CZdzouYFn5EsxgqAQTEzMfwKwuc0fVdMrT9FCCAVRQ= -github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= -github.com/j-keck/arping v1.0.2/go.mod h1:aJbELhR92bSk7tp79AWM/ftfc90EfEi2bQJrbBFOsPw= -github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= -github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= -github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= -github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= -github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= -github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= -github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= -github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= -github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= -github.com/kolo/xmlrpc v0.0.0-20201022064351-38db28db192b/go.mod h1:pcaDhQK0/NJZEvtCO0qQPPropqV0sJOJ6YW7X+9kRwM= -github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= -github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII= -github.com/linode/linodego v1.4.0/go.mod h1:PVsRxSlOiJyvG4/scTszpmZDTdgS+to3X6eS8pRrWI8= -github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= -github.com/lyft/protoc-gen-star v0.6.0/go.mod h1:TGAoBVkt8w7MPG72TrKIu85MIdXwDuzJYeZuUPFPNwA= -github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= -github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= -github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= -github.com/mattn/go-shellwords v1.0.6/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= -github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= -github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= -github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= -github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= -github.com/miekg/dns v1.1.48/go.mod h1:e3IlAVfNqAllflbibAZEWOXOQ+Ynzk/dDozDxY7XnME= -github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= -github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= -github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= -github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= -github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= -github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= -github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= -github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= -github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= -github.com/moby/sys/signal v0.6.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= -github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= -github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= -github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= -github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= -github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/modocache/gover v0.0.0-20171022184752-b58185e213c5/go.mod h1:caMODM3PzxT8aQXRPkAt8xlV/e7d7w8GM5g0fa5F0D8= -github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= -github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= -github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= -github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= -github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= -github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.13.0/go.mod h1:+REjRxOmWfHCjfv9TTWB1jD1Frx4XydAD3zm1lskyM0= -github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= -github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= -github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= -github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= -github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= -github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= -github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= -github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= -github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= -github.com/opencontainers/runc v1.1.0/go.mod h1:Tj1hFw6eFWp/o33uxGf5yF2BX5yz2Z6iptFpuvbbKqc= -github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= -github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= -github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= -github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= -github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= -github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= -github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= -github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= -github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= -github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/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= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= -github.com/prometheus/alertmanager v0.24.0/go.mod h1:r6fy/D7FRuZh5YbnX6J3MBY0eI4Pb5yPYS7/bPSXXqI= -github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= -github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= -github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= -github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= -github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= -github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= -github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= -github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= -github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= -github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= -github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE= -github.com/prometheus/common/assets v0.1.0/go.mod h1:D17UVUE12bHbim7HzwUvtqm6gwBEaDQ0F+hIGbFbccI= -github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= -github.com/prometheus/exporter-toolkit v0.7.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= -github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= -github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= -github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= -github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= -github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.35.0 h1:N93oX6BrJ2iP3UuE2Uz4Lt+5BkUpaFer3L9CbADzesc= -github.com/prometheus/prometheus v0.35.0/go.mod h1:7HaLx5kEPKJ0GDgbODG0fZgXbQ8K/XjZNJXQmbmgQlY= -github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= -github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= -github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= -github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= -github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= -github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg= -github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= -github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= -github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= -github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= -github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= -github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= -github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= -github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= -github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= -github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= -github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= -github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= -github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= -github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= -github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= -github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= -github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= -github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= -github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= -github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= -github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= @@ -1052,67 +328,11 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= -github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= -github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= -github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= -github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= -github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= -github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= -github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= -github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= -github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= -github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= -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/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= -github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= -github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= -github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= -github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= -github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= -github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= -go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= -go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= -go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= -go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= -go.etcd.io/etcd/pkg/v3 v3.5.0/go.mod h1:UzJGatBQ1lXChBkQF0AuAtkRQMYnHubxAEYIrC3MSsE= -go.etcd.io/etcd/raft/v3 v3.5.0/go.mod h1:UFOHSIvO/nKwd4lhkwabrTD3cqW5yVyYYf/KlD00Szc= -go.etcd.io/etcd/server/v3 v3.5.0/go.mod h1:3Ah5ruV+M+7RZr0+Y/5mNLwC+eQlni+mQmOVdCRJoS4= -go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= -go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= -go.mongodb.org/mongo-driver v1.8.3/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= -go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -1121,98 +341,37 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= -go.opentelemetry.io/contrib v0.20.0 h1:ubFQUn0VCZ0gPwIoJfBJVpeBlyRMxu8Mm/huKWYd9p0= -go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.31.0/go.mod h1:PFmBsWbldL1kiWZk9+0LBZz2brhByaGsvp6pRICMlPE= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= -go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= -go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= -go.opentelemetry.io/otel v1.6.0/go.mod h1:bfJD2DZVw0LBxghOTlgnlI0CV3hLDu9XF/QKOUXMTQQ= -go.opentelemetry.io/otel v1.6.1/go.mod h1:blzUabWHkX6LJewxvadmzafgh/wnvBSDBdOuwkAtrWQ= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= -go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.6.1/go.mod h1:NEu79Xo32iVb+0gVNV8PMd7GoWqnyDXRlj04yFjqz40= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.3.0/go.mod h1:hO1KLR7jcKaDDKDkvI9dP/FIhpmna5lkqPUQdEjFAM8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.6.1/go.mod h1:YJ/JbY5ag/tSQFXzH3mtDmHqzF3aFn3DI/aB1n7pt4w= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0/go.mod h1:keUU7UfnwWTWpJ+FWnyqmogPa82nuU5VUANFq49hlMY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.6.1/go.mod h1:UJJXJj0rltNIemDMwkOJyggsvyMG9QHfJeFH0HS5JjM= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.3.0/go.mod h1:QNX1aly8ehqqX1LEa6YniTU7VY9I6R3X/oPxhGdTceE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.6.1/go.mod h1:DAKwdo06hFLc0U88O10x4xnb5sc7dDRDqRuiN+io8JE= -go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= -go.opentelemetry.io/otel/metric v0.28.0/go.mod h1:TrzsfQAmQaB1PDcdhBauLMk7nyyg9hm+GoQq/ekE9Iw= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= go.opentelemetry.io/otel/metric v0.30.0/go.mod h1:/ShZ7+TS4dHzDFmfi1kSXMhMVubNoP0oIaBp70J6UXU= -go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= -go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= -go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= -go.opentelemetry.io/otel/sdk v1.6.1/go.mod h1:IVYrddmFZ+eJqu2k38qD3WezFR2pymCzm8tdxyh3R4E= go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1B0= go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU= -go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= -go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= -go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= -go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= -go.opentelemetry.io/otel/trace v1.6.0/go.mod h1:qs7BrU5cZ8dXQHBGxHMOxwME/27YH2qEp4/+tZLLwJE= -go.opentelemetry.io/otel/trace v1.6.1/go.mod h1:RkFRM1m0puWIq10oxImnGEduNBzxiN7TXluRBtE+5j0= go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o= go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= -go.opentelemetry.io/proto/otlp v0.11.0/go.mod h1:QpEjXPrNQzrFDZgoTo49dgHR9RYRSrg3NAKnUGl9YpQ= -go.opentelemetry.io/proto/otlp v0.12.1/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= -go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= -go.uber.org/automaxprocs v1.5.1/go.mod h1:BF4eumQw0P9GtnuxxovUd06vwm1o18oMzFtK66vU6XU= -go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= -go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= -go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= -golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1248,34 +407,18 @@ golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= -golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1286,42 +429,26 @@ golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= -golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= -golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= -golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211209124913-491a49abca63/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1348,7 +475,6 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1356,61 +482,28 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1418,67 +511,34 @@ golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210831042530-f4d43177bf5e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210903071746-97244b99971b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1487,10 +547,7 @@ golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1503,44 +560,24 @@ 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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220224211638-0e9765cccd65/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= -golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= -golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= -golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1560,21 +597,17 @@ golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjs golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20200916195026-c9a70fc28ce3/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= @@ -1583,16 +616,12 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= -golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= @@ -1632,8 +661,8 @@ google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRR google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1642,14 +671,12 @@ google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCID google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= @@ -1658,7 +685,6 @@ google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvx google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= -google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -1667,21 +693,17 @@ google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= -google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1728,18 +750,14 @@ google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= -google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= -google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= -google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -1762,8 +780,6 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= -google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= @@ -1786,48 +802,20 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= -gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= -gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= -gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= -gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= -gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= -gopkg.in/telebot.v3 v3.0.0/go.mod h1:7rExV8/0mDDNu9epSrDm/8j22KLaActH1Tbee6YjzWg= -gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= -gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= -gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= -gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1835,69 +823,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= -k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= -k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= -k8s.io/api v0.22.5/go.mod h1:mEhXyLaSD1qTOf40rRiKXkc+2iCem09rWLlFwhCEiAs= -k8s.io/api v0.23.5/go.mod h1:Na4XuKng8PXJ2JsploYYrivXrINeTaycCGcYgF91Xm8= -k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= -k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= -k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= -k8s.io/apimachinery v0.22.5/go.mod h1:xziclGKwuuJ2RM5/rSFQSYAj0zdbci3DH8kj+WvyN0U= -k8s.io/apimachinery v0.23.5/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= -k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= -k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= -k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= -k8s.io/apiserver v0.22.5/go.mod h1:s2WbtgZAkTKt679sYtSudEQrTGWUSQAPe6MupLnlmaQ= -k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= -k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= -k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= -k8s.io/client-go v0.22.5/go.mod h1:cs6yf/61q2T1SdQL5Rdcjg9J1ElXSwbjSrW2vFImM4Y= -k8s.io/client-go v0.23.5/go.mod h1:flkeinTO1CirYgzMPRWxUCnV0G4Fbu2vLhYCObnt/r4= -k8s.io/code-generator v0.19.7/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= -k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= -k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= -k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= -k8s.io/component-base v0.22.5/go.mod h1:VK3I+TjuF9eaa+Ln67dKxhGar5ynVbwnGrUiNF4MqCI= -k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= -k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= -k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= -k8s.io/cri-api v0.23.1/go.mod h1:REJE3PSU0h/LOV1APBrupxrEJqnoxZC8KWzkBUHwrK4= -k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= -k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= -k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= -k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= -k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= -k8s.io/klog/v2 v2.9.0/go.mod h1:hy9LJ/NvuK+iVyP4Ehqva4HxZG/oXyIS3n3Jmire4Ec= -k8s.io/klog/v2 v2.30.0/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/klog/v2 v2.40.1/go.mod h1:y1WjHnz7Dj687irZUWR/WLkLc5N1YHtjLdmgWjndZn0= -k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= -k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= -k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= -k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= -k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= -k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= -k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= -sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= -sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= -sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/exporter/googlecloudpubsubexporter/go.mod b/exporter/googlecloudpubsubexporter/go.mod index a1fb3dcc8ec3..fadde7b1485a 100644 --- a/exporter/googlecloudpubsubexporter/go.mod +++ b/exporter/googlecloudpubsubexporter/go.mod @@ -6,11 +6,11 @@ require ( cloud.google.com/go/pubsub v1.22.2 github.com/google/uuid v1.3.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 - google.golang.org/api v0.82.0 - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 + google.golang.org/api v0.83.0 + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 google.golang.org/grpc v1.47.0 ) @@ -43,7 +43,7 @@ require ( go.opentelemetry.io/otel/trace v1.7.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/text v0.3.7 // indirect diff --git a/exporter/googlecloudpubsubexporter/go.sum b/exporter/googlecloudpubsubexporter/go.sum index cbabdf313586..e3a23624be08 100644 --- a/exporter/googlecloudpubsubexporter/go.sum +++ b/exporter/googlecloudpubsubexporter/go.sum @@ -327,10 +327,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= @@ -430,8 +430,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= 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-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -464,8 +464,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -643,8 +644,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -731,8 +732,8 @@ google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= diff --git a/exporter/googlemanagedprometheusexporter/Makefile b/exporter/googlemanagedprometheusexporter/Makefile new file mode 100644 index 000000000000..c1496226e590 --- /dev/null +++ b/exporter/googlemanagedprometheusexporter/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common \ No newline at end of file diff --git a/exporter/googlemanagedprometheusexporter/README.md b/exporter/googlemanagedprometheusexporter/README.md new file mode 100644 index 000000000000..a194e7316ade --- /dev/null +++ b/exporter/googlemanagedprometheusexporter/README.md @@ -0,0 +1,126 @@ +# Google Managed Service for Prometheus Exporter + +| Status | | +| ------------------------ |-----------------------| +| Stability | [alpha](https://github.com/open-telemetry/opentelemetry-collector#alpha) | +| Supported pipeline types | metrics | +| Distributions | [] | + +This exporter can be used to send metrics and traces to [Google Cloud Managed Service for Prometheus](https://cloud.google.com/stackdriver/docs/managed-prometheus). The difference between this exporter and the `googlecloud` exporter is that metrics sent with this exporter are queried using [promql](https://prometheus.io/docs/prometheus/latest/querying/basics/#querying-prometheus), rather than standard the standard MQL. + +This exporter is not the standard method of ingesting metrics into Google Cloud Managed Service for Prometheus, which is built on a drop-in replacement for the Prometheus server: https://github.com/GoogleCloudPlatform/prometheus. This exporter does not support the full range of Prometheus functionality, including the UI, recording and alerting rules, and can't be used with the GMP Operator, but does support sending metrics. + +## Configuration Reference + +The following configuration options are supported: + +- `project` (optional): GCP project identifier. +- `user_agent` (optional): Override the user agent string sent on requests to Cloud Monitoring (currently only applies to metrics). Specify `{{version}}` to include the application version number. Defaults to `opentelemetry-collector-contrib {{version}}`. +- `endpoint` (optional): Endpoint where metric data is going to be sent to. Replaces `endpoint`. +- `use_insecure` (optional): If true, use gRPC as their communication transport. Only has effect if Endpoint is not "". +- `retry_on_failure` (optional): Configuration for how to handle retries when sending data to Google Cloud fails. + - `enabled` (default = true) + - `initial_interval` (default = 5s): Time to wait after the first failure before retrying; ignored if `enabled` is `false` + - `max_interval` (default = 30s): Is the upper bound on backoff; ignored if `enabled` is `false` + - `max_elapsed_time` (default = 120s): Is the maximum amount of time spent trying to send a batch; ignored if `enabled` is `false` +- `sending_queue` (optional): Configuration for how to buffer traces before sending. + - `enabled` (default = true) + - `num_consumers` (default = 10): Number of consumers that dequeue batches; ignored if `enabled` is `false` + - `queue_size` (default = 5000): Maximum number of batches kept in memory before data; ignored if `enabled` is `false`; + User should calculate this as `num_seconds * requests_per_second` where: + - `num_seconds` is the number of seconds to buffer in case of a backend outage + - `requests_per_second` is the average number of requests per seconds. + +Note: These `retry_on_failure` and `sending_queue` are provided (and documented) by the [Exporter Helper](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/exporterhelper#configuration) + +## Example Configuration + +```yaml +receivers: + prometheus: + config: + scrape_configs: + # Add your prometheus scrape configuration here. + # Using kubernetes_sd_configs with namespaced resources (e.g. pod) + # ensures the namespace is set on your metrics. + - job_name: 'kubernetes-pods' + kubernetes_sd_configs: + - role: pod + relabel_configs: + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape] + action: keep + regex: true + - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_path] + action: replace + target_label: __metrics_path__ + regex: (.+) + - source_labels: [__address__, __meta_kubernetes_pod_annotation_prometheus_io_port] + action: replace + regex: (.+):(?:\d+);(\d+) + replacement: $$1:$$2 + target_label: __address__ + - action: labelmap + regex: __meta_kubernetes_pod_label_(.+) +processors: + # groupbyattrs promotes labels from metrics to resources, allowing them to + # be added to the prometheus_target monitored resource. + # This allows exporters which monitor multiple namespaces, such as + # kube-state-metrics, to override the namespace in the resource by setting + # metric labels. + groupbyattrs: + keys: + - namespace + - cluster + - location + batch: + # batch metrics before sending to reduce API usage + send_batch_max_size: 200 + send_batch_size: 200 + timeout: 5s + memory_limiter: + # drop metrics if memory usage gets too high + check_interval: 1s + limit_percentage: 65 + spike_limit_percentage: 20 + resourcedetection: + # detect cluster name and location + detectors: [gcp] + timeout: 10s +exporters: + googlemanagedprometheus: + +service: + pipelines: + metrics: + receivers: [prometheus] + processors: [groupbyattrs, batch, memory_limiter, resourcedetection] + exporters: [googlemanagedprometheus] +``` + +## Resource Attribute Handling + +The Google Managed Prometheus exporter maps metrics to the +[prometheus_target](https://cloud.google.com/monitoring/api/resources#tag_prometheus_target) +monitored resource. The logic for mapping to monitored resources is designed to +be used with the prometheus receiver, but can be used with other receivers as +well. To avoid collisions (i.e. "duplicate timeseries enountered" errors), you +need to ensure the prometheus_target resource uniquely identifies the source of +metrics. The exporter uses the following resource attributes to determine +monitored resource: + +* location: [`location` (see `groupbyattrs` config above), `cloud.availability_zone`, `cloud.region`] +* cluster: [`cluster` (see `groupbyattrs` config above), `k8s.cluster.name`] +* namespace: [`namespace` (see `groupbyattrs` config above), `k8s.namespace.name`] +* job: [`service.name` + `service.namespace`] +* instance: [`service.instance.id`] + +In the configuration above, `cloud.availability_zone`, `cloud.region`, and +`k8s.cluster.name` are detected using the `resourcedetection` processor with +the `gcp` detector. The prometheus receiver sets `service.name` to the +configured `job_name`, and `service.instance.id` is set to the scrape target's +`instance`. The prometheus receiver sets `k8s.namespace.name` when using +`role: pod`. The `groupbyattrs` processor promotes `location`, `cluster`, and +`namespace` labels on metrics to resource labels, which allows overriding (e.g. +using prometheus metric_relabel_configs) the attributes discovered by other +receivers or processors. This is useful when metric exporters already have +`location`, `cluster`, or `namespace` labels, such as Kube-state-metrics. diff --git a/exporter/googlemanagedprometheusexporter/config.go b/exporter/googlemanagedprometheusexporter/config.go new file mode 100644 index 000000000000..273664888792 --- /dev/null +++ b/exporter/googlemanagedprometheusexporter/config.go @@ -0,0 +1,72 @@ +// 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 googlemanagedprometheusexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter" + +import ( + "fmt" + + "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector" + "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/exporter/exporterhelper" +) + +// Config defines configuration for Google Cloud Managed Service for Prometheus exporter. +type Config struct { + config.ExporterSettings `mapstructure:",squash"` + GMPConfig `mapstructure:",squash"` + + // Timeout for all API calls. If not set, defaults to 12 seconds. + exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. + exporterhelper.QueueSettings `mapstructure:"sending_queue"` + exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` +} + +// GMPConfig is a subset of the collector config applicable to the GMP exporter. +type GMPConfig struct { + ProjectID string `mapstructure:"project"` + UserAgent string `mapstructure:"user_agent"` + ClientConfig collector.ClientConfig `mapstructure:",squash"` +} + +func (c *GMPConfig) toCollectorConfig() collector.Config { + // start with whatever the default collector config is. + cfg := collector.DefaultConfig() + // hard-code some config options to make it work with GMP + cfg.MetricConfig.Prefix = "prometheus.googleapis.com" + cfg.MetricConfig.SkipCreateMetricDescriptor = true + cfg.MetricConfig.InstrumentationLibraryLabels = false + cfg.MetricConfig.ServiceResourceLabels = false + // Update metric naming to match GMP conventions + cfg.MetricConfig.GetMetricName = googlemanagedprometheus.GetMetricName + // Map to the prometheus_target monitored resource + cfg.MetricConfig.MapMonitoredResource = googlemanagedprometheus.MapToPrometheusTarget + cfg.MetricConfig.EnableSumOfSquaredDeviation = true + // map the GMP config's fields to the collector config + cfg.ProjectID = c.ProjectID + cfg.UserAgent = c.UserAgent + cfg.MetricConfig.ClientConfig = c.ClientConfig + return cfg +} + +func (cfg *Config) Validate() error { + if err := cfg.ExporterSettings.Validate(); err != nil { + return fmt.Errorf("exporter settings are invalid :%w", err) + } + if err := collector.ValidateConfig(cfg.toCollectorConfig()); err != nil { + return fmt.Errorf("exporter settings are invalid :%w", err) + } + return nil +} diff --git a/exporter/googlemanagedprometheusexporter/config_test.go b/exporter/googlemanagedprometheusexporter/config_test.go new file mode 100644 index 000000000000..deeb20bfacaf --- /dev/null +++ b/exporter/googlemanagedprometheusexporter/config_test.go @@ -0,0 +1,69 @@ +// 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 googlemanagedprometheusexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter" + +import ( + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.opentelemetry.io/collector/service/servicetest" +) + +func TestLoadConfig(t *testing.T) { + factories, err := componenttest.NopFactories() + assert.Nil(t, err) + + factory := NewFactory() + factories.Exporters[typeStr] = factory + cfg, err := servicetest.LoadConfigAndValidate(filepath.Join("testdata", "config.yaml"), factories) + + require.NoError(t, err) + require.NotNil(t, cfg) + + assert.Equal(t, len(cfg.Exporters), 2) + + r0 := cfg.Exporters[config.NewComponentID(typeStr)].(*Config) + assert.Equal(t, r0, factory.CreateDefaultConfig().(*Config)) + + r1 := cfg.Exporters[config.NewComponentIDWithName(typeStr, "customname")].(*Config) + assert.Equal(t, r1, + &Config{ + ExporterSettings: config.NewExporterSettings(config.NewComponentIDWithName(typeStr, "customname")), + TimeoutSettings: exporterhelper.TimeoutSettings{ + Timeout: 20 * time.Second, + }, + GMPConfig: GMPConfig{ + ProjectID: "my-project", + UserAgent: "opentelemetry-collector-contrib {{version}}", + }, + RetrySettings: exporterhelper.RetrySettings{ + Enabled: true, + InitialInterval: 10 * time.Second, + MaxInterval: 1 * time.Minute, + MaxElapsedTime: 10 * time.Minute, + }, + QueueSettings: exporterhelper.QueueSettings{ + Enabled: true, + NumConsumers: 2, + QueueSize: 10, + }, + }) +} diff --git a/exporter/googlemanagedprometheusexporter/factory.go b/exporter/googlemanagedprometheusexporter/factory.go new file mode 100644 index 000000000000..eec990d67db9 --- /dev/null +++ b/exporter/googlemanagedprometheusexporter/factory.go @@ -0,0 +1,72 @@ +// 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 googlemanagedprometheusexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter" + +import ( + "context" + "time" + + "github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/exporter/exporterhelper" +) + +const ( + // The value of "type" key in configuration. + typeStr = "googlemanagedprometheus" + defaultTimeout = 12 * time.Second // Consistent with Cloud Monitoring's timeout +) + +// NewFactory creates a factory for the googlemanagedprometheus exporter +func NewFactory() component.ExporterFactory { + return component.NewExporterFactory( + typeStr, + createDefaultConfig, + component.WithMetricsExporter(createMetricsExporter), + ) +} + +// createDefaultConfig creates the default configuration for exporter. +func createDefaultConfig() config.Exporter { + return &Config{ + ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)), + TimeoutSettings: exporterhelper.TimeoutSettings{Timeout: defaultTimeout}, + RetrySettings: exporterhelper.NewDefaultRetrySettings(), + QueueSettings: exporterhelper.NewDefaultQueueSettings(), + } +} + +// createMetricsExporter creates a metrics exporter based on this config. +func createMetricsExporter( + ctx context.Context, + params component.ExporterCreateSettings, + cfg config.Exporter) (component.MetricsExporter, error) { + eCfg := cfg.(*Config) + mExp, err := collector.NewGoogleCloudMetricsExporter(ctx, eCfg.GMPConfig.toCollectorConfig(), params.TelemetrySettings.Logger, params.BuildInfo.Version, eCfg.Timeout) + if err != nil { + return nil, err + } + return exporterhelper.NewMetricsExporter( + cfg, + params, + mExp.PushMetrics, + exporterhelper.WithShutdown(mExp.Shutdown), + // Disable exporterhelper Timeout, since we are using a custom mechanism + // within exporter itself + exporterhelper.WithTimeout(exporterhelper.TimeoutSettings{Timeout: 0}), + exporterhelper.WithQueue(eCfg.QueueSettings), + exporterhelper.WithRetry(eCfg.RetrySettings)) +} diff --git a/exporter/googlemanagedprometheusexporter/factory_test.go b/exporter/googlemanagedprometheusexporter/factory_test.go new file mode 100644 index 000000000000..254b2ba6a7cd --- /dev/null +++ b/exporter/googlemanagedprometheusexporter/factory_test.go @@ -0,0 +1,51 @@ +// 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 googlemanagedprometheusexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter" + +import ( + "context" + "os" + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtest" +) + +func TestCreateDefaultConfig(t *testing.T) { + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + assert.NotNil(t, cfg, "failed to create default config") + assert.NoError(t, configtest.CheckConfigStruct(cfg)) +} + +func TestCreateExporter(t *testing.T) { + if os.Getenv("GOOGLE_APPLICATION_CREDENTIALS") == "" { + t.Skip("Default credentials not set, skip creating Google Cloud exporter") + } + ctx := context.Background() + factory := NewFactory() + cfg := factory.CreateDefaultConfig() + eCfg := cfg.(*Config) + eCfg.ProjectID = "test" + + te, err := factory.CreateTracesExporter(ctx, componenttest.NewNopExporterCreateSettings(), eCfg) + assert.NoError(t, err) + assert.NotNil(t, te, "failed to create trace exporter") + + me, err := factory.CreateMetricsExporter(ctx, componenttest.NewNopExporterCreateSettings(), eCfg) + assert.NoError(t, err) + assert.NotNil(t, me, "failed to create metrics exporter") +} diff --git a/exporter/googlemanagedprometheusexporter/go.mod b/exporter/googlemanagedprometheusexporter/go.mod new file mode 100644 index 000000000000..eb4ffb2ace72 --- /dev/null +++ b/exporter/googlemanagedprometheusexporter/go.mod @@ -0,0 +1,58 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter + +go 1.17 + +require ( + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2 + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.32.2 + github.com/stretchr/testify v1.7.2 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 +) + +require ( + cloud.google.com/go v0.100.2 // indirect + cloud.google.com/go/compute v1.5.0 // indirect + cloud.google.com/go/logging v1.4.2 // indirect + cloud.google.com/go/monitoring v1.4.0 // indirect + cloud.google.com/go/trace v1.2.0 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/go-logr/logr v1.2.3 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.7 // indirect + github.com/googleapis/gax-go/v2 v2.2.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/knadh/koanf v1.4.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + go.opencensus.io v0.23.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect + go.opentelemetry.io/otel v1.7.0 // indirect + go.opentelemetry.io/otel/metric v0.30.0 // indirect + go.opentelemetry.io/otel/sdk v1.7.0 // indirect + go.opentelemetry.io/otel/trace v1.7.0 // indirect + go.uber.org/atomic v1.9.0 // indirect + go.uber.org/multierr v1.8.0 // indirect + go.uber.org/zap v1.21.0 // indirect + golang.org/x/net v0.0.0-20220325170049-de3da57026de // indirect + golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect + golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/api v0.74.0 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20220405205423-9d709892a2bf // indirect + google.golang.org/grpc v1.47.0 // indirect + google.golang.org/protobuf v1.28.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/exporter/googlemanagedprometheusexporter/go.sum b/exporter/googlemanagedprometheusexporter/go.sum new file mode 100644 index 000000000000..36b2cdffbbb5 --- /dev/null +++ b/exporter/googlemanagedprometheusexporter/go.sum @@ -0,0 +1,781 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= +cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= +cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= +cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= +cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= +cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= +cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= +cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= +cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= +cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= +cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= +cloud.google.com/go v0.100.2 h1:t9Iw5QH5v4XtlEQaCtUY7x6sCABps8sW0acw7e2WQ6Y= +cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= +cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= +cloud.google.com/go/compute v1.5.0 h1:b1zWmYuuHz7gO9kDcM/EpHGr06UgsYNRpNJzI2kFiLM= +cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/logging v1.4.2 h1:Mu2Q75VBDQlW1HlBMjTX4X84UFR73G1TiLlRYc/b7tA= +cloud.google.com/go/logging v1.4.2/go.mod h1:jco9QZSx8HiVVqLJReq7z7bVdj0P1Jb9PDFs63T+axo= +cloud.google.com/go/monitoring v1.4.0 h1:05+IuNMbh40hbxcqQ4SnynbwZbLG1Wc9dysIJxnfv7U= +cloud.google.com/go/monitoring v1.4.0/go.mod h1:y6xnxfwI3hTFWOdkOaD7nfJVlwuC3/mS/5kvtT131p4= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/trace v1.2.0 h1:oIaB4KahkIUOpLSAAjEJ8y2desbjY/x/RfP4O3KAtTI= +cloud.google.com/go/trace v1.2.0/go.mod h1:Wc8y/uYyOhPy12KEnXG9XGrvfMz5F5SrYecQlbW1rwM= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2 h1:FNWwTVLRrrJIDmkkJiLEXcdKye09TxgRhQHXWGT709Y= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2/go.mod h1:Rb8oT91vuHT7MEyikxGyU7RaKypEwr3fBjoaBcmw0Y4= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.32.2 h1:/U4z1upRwp3XEUldq+4LfKEcuc0kH8ZsB95jQ2MrcgQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.32.2/go.mod h1:Dbl28z/FsamWrRT9cwLwWxS1zQUTOkRzibiLSQ8ixNg= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 h1:Dg+BIoU7Xz5QAj9VgDyhl5sz8Uz1IE1O6NAdJ1/Lmyk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2/go.mod h1:vCKAVz9WbhvBYuqNignSpjoyMtBT/CFELC3z98onw4o= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 h1:lw6BPuBgZKGwl4jm8xrU7AGnK8ohy7UT9hPM1+S16ts= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2/go.mod h1:j+FS9VBW3mwtHBmm9KOJEy5Tq68fCp7fE/R9bV/flIM= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= +github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= +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/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= +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/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= +github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= +github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= +github.com/googleapis/gax-go/v2 v2.2.0 h1:s7jOdKSaksJVOxE0Y/S32otcfiP+UQ0cL8/GTKaONwE= +github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= +github.com/googleinterns/cloud-operations-api-mock v0.0.0-20200709193332-a1e58c29bdd3 h1:eHv/jVY/JNop1xg2J9cBb4EzyMpWZoNCP1BslSAIkOI= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= +github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= +github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.7.0 h1:7utD74fnzVc/cpcyy8sjrlFr5vYpypUixARcHIMIGuI= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= +go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= +go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= +go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= +go.opentelemetry.io/otel/metric v0.30.0/go.mod h1:/ShZ7+TS4dHzDFmfi1kSXMhMVubNoP0oIaBp70J6UXU= +go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1B0= +go.opentelemetry.io/otel/sdk v1.7.0/go.mod h1:uTEOTwaqIVuTGiJN7ii13Ibp75wJmYUDe374q6cZwUU= +go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o= +go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220325170049-de3da57026de h1:pZB1TWnKi+o4bENlbzAgLrEbY4RMYmUIRobMcSmfeYc= +golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a h1:qfl7ob3DIEs3Ml9oLuPwY2N04gymzAW04WsUQHIClgM= +golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210503080704-8803ae5d1324/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886 h1:eJv7u3ksNXoLbGSKuv2s/SIO4tJVxc/A+MTpzxDgz/Q= +golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= +google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= +google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= +google.golang.org/api v0.46.0/go.mod h1:ceL4oozhkAiTID8XMmJBsIxID/9wMXJVVFXPg4ylg3I= +google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= +google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= +google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= +google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= +google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= +google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= +google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= +google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= +google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= +google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= +google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= +google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= +google.golang.org/api v0.74.0 h1:ExR2D+5TYIrMphWgs5JCgwRhEDlPDXXrLwHHMgPHTXE= +google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= +google.golang.org/genproto v0.0.0-20210429181445-86c259c2b4ab/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210517163617-5e0236093d7a/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= +google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= +google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= +google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= +google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= +google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= +google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= +google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= +google.golang.org/genproto v0.0.0-20220405205423-9d709892a2bf h1:JTjwKJX9erVpsw17w+OIPP7iAgEkN/r8urhWSunEDTs= +google.golang.org/genproto v0.0.0-20220405205423-9d709892a2bf/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= +google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= +google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/exporter/googlemanagedprometheusexporter/testdata/config.yaml b/exporter/googlemanagedprometheusexporter/testdata/config.yaml new file mode 100644 index 000000000000..ba2db05a3da6 --- /dev/null +++ b/exporter/googlemanagedprometheusexporter/testdata/config.yaml @@ -0,0 +1,30 @@ +receivers: + nop: + +processors: + nop: + +exporters: + googlemanagedprometheus: + googlemanagedprometheus/customname: + project: my-project + user_agent: opentelemetry-collector-contrib {{version}} + timeout: 20s + sending_queue: + enabled: true + num_consumers: 2 + queue_size: 10 + retry_on_failure: + enabled: true + initial_interval: 10s + max_interval: 60s + max_elapsed_time: 10m + + +service: + pipelines: + traces: + receivers: [nop] + processors: [nop] + exporters: [googlemanagedprometheus] + diff --git a/exporter/honeycombexporter/README.md b/exporter/honeycombexporter/README.md index a33d3b0229e2..5a927d76dfa6 100644 --- a/exporter/honeycombexporter/README.md +++ b/exporter/honeycombexporter/README.md @@ -1,4 +1,10 @@ # Honeycomb Exporter +# Deprecated Honeycomb Exporter +| Status | | +| ------------------------ |------------------| +| Stability | [deprecated] | +| Supported pipeline types | traces | +| Distributions | [contrib] | **NOTE:** Honeycomb now supports OTLP ingest directly. This means you can use an [OTLP](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/otlpexporter) exporter and no longer need this exporter to send data to Honeycomb. @@ -43,3 +49,6 @@ exporters: num_consumers: 10 queue_size: 10000 ``` + +[deprecated]:https://github.com/open-telemetry/opentelemetry-collector#deprecated +[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib \ No newline at end of file diff --git a/exporter/honeycombexporter/factory.go b/exporter/honeycombexporter/factory.go index 1ba88ef3567e..b874644ef735 100644 --- a/exporter/honeycombexporter/factory.go +++ b/exporter/honeycombexporter/factory.go @@ -16,10 +16,12 @@ package honeycombexporter // import "github.com/open-telemetry/opentelemetry-col import ( "context" + "sync" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/exporter/exporterhelper" + "go.uber.org/zap" ) const ( @@ -27,6 +29,8 @@ const ( typeStr = "honeycomb" ) +var once sync.Once + // NewFactory creates a factory for Honeycomb exporter. func NewFactory() component.ExporterFactory { return component.NewExporterFactory( @@ -35,6 +39,12 @@ func NewFactory() component.ExporterFactory { component.WithTracesExporter(createTracesExporter)) } +func logDeprecation(logger *zap.Logger) { + once.Do(func() { + logger.Warn("Honeycomb exporter is deprecated and will be removed in future versions.") + }) +} + func createDefaultConfig() config.Exporter { return &Config{ ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)), @@ -59,6 +69,7 @@ func createTracesExporter( return nil, err } + logDeprecation(set.Logger) return exporterhelper.NewTracesExporter( cfg, set, diff --git a/exporter/honeycombexporter/go.mod b/exporter/honeycombexporter/go.mod index 2302a83c48a0..4707d76365e1 100644 --- a/exporter/honeycombexporter/go.mod +++ b/exporter/honeycombexporter/go.mod @@ -1,3 +1,4 @@ +// Deprecated: honeycombexporter exporter is deprecated and will be removed in future versions. module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombexporter go 1.17 @@ -7,8 +8,8 @@ require ( github.com/honeycombio/libhoney-go v1.15.8 github.com/klauspost/compress v1.15.6 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.28.0 diff --git a/exporter/honeycombexporter/go.sum b/exporter/honeycombexporter/go.sum index a531e13262ca..d77dab3d72f6 100644 --- a/exporter/honeycombexporter/go.sum +++ b/exporter/honeycombexporter/go.sum @@ -214,10 +214,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/humioexporter/config.go b/exporter/humioexporter/config.go index d3f0c9d77461..d175da7d517b 100644 --- a/exporter/humioexporter/config.go +++ b/exporter/humioexporter/config.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:gocritic package humioexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/humioexporter" import ( @@ -35,7 +34,7 @@ const ( // LogsConfig represents the Humio configuration settings specific to logs type LogsConfig struct { - //Ingest token for identifying and authorizing with a Humio repository + // Ingest token for identifying and authorizing with a Humio repository IngestToken string `mapstructure:"ingest_token"` // The name of a custom log parser to use, if no parser is associated with the ingest token @@ -44,7 +43,7 @@ type LogsConfig struct { // TracesConfig represents the Humio configuration settings specific to traces type TracesConfig struct { - //Ingest token for identifying and authorizing with a Humio repository + // Ingest token for identifying and authorizing with a Humio repository IngestToken string `mapstructure:"ingest_token"` // Whether to use Unix timestamps, or to fall back to ISO 8601 formatted strings diff --git a/exporter/humioexporter/config_test.go b/exporter/humioexporter/config_test.go index 58c267e38f64..6560e4957895 100644 --- a/exporter/humioexporter/config_test.go +++ b/exporter/humioexporter/config_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:gocritic package humioexporter import ( @@ -311,7 +310,7 @@ func TestValidate(t *testing.T) { } func TestSanitizeValid(t *testing.T) { - //Arrange + // Arrange cfg := &Config{ ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)), HTTPClientSettings: confighttp.HTTPClientSettings{ @@ -340,7 +339,7 @@ func TestSanitizeValid(t *testing.T) { } func TestSanitizeCustomHeaders(t *testing.T) { - //Arrange + // Arrange cfg := &Config{ ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)), HTTPClientSettings: confighttp.HTTPClientSettings{ @@ -366,7 +365,7 @@ func TestSanitizeCustomHeaders(t *testing.T) { } func TestSanitizeNoCompression(t *testing.T) { - //Arrange + // Arrange cfg := &Config{ ExporterSettings: config.NewExporterSettings(config.NewComponentID(typeStr)), DisableCompression: true, diff --git a/exporter/humioexporter/go.mod b/exporter/humioexporter/go.mod index b122001d48ab..99edc205f51b 100644 --- a/exporter/humioexporter/go.mod +++ b/exporter/humioexporter/go.mod @@ -4,9 +4,9 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 ) diff --git a/exporter/humioexporter/go.sum b/exporter/humioexporter/go.sum index 10392c98220b..11be3737291c 100644 --- a/exporter/humioexporter/go.sum +++ b/exporter/humioexporter/go.sum @@ -278,7 +278,6 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mostynb/go-grpc-compression v1.1.16 h1:D9tGUINmcII049pxOj9dl32Fzhp26TrDVQXECoKJqQg= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= @@ -373,13 +372,12 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/contrib/zpages v0.32.0 h1:AVKTx5ppWDaem7A61HFsO1T3CK/t6kFRQoZQMj0/TW4= diff --git a/exporter/influxdbexporter/go.mod b/exporter/influxdbexporter/go.mod index 44441168799e..a13684b18803 100644 --- a/exporter/influxdbexporter/go.mod +++ b/exporter/influxdbexporter/go.mod @@ -7,8 +7,8 @@ require ( github.com/influxdata/influxdb-observability/otel2influx v0.2.21-0.20220517160208-05f925d616de github.com/influxdata/line-protocol/v2 v2.2.1 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/exporter/influxdbexporter/go.sum b/exporter/influxdbexporter/go.sum index d88fda84109f..4e9915d94d0d 100644 --- a/exporter/influxdbexporter/go.sum +++ b/exporter/influxdbexporter/go.sum @@ -216,10 +216,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/jaegerexporter/go.mod b/exporter/jaegerexporter/go.mod index 66c3f5e3648f..07bb30813c0a 100644 --- a/exporter/jaegerexporter/go.mod +++ b/exporter/jaegerexporter/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.47.0 ) @@ -37,7 +37,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/exporter/jaegerexporter/go.sum b/exporter/jaegerexporter/go.sum index 6160f229aa9c..d6bebb999e31 100644 --- a/exporter/jaegerexporter/go.sum +++ b/exporter/jaegerexporter/go.sum @@ -218,12 +218,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/jaegerthrifthttpexporter/factory.go b/exporter/jaegerthrifthttpexporter/factory.go index d007dbc7afed..21c9328fa0dd 100644 --- a/exporter/jaegerthrifthttpexporter/factory.go +++ b/exporter/jaegerthrifthttpexporter/factory.go @@ -57,7 +57,7 @@ func createTracesExporter( _, err := url.ParseRequestURI(expCfg.HTTPClientSettings.Endpoint) if err != nil { // TODO: Improve error message, see #215 - err = fmt.Errorf("%q config requires a valid \"endpoint\": %v", expCfg.ID().String(), err) + err = fmt.Errorf("%q config requires a valid \"endpoint\": %w", expCfg.ID().String(), err) return nil, err } diff --git a/exporter/jaegerthrifthttpexporter/go.mod b/exporter/jaegerthrifthttpexporter/go.mod index 6d732c810c8a..14869378b45f 100644 --- a/exporter/jaegerthrifthttpexporter/go.mod +++ b/exporter/jaegerthrifthttpexporter/go.mod @@ -7,8 +7,8 @@ require ( github.com/jaegertracing/jaeger v1.35.1 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( @@ -36,7 +36,7 @@ require ( github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/exporter/jaegerthrifthttpexporter/go.sum b/exporter/jaegerthrifthttpexporter/go.sum index 753d862b0927..fa8cb925fde1 100644 --- a/exporter/jaegerthrifthttpexporter/go.sum +++ b/exporter/jaegerthrifthttpexporter/go.sum @@ -202,12 +202,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/kafkaexporter/go.mod b/exporter/kafkaexporter/go.mod index 96a893bf0a91..c215869b8c09 100644 --- a/exporter/kafkaexporter/go.mod +++ b/exporter/kafkaexporter/go.mod @@ -3,17 +3,17 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkae go 1.17 require ( - github.com/Shopify/sarama v1.34.0 - github.com/aws/aws-sdk-go v1.44.28 + github.com/Shopify/sarama v1.34.1 + github.com/aws/aws-sdk-go v1.44.33 github.com/gogo/protobuf v1.3.2 github.com/jaegertracing/jaeger v1.35.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.53.0 github.com/stretchr/testify v1.7.2 github.com/xdg-go/scram v1.1.1 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/exporter/kafkaexporter/go.sum b/exporter/kafkaexporter/go.sum index bb4d1f3d3607..fda6550037a8 100644 --- a/exporter/kafkaexporter/go.sum +++ b/exporter/kafkaexporter/go.sum @@ -1,18 +1,55 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/HdrHistogram/hdrhistogram-go v1.0.1 h1:GX8GAYDuhlFQnI2fRDHQhTlkHMz8bEn0jTI6LJU0mpw= -github.com/Shopify/sarama v1.34.0 h1:j4zTaFHFnfvuV2fdLZyXqIg0Tu4Mzl9f064Z5/H+o4o= -github.com/Shopify/sarama v1.34.0/go.mod h1:V2ceE9UupUf4/oP1Z38SI49fAnD0/MtkqDDHvolIeeQ= -github.com/Shopify/toxiproxy/v2 v2.3.0 h1:62YkpiP4bzdhKMH+6uC5E95y608k3zDwdzuBMsnn3uQ= -github.com/Shopify/toxiproxy/v2 v2.3.0/go.mod h1:KvQTtB6RjCJY4zqNJn7C7JDFgsG5uoHYDirfUfpIm0c= +github.com/Shopify/sarama v1.34.1 h1:pVCQO7BMAK3s1jWhgi5v1W6lwZ6Veiekfc2vsgRS06Y= +github.com/Shopify/sarama v1.34.1/go.mod h1:NZSNswsnStpq8TUdFaqnpXm2Do6KRzTIjdBdVlL1YRM= +github.com/Shopify/toxiproxy/v2 v2.4.0 h1:O1e4Jfvr/hefNTNu+8VtdEG5lSeamJRo4aKhMOKNM64= +github.com/Shopify/toxiproxy/v2 v2.4.0/go.mod h1:3ilnjng821bkozDRxNoo64oI/DKqM+rOyJzb564+bvg= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -25,11 +62,18 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21 github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -63,24 +107,45 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -95,11 +160,15 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -107,7 +176,19 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= @@ -139,6 +220,7 @@ github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoI github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jaegertracing/jaeger v1.35.1 h1:Jb7/5anKF70V4FQSJRJ3AYBcA/hJDfWy45kE/9nFSe8= github.com/jaegertracing/jaeger v1.35.1/go.mod h1:e7FBVZ14ptsRjwiHEnLyxvOa4bSnZA0BDFE1OcvNiHs= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= @@ -159,15 +241,25 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -178,6 +270,7 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -196,8 +289,12 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= @@ -208,27 +305,50 @@ github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhEC github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE= github.com/pierrec/lz4/v4 v4.1.14/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= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 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/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.2 h1:aIihoIOHCiLZHxyoNQ+ABL4NKhFTgKLBdMLyEAh98m0= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -250,17 +370,24 @@ github.com/xdg-go/scram v1.1.1 h1:VOMT+81stJgXW3CpHyqHN3AXDYIMsx56mEFrB37Mb/E= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= @@ -279,7 +406,10 @@ go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -287,98 +417,269 @@ golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 h1:NvGWuYG8dkDHFSKksI1P9faiVJ9rayE6l0+ouWVIDs8= golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= @@ -393,27 +694,43 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/exporter/kafkaexporter/internal/awsmsk/iam_scram_client.go b/exporter/kafkaexporter/internal/awsmsk/iam_scram_client.go index 0086f15aefc3..5dab6122f0cc 100644 --- a/exporter/kafkaexporter/internal/awsmsk/iam_scram_client.go +++ b/exporter/kafkaexporter/internal/awsmsk/iam_scram_client.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:gocritic package awsmsk // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/internal/awsmsk" import ( @@ -82,9 +81,9 @@ type response struct { var _ sarama.SCRAMClient = (*IAMSASLClient)(nil) -func NewIAMSASLClient(MSKHostname, region, useragent string) sarama.SCRAMClient { +func NewIAMSASLClient(mskhostname, region, useragent string) sarama.SCRAMClient { return &IAMSASLClient{ - MSKHostname: MSKHostname, + MSKHostname: mskhostname, Region: region, UserAgent: useragent, } diff --git a/exporter/kafkaexporter/kafka_exporter.go b/exporter/kafkaexporter/kafka_exporter.go index 5585c3a0cfe9..5f4a134c93b8 100644 --- a/exporter/kafkaexporter/kafka_exporter.go +++ b/exporter/kafkaexporter/kafka_exporter.go @@ -16,6 +16,7 @@ package kafkaexporter // import "github.com/open-telemetry/opentelemetry-collect import ( "context" + "errors" "fmt" "github.com/Shopify/sarama" @@ -53,9 +54,10 @@ func (e *kafkaTracesProducer) tracesPusher(_ context.Context, td ptrace.Traces) } err = e.producer.SendMessages(messages) if err != nil { - if value, ok := err.(sarama.ProducerErrors); ok { - if len(value) > 0 { - return kafkaErrors{len(value), value[0].Err.Error()} + var prodErr sarama.ProducerErrors + if errors.As(err, &prodErr) { + if len(prodErr) > 0 { + return kafkaErrors{len(prodErr), prodErr[0].Err.Error()} } } return err @@ -82,9 +84,10 @@ func (e *kafkaMetricsProducer) metricsDataPusher(_ context.Context, md pmetric.M } err = e.producer.SendMessages(messages) if err != nil { - if value, ok := err.(sarama.ProducerErrors); ok { - if len(value) > 0 { - return kafkaErrors{len(value), value[0].Err.Error()} + var prodErr sarama.ProducerErrors + if errors.As(err, &prodErr) { + if len(prodErr) > 0 { + return kafkaErrors{len(prodErr), prodErr[0].Err.Error()} } } return err @@ -111,9 +114,10 @@ func (e *kafkaLogsProducer) logsDataPusher(_ context.Context, ld plog.Logs) erro } err = e.producer.SendMessages(messages) if err != nil { - if value, ok := err.(sarama.ProducerErrors); ok { - if len(value) > 0 { - return kafkaErrors{len(value), value[0].Err.Error()} + var prodErr sarama.ProducerErrors + if errors.As(err, &prodErr) { + if len(prodErr) > 0 { + return kafkaErrors{len(prodErr), prodErr[0].Err.Error()} } } return err diff --git a/exporter/loadbalancingexporter/go.mod b/exporter/loadbalancingexporter/go.mod index 934b4727d0ce..7a4b4aec8dbf 100644 --- a/exporter/loadbalancingexporter/go.mod +++ b/exporter/loadbalancingexporter/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 diff --git a/exporter/loadbalancingexporter/go.sum b/exporter/loadbalancingexporter/go.sum index 7a3e306f5c19..fc37a5ac645c 100644 --- a/exporter/loadbalancingexporter/go.sum +++ b/exporter/loadbalancingexporter/go.sum @@ -329,10 +329,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/logzioexporter/go.mod b/exporter/logzioexporter/go.mod index 223ece9bb579..564d16fe8e2f 100644 --- a/exporter/logzioexporter/go.mod +++ b/exporter/logzioexporter/go.mod @@ -8,9 +8,9 @@ require ( github.com/logzio/jaeger-logzio v1.0.6 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/exporter/logzioexporter/go.sum b/exporter/logzioexporter/go.sum index 79a4fd03a852..a71f6cc2fe5c 100644 --- a/exporter/logzioexporter/go.sum +++ b/exporter/logzioexporter/go.sum @@ -856,12 +856,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/lokiexporter/go.mod b/exporter/lokiexporter/go.mod index bbb61415d292..af4e52ac750e 100644 --- a/exporter/lokiexporter/go.mod +++ b/exporter/lokiexporter/go.mod @@ -7,11 +7,11 @@ require ( github.com/golang/snappy v0.0.4 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/prometheus/common v0.34.0 - github.com/prometheus/prometheus v0.36.0 + github.com/prometheus/prometheus v0.36.1 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.47.0 diff --git a/exporter/lokiexporter/go.sum b/exporter/lokiexporter/go.sum index 9ec776d4d31b..34a24f2b54f9 100644 --- a/exporter/lokiexporter/go.sum +++ b/exporter/lokiexporter/go.sum @@ -291,8 +291,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= -github.com/prometheus/prometheus v0.36.0/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -330,12 +330,12 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/mezmoexporter/README.md b/exporter/mezmoexporter/README.md index 5db404a079ec..b70541ad28c2 100644 --- a/exporter/mezmoexporter/README.md +++ b/exporter/mezmoexporter/README.md @@ -4,7 +4,7 @@ This exporter supports sending OpenTelemetry log data to [LogDNA (Mezmo)](https: # Configuration options: -- `ingest_url` (optional): Specifies the URL to send ingested logs to. If not specified, will default to `https://logs.logdna.com/log/ingest`. +- `ingest_url` (optional): Specifies the URL to send ingested logs to. If not specified, will default to `https://logs.logdna.com/logs/ingest`. - `ingest_key` (required): Ingestion key used to send log data to LogDNA. See [Ingestion Keys](https://docs.logdna.com/docs/ingestion-key) for more details. # Example: @@ -19,7 +19,7 @@ receivers: exporters: mezmo: - ingest_url: "https://logs.logdna.com/log/ingest" + ingest_url: "https://logs.logdna.com/logs/ingest" ingest_key: "00000000000000000000000000000000" service: diff --git a/exporter/mezmoexporter/exporter.go b/exporter/mezmoexporter/exporter.go index 69ede7749fd7..ed2fe34ac3a1 100644 --- a/exporter/mezmoexporter/exporter.go +++ b/exporter/mezmoexporter/exporter.go @@ -19,6 +19,7 @@ import ( "context" "encoding/json" "fmt" + "io/ioutil" "net/http" "strings" "sync" @@ -26,6 +27,7 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" + "go.uber.org/zap" ) type mezmoExporter struct { @@ -33,6 +35,7 @@ type mezmoExporter struct { settings component.TelemetrySettings client *http.Client userAgentString string + log *zap.Logger wg sync.WaitGroup } @@ -48,11 +51,12 @@ type MezmoLogBody struct { Lines []MezmoLogLine `json:"lines"` } -func newLogsExporter(config *Config, settings component.TelemetrySettings, buildInfo component.BuildInfo) *mezmoExporter { +func newLogsExporter(config *Config, settings component.TelemetrySettings, buildInfo component.BuildInfo, logger *zap.Logger) *mezmoExporter { var e = &mezmoExporter{ config: config, settings: settings, userAgentString: fmt.Sprintf("mezmo-otel-exporter/%s", buildInfo.Version), + log: logger, } return e } @@ -120,7 +124,7 @@ func (m *mezmoExporter) logDataToMezmo(ld plog.Logs) error { var lineBytes []byte for i, line := range lines { if lineBytes, errs = json.Marshal(line); errs != nil { - return fmt.Errorf("error Creating JSON payload: %s", errs) + return fmt.Errorf("error Creating JSON payload: %w", errs) } var newBufSize = b.Len() + len(lineBytes) @@ -163,7 +167,14 @@ func (m *mezmoExporter) sendLinesToMezmo(post string) (errs error) { var res *http.Response if res, errs = http.DefaultClient.Do(req); errs != nil { - return fmt.Errorf("failed to POST log to Mezmo: %s", errs) + return fmt.Errorf("failed to POST log to Mezmo: %w", errs) + } + if res.StatusCode >= 400 { + m.log.Error(fmt.Sprintf("got http status (%s): %s", req.URL.Path, res.Status)) + if checkLevel := m.log.Check(zap.DebugLevel, "http response"); checkLevel != nil { + responseBody, _ := ioutil.ReadAll(res.Body) + checkLevel.Write(zap.String("response", string(responseBody))) + } } return res.Body.Close() diff --git a/exporter/mezmoexporter/exporter_test.go b/exporter/mezmoexporter/exporter_test.go index 3b8ef258e6d7..8f6d47a5c2dd 100644 --- a/exporter/mezmoexporter/exporter_test.go +++ b/exporter/mezmoexporter/exporter_test.go @@ -17,6 +17,7 @@ package mezmoexporter import ( "context" "encoding/json" + "fmt" "io/ioutil" "net/http" "net/http/httptest" @@ -31,6 +32,9 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" conventions "go.opentelemetry.io/collector/semconv/v1.6.1" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + "go.uber.org/zap/zaptest/observer" ) var buildInfo = component.BuildInfo{ @@ -101,7 +105,7 @@ type testServer struct { url string } -type httpAssertionCallback func(req *http.Request, body MezmoLogBody) +type httpAssertionCallback func(req *http.Request, body MezmoLogBody) (int, string) type testServerParams struct { t *testing.T assertionsCallback httpAssertionCallback @@ -121,9 +125,12 @@ func createHTTPServer(params *testServerParams) testServer { w.WriteHeader(http.StatusUnprocessableEntity) } - params.assertionsCallback(r, logBody) + statusCode, responseBody := params.assertionsCallback(r, logBody) - w.WriteHeader(http.StatusOK) + w.WriteHeader(statusCode) + if len(responseBody) > 0 { + w.Write([]byte(responseBody)) //nolint:errcheck + } })) serverURL, err := url.Parse(httpServer.URL) @@ -137,8 +144,8 @@ func createHTTPServer(params *testServerParams) testServer { return server } -func createExporter(t *testing.T, config *Config) *mezmoExporter { - exporter := newLogsExporter(config, componenttest.NewNopTelemetrySettings(), buildInfo) +func createExporter(t *testing.T, config *Config, logger *zap.Logger) *mezmoExporter { + exporter := newLogsExporter(config, componenttest.NewNopTelemetrySettings(), buildInfo, logger) require.NotNil(t, exporter) err := exporter.start(context.Background(), componenttest.NewNopHost()) @@ -147,21 +154,30 @@ func createExporter(t *testing.T, config *Config) *mezmoExporter { return exporter } +func createLogger() (*zap.Logger, *observer.ObservedLogs) { + core, logObserver := observer.New(zap.DebugLevel) + logger := zap.New(core) + + return logger, logObserver +} + func TestLogsExporter(t *testing.T) { httpServerParams := testServerParams{ t: t, - assertionsCallback: func(req *http.Request, body MezmoLogBody) { + assertionsCallback: func(req *http.Request, body MezmoLogBody) (int, string) { assert.Equal(t, "application/json", req.Header.Get("Content-Type")) assert.Equal(t, "mezmo-otel-exporter/"+buildInfo.Version, req.Header.Get("User-Agent")) + return http.StatusOK, "" }, } server := createHTTPServer(&httpServerParams) defer server.instance.Close() + log, _ := createLogger() config := &Config{ IngestURL: server.url, } - exporter := createExporter(t, config) + exporter := createExporter(t, config, log) t.Run("Test simple log data", func(t *testing.T) { var logs = createSimpleLogData(3) @@ -181,3 +197,39 @@ func TestLogsExporter(t *testing.T) { require.NoError(t, err) }) } + +func Test404IngestError(t *testing.T) { + log, logObserver := createLogger() + + httpServerParams := testServerParams{ + t: t, + assertionsCallback: func(req *http.Request, body MezmoLogBody) (int, string) { + return http.StatusNotFound, `{"foo":"bar"}` + }, + } + server := createHTTPServer(&httpServerParams) + defer server.instance.Close() + + config := &Config{ + IngestURL: fmt.Sprintf("%s/foobar", server.url), + } + exporter := createExporter(t, config, log) + + logs := createSizedPayloadLogData(1) + err := exporter.pushLogData(context.Background(), logs) + require.NoError(t, err) + + assert.Equal(t, logObserver.Len(), 2) + + logLine := logObserver.All()[0] + assert.Equal(t, logLine.Message, "got http status (/foobar): 404 Not Found") + assert.Equal(t, logLine.Level, zapcore.ErrorLevel) + + logLine = logObserver.All()[1] + assert.Equal(t, logLine.Message, "http response") + assert.Equal(t, logLine.Level, zapcore.DebugLevel) + + responseField := logLine.Context[0] + assert.Equal(t, responseField.Key, "response") + assert.Equal(t, responseField.String, `{"foo":"bar"}`) +} diff --git a/exporter/mezmoexporter/factory.go b/exporter/mezmoexporter/factory.go index 282844fa1706..9dd9ecbde89b 100644 --- a/exporter/mezmoexporter/factory.go +++ b/exporter/mezmoexporter/factory.go @@ -46,17 +46,19 @@ func createDefaultConfig() config.Exporter { } // Create a log exporter for exporting to Mezmo -func createLogsExporter(ctx context.Context, settings component.ExporterCreateSettings, exporter config.Exporter) (component.LogsExporter, error) { - if exporter == nil { +func createLogsExporter(ctx context.Context, settings component.ExporterCreateSettings, exporterConfig config.Exporter) (component.LogsExporter, error) { + log := settings.Logger + + if exporterConfig == nil { return nil, errors.New("nil config") } - expCfg := exporter.(*Config) + expCfg := exporterConfig.(*Config) if err := expCfg.Validate(); err != nil { return nil, err } - exp := newLogsExporter(expCfg, settings.TelemetrySettings, settings.BuildInfo) + exp := newLogsExporter(expCfg, settings.TelemetrySettings, settings.BuildInfo, log) return exporterhelper.NewLogsExporter( expCfg, diff --git a/exporter/mezmoexporter/go.mod b/exporter/mezmoexporter/go.mod index 4e543103d8f0..b500cd3fe1eb 100644 --- a/exporter/mezmoexporter/go.mod +++ b/exporter/mezmoexporter/go.mod @@ -4,9 +4,10 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 + go.uber.org/zap v1.21.0 ) require ( @@ -35,7 +36,6 @@ require ( go.opentelemetry.io/otel/trace v1.7.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect - go.uber.org/zap v1.21.0 // indirect golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect golang.org/x/text v0.3.7 // indirect diff --git a/exporter/mezmoexporter/go.sum b/exporter/mezmoexporter/go.sum index efa05867b66c..a0f618b1a3ad 100644 --- a/exporter/mezmoexporter/go.sum +++ b/exporter/mezmoexporter/go.sum @@ -189,12 +189,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/observiqexporter/README.md b/exporter/observiqexporter/README.md index b4b66577903e..c3730ed839c1 100644 --- a/exporter/observiqexporter/README.md +++ b/exporter/observiqexporter/README.md @@ -1,13 +1,15 @@ # observIQ Exporter -| Status | | -| ------------------------ |--------------------| -| Stability | [in development] | -| Supported pipeline types | logs | -| Distributions | none | +| Status | | +|--------------------------|--------------| +| Stability | [deprecated] | +| Supported pipeline types | logs | +| Distributions | none | This exporter supports sending log data to [observIQ](https://observiq.com/) +** NOTE: ** This exporter is deprecated and is scheduled to be removed in v0.56.0 + ## Configuration One of the following configuration options are required: @@ -37,4 +39,4 @@ The full list of settings exposed for this exporter are documented [here](config This exporter also offers proxy support as documented [here](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter#proxy-support). -[in development]:https://github.com/open-telemetry/opentelemetry-collector#in-development +[deprecated]:https://github.com/open-telemetry/opentelemetry-collector#deprecated diff --git a/exporter/observiqexporter/client.go b/exporter/observiqexporter/client.go index 663edd79d313..cc784832b1d6 100644 --- a/exporter/observiqexporter/client.go +++ b/exporter/observiqexporter/client.go @@ -65,7 +65,7 @@ func (c *client) sendLogs( jsonData, err := json.Marshal(data) if err != nil { - return consumererror.NewPermanent(fmt.Errorf("failed to marshal log data to json, logs: %v", err)) + return consumererror.NewPermanent(fmt.Errorf("failed to marshal log data to json, logs: %w", err)) } var gzipped bytes.Buffer diff --git a/exporter/observiqexporter/client_test.go b/exporter/observiqexporter/client_test.go index f9bc8647bd4e..a58e8b8977bf 100644 --- a/exporter/observiqexporter/client_test.go +++ b/exporter/observiqexporter/client_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:gocritic package observiqexporter import ( @@ -140,7 +139,7 @@ func TestClientSendLogs(t *testing.T) { responseStatus int respBody string timeoutTimer bool // Timeout the last set timer created through timeAfterFunc() - //Outputs + // Outputs verifyRequest requestVerificationFunc // Function is used to verify the request submitted to the client is valid. shouldError bool errorIsPermanant bool diff --git a/exporter/observiqexporter/converter.go b/exporter/observiqexporter/converter.go index e8f16c6f6886..2f2ec3b20d20 100644 --- a/exporter/observiqexporter/converter.go +++ b/exporter/observiqexporter/converter.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:gocritic package observiqexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/observiqexporter" import ( @@ -80,12 +79,12 @@ func logdataToObservIQFormat(ld plog.Logs, agentID string, agentName string, bui jsonOIQLogEntry, err := json.Marshal(oiqLogEntry) if err != nil { - //Skip this log, keep record of error + // Skip this log, keep record of error errorsOut = append(errorsOut, consumererror.NewPermanent(err)) continue } - //fnv sum of the message is ID + // fnv sum of the message is ID fnvHash.Reset() _, err = fnvHash.Write(jsonOIQLogEntry) if err != nil { @@ -153,7 +152,7 @@ func bodyFromRecord(log plog.LogRecord) interface{} { return nil } -//Mappings from opentelemetry severity number to observIQ severity string +// Mappings from opentelemetry severity number to observIQ severity string var severityNumberToObservIQName = map[int32]string{ 0: "default", 1: "trace", diff --git a/exporter/observiqexporter/factory.go b/exporter/observiqexporter/factory.go index f0a3bdeef5a5..b9ae6fc41ed9 100644 --- a/exporter/observiqexporter/factory.go +++ b/exporter/observiqexporter/factory.go @@ -60,6 +60,7 @@ func createLogsExporter( params component.ExporterCreateSettings, config config.Exporter, ) (exporter component.LogsExporter, err error) { + params.Logger.Warn("The observiq exporter is deprecated and will be removed in v0.56.0.") if config == nil { return nil, errors.New("nil config") } diff --git a/exporter/observiqexporter/go.mod b/exporter/observiqexporter/go.mod index 8dd36276040e..ac0d7f781b19 100644 --- a/exporter/observiqexporter/go.mod +++ b/exporter/observiqexporter/go.mod @@ -1,3 +1,4 @@ +// Deprecated: elasticexporter exporter is deprecated and will be removed in future versions. module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/observiqexporter go 1.17 @@ -5,9 +6,9 @@ go 1.17 require ( github.com/google/uuid v1.3.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/exporter/observiqexporter/go.sum b/exporter/observiqexporter/go.sum index 1e32b2f4d82d..9464fdf22971 100644 --- a/exporter/observiqexporter/go.sum +++ b/exporter/observiqexporter/go.sum @@ -183,12 +183,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/opencensusexporter/go.mod b/exporter/opencensusexporter/go.mod index 19477fd1af9e..312ec2a0db66 100644 --- a/exporter/opencensusexporter/go.mod +++ b/exporter/opencensusexporter/go.mod @@ -9,8 +9,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 google.golang.org/grpc v1.47.0 ) @@ -38,7 +38,7 @@ require ( github.com/rs/cors v1.8.2 // indirect github.com/soheilhy/cmux v0.1.5 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/exporter/opencensusexporter/go.sum b/exporter/opencensusexporter/go.sum index 6bf15865b7cb..8168e42c4464 100644 --- a/exporter/opencensusexporter/go.sum +++ b/exporter/opencensusexporter/go.sum @@ -223,12 +223,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/parquetexporter/go.mod b/exporter/parquetexporter/go.mod index 79dbf519a8a0..006d815faf08 100644 --- a/exporter/parquetexporter/go.mod +++ b/exporter/parquetexporter/go.mod @@ -3,8 +3,8 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/exporter/parque go 1.17 require ( - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/exporter/parquetexporter/go.sum b/exporter/parquetexporter/go.sum index 292ec0ba9510..22bee46ea60c 100644 --- a/exporter/parquetexporter/go.sum +++ b/exporter/parquetexporter/go.sum @@ -174,17 +174,17 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/prometheusexporter/go.mod b/exporter/prometheusexporter/go.mod index a03e2f580ab7..bbe27c18da3e 100644 --- a/exporter/prometheusexporter/go.mod +++ b/exporter/prometheusexporter/go.mod @@ -9,11 +9,11 @@ require ( github.com/prometheus/client_golang v1.12.2 github.com/prometheus/client_model v0.2.0 github.com/prometheus/common v0.34.0 - github.com/prometheus/prometheus v0.36.0 + github.com/prometheus/prometheus v0.36.1 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -34,7 +34,7 @@ require ( github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.3.10 // indirect - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect @@ -43,7 +43,7 @@ require ( github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.80.0 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/emicklei/go-restful v2.9.5+incompatible // indirect @@ -120,7 +120,7 @@ require ( go.uber.org/multierr v1.8.0 // indirect golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect @@ -128,9 +128,9 @@ require ( golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect - google.golang.org/api v0.82.0 // indirect + google.golang.org/api v0.83.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 // indirect + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/exporter/prometheusexporter/go.sum b/exporter/prometheusexporter/go.sum index b9872d50aa77..9449b18f5dff 100644 --- a/exporter/prometheusexporter/go.sum +++ b/exporter/prometheusexporter/go.sum @@ -105,8 +105,8 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -159,8 +159,8 @@ github.com/digitalocean/godo v1.80.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5 github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -584,8 +584,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= -github.com/prometheus/prometheus v0.36.0/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -649,12 +649,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= @@ -783,8 +783,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -817,8 +817,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1027,8 +1027,8 @@ google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1112,8 +1112,8 @@ google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= diff --git a/exporter/prometheusexporter/prometheus_test.go b/exporter/prometheusexporter/prometheus_test.go index 402ada55eaf0..160ef09e3da5 100644 --- a/exporter/prometheusexporter/prometheus_test.go +++ b/exporter/prometheusexporter/prometheus_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck package prometheusexporter import ( @@ -274,7 +273,8 @@ func TestPrometheusExporter_endToEndWithResource(t *testing.T) { t.Cleanup(func() { require.NoError(t, exp.Shutdown(context.Background())) // trigger a get so that the server cleans up our keepalive socket - http.Get("http://localhost:7777/metrics") + _, err = http.Get("http://localhost:7777/metrics") + require.NoError(t, err, "Failed to perform a scrape") }) assert.NotNil(t, exp) diff --git a/exporter/prometheusremotewriteexporter/exporter.go b/exporter/prometheusremotewriteexporter/exporter.go index b989fa1a6e2c..f56183d60c70 100644 --- a/exporter/prometheusremotewriteexporter/exporter.go +++ b/exporter/prometheusremotewriteexporter/exporter.go @@ -268,7 +268,7 @@ func (prwe *prwExporter) execute(ctx context.Context, writeReq *prompb.WriteRequ return nil } body, err := ioutil.ReadAll(io.LimitReader(resp.Body, 256)) - rerr := fmt.Errorf("remote write returned HTTP status %v; err = %v: %s", resp.Status, err, body) + rerr := fmt.Errorf("remote write returned HTTP status %v; err = %w: %s", resp.Status, err, body) if resp.StatusCode >= 500 && resp.StatusCode < 600 { return rerr } diff --git a/exporter/prometheusremotewriteexporter/go.mod b/exporter/prometheusremotewriteexporter/go.mod index 25fd8541166f..72bec17ffc4e 100644 --- a/exporter/prometheusremotewriteexporter/go.mod +++ b/exporter/prometheusremotewriteexporter/go.mod @@ -10,11 +10,11 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.53.0 - github.com/prometheus/prometheus v0.36.0 + github.com/prometheus/prometheus v0.36.1 github.com/stretchr/testify v1.7.2 github.com/tidwall/wal v1.1.7 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 @@ -44,7 +44,7 @@ require ( github.com/tidwall/pretty v1.2.0 // indirect github.com/tidwall/tinylru v1.1.0 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/exporter/prometheusremotewriteexporter/go.sum b/exporter/prometheusremotewriteexporter/go.sum index 91e68c325941..9f8e8ef4a3b5 100644 --- a/exporter/prometheusremotewriteexporter/go.sum +++ b/exporter/prometheusremotewriteexporter/go.sum @@ -289,8 +289,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= -github.com/prometheus/prometheus v0.36.0/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -336,12 +336,12 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/prometheusremotewriteexporter/wal.go b/exporter/prometheusremotewriteexporter/wal.go index a4216f710d6c..7b732af578bd 100644 --- a/exporter/prometheusremotewriteexporter/wal.go +++ b/exporter/prometheusremotewriteexporter/wal.go @@ -285,7 +285,7 @@ func (prwe *prweWAL) syncAndTruncateFront() error { } // Truncate the WAL from the front for the entries that we already // read from the WAL and had already exported. - if err := prwe.wal.TruncateFront(prwe.rWALIndex.Load()); err != nil && err != wal.ErrOutOfRange { + if err := prwe.wal.TruncateFront(prwe.rWALIndex.Load()); err != nil && !errors.Is(err, wal.ErrOutOfRange) { return err } return nil diff --git a/exporter/prometheusremotewriteexporter/wal_test.go b/exporter/prometheusremotewriteexporter/wal_test.go index 7bd96470e028..ee5994a99ba6 100644 --- a/exporter/prometheusremotewriteexporter/wal_test.go +++ b/exporter/prometheusremotewriteexporter/wal_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck package prometheusremotewriteexporter import ( @@ -43,7 +42,7 @@ func TestWALCreation_nonNilConfig(t *testing.T) { pwal, err := newWAL(config, doNothingExportSink) require.NotNil(t, pwal) assert.Nil(t, err) - pwal.stop() + assert.NoError(t, pwal.stop()) } func orderByLabelValueForEach(reqL []*prompb.WriteRequest) { diff --git a/exporter/sapmexporter/exporter.go b/exporter/sapmexporter/exporter.go index 8c5c23cdde9b..6490e0fe1635 100644 --- a/exporter/sapmexporter/exporter.go +++ b/exporter/sapmexporter/exporter.go @@ -17,6 +17,7 @@ package sapmexporter // import "github.com/open-telemetry/opentelemetry-collecto import ( "context" + "errors" "github.com/jaegertracing/jaeger/model" sapmclient "github.com/signalfx/sapm-proto/client" @@ -120,7 +121,8 @@ func (se *sapmExporter) pushTraceData(ctx context.Context, td ptrace.Traces) err err = se.client.ExportWithAccessToken(ctx, batches, accessToken) if err != nil { - if sendErr, ok := err.(*sapmclient.ErrSend); ok && sendErr.Permanent { + sendErr := &sapmclient.ErrSend{} + if errors.As(err, &sendErr) && sendErr.Permanent { return consumererror.NewPermanent(sendErr) } return err diff --git a/exporter/sapmexporter/go.mod b/exporter/sapmexporter/go.mod index cba3ca47e1df..bd7cdcce390b 100644 --- a/exporter/sapmexporter/go.mod +++ b/exporter/sapmexporter/go.mod @@ -9,8 +9,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.53.0 github.com/signalfx/sapm-proto v0.9.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -36,7 +36,7 @@ require ( github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/exporter/sapmexporter/go.sum b/exporter/sapmexporter/go.sum index 61b81daf0004..168d09acd2c1 100644 --- a/exporter/sapmexporter/go.sum +++ b/exporter/sapmexporter/go.sum @@ -873,16 +873,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/collector v0.52.0/go.mod h1:a9GvaOhyc0nVOUzqvdv5mxyWghCSso/WRO2GgRl4I1g= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= go.opentelemetry.io/collector/model v0.44.0/go.mod h1:4jo1R8uBDspLCxUGhQ0k3v/EFXFbW7s0AIy3LuGLbcU= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/pdata v0.52.0/go.mod h1:GJUTfTv8mlYpHRjcmHXVbvJr48EW/q/P/HuBvpXAE58= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/collector/semconv v0.52.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= diff --git a/exporter/sentryexporter/go.mod b/exporter/sentryexporter/go.mod index ab2e2585d4ce..b5135b316c1e 100644 --- a/exporter/sentryexporter/go.mod +++ b/exporter/sentryexporter/go.mod @@ -6,9 +6,9 @@ require ( github.com/getsentry/sentry-go v0.13.0 github.com/google/go-cmp v0.5.8 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/exporter/sentryexporter/go.sum b/exporter/sentryexporter/go.sum index d06a6cd6c8dc..7a55040826d6 100644 --- a/exporter/sentryexporter/go.sum +++ b/exporter/sentryexporter/go.sum @@ -195,12 +195,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/sentryexporter/sentry_exporter.go b/exporter/sentryexporter/sentry_exporter.go index c84969e3206d..185d1b21bea4 100644 --- a/exporter/sentryexporter/sentry_exporter.go +++ b/exporter/sentryexporter/sentry_exporter.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:gocritic package sentryexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/sentryexporter" import ( @@ -113,9 +112,9 @@ func (s *SentryExporter) pushTraceData(_ context.Context, td ptrace.Traces) erro transactions := generateTransactions(transactionMap, orphanSpans) - events := append(transactions, exceptionEvents...) + transactions = append(transactions, exceptionEvents...) - s.transport.SendEvents(events) + s.transport.SendEvents(transactions) return nil } diff --git a/exporter/signalfxexporter/README.md b/exporter/signalfxexporter/README.md index 0353edc03b01..3e7f0b2ffdf3 100644 --- a/exporter/signalfxexporter/README.md +++ b/exporter/signalfxexporter/README.md @@ -52,7 +52,7 @@ The following configuration options can also be configured: excludes. - `include_metrics`: List of filters to override exclusion of any metrics. This option can be used to included metrics that are otherwise dropped by - default. See [here](./translation/default_metrics.go) for a list of metrics + default. See [here](./internal/translation/default_metrics.go) for a list of metrics that are dropped by default. For example, the following configuration can be used to send through some of that are dropped by default. ```yaml @@ -166,7 +166,7 @@ The rule language is expressed in yaml mappings and is [documented here](./inter * `rename_metrics` - Replaces a given metric name with specified one * `split_metric` - Splits a given metric into multiple new ones for a specified dimension -The translation rules defined in [`translation/constants.go`](./internal/translation/constants.go) are used by default for this value. The default rules will create the following aggregated metrics from the [`hostmetrics` receiver](https://github.com/open-telemetry/opentelemetry-collector/blob/main/receiver/hostmetricsreceiver/README.md): +The translation rules defined in [`translation/constants.go`](./internal/translation/constants.go) are used by default for this value. The default rules will create the following aggregated metrics from the [`hostmetrics` receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/hostmetricsreceiver/README.md): * cpu.idle * cpu.interrupt diff --git a/exporter/signalfxexporter/config.go b/exporter/signalfxexporter/config.go index 1680a64b70bb..e4f59be8d069 100644 --- a/exporter/signalfxexporter/config.go +++ b/exporter/signalfxexporter/config.go @@ -119,12 +119,12 @@ func (cfg *Config) getOptionsFromConfig() (*exporterOptions, error) { ingestURL, err := cfg.getIngestURL() if err != nil { - return nil, fmt.Errorf("invalid \"ingest_url\": %v", err) + return nil, fmt.Errorf("invalid \"ingest_url\": %w", err) } apiURL, err := cfg.getAPIURL() if err != nil { - return nil, fmt.Errorf("invalid \"api_url\": %v", err) + return nil, fmt.Errorf("invalid \"api_url\": %w", err) } if cfg.Timeout == 0 { @@ -133,7 +133,7 @@ func (cfg *Config) getOptionsFromConfig() (*exporterOptions, error) { metricTranslator, err := translation.NewMetricTranslator(cfg.TranslationRules, cfg.DeltaTranslationTTL) if err != nil { - return nil, fmt.Errorf("invalid \"%s\": %v", translationRulesConfigKey, err) + return nil, fmt.Errorf("invalid \"%s\": %w", translationRulesConfigKey, err) } return &exporterOptions{ diff --git a/exporter/signalfxexporter/exporter.go b/exporter/signalfxexporter/exporter.go index 0bcf6b699640..0a9cd662ea61 100644 --- a/exporter/signalfxexporter/exporter.go +++ b/exporter/signalfxexporter/exporter.go @@ -86,14 +86,14 @@ func newSignalFxExporter( options, err := config.getOptionsFromConfig() if err != nil { return nil, - fmt.Errorf("failed to process %q config: %v", config.ID().String(), err) + fmt.Errorf("failed to process %q config: %w", config.ID().String(), err) } headers := buildHeaders(config) converter, err := translation.NewMetricsConverter(logger, options.metricTranslator, config.ExcludeMetrics, config.IncludeMetrics, config.NonAlphanumericDimensionChars) if err != nil { - return nil, fmt.Errorf("failed to create metric converter: %v", err) + return nil, fmt.Errorf("failed to create metric converter: %w", err) } transport := http.DefaultTransport.(*http.Transport).Clone() @@ -161,7 +161,7 @@ func newEventExporter(config *Config, logger *zap.Logger) (*signalfxExporter, er options, err := config.getOptionsFromConfig() if err != nil { return nil, - fmt.Errorf("failed to process %q config: %v", config.ID().String(), err) + fmt.Errorf("failed to process %q config: %w", config.ID().String(), err) } headers := buildHeaders(config) diff --git a/exporter/signalfxexporter/factory.go b/exporter/signalfxexporter/factory.go index 01fc9f1db258..75b10be7fd9c 100644 --- a/exporter/signalfxexporter/factory.go +++ b/exporter/signalfxexporter/factory.go @@ -79,7 +79,7 @@ func createTracesExporter( if corrCfg.Endpoint == "" { apiURL, err := cfg.getAPIURL() if err != nil { - return nil, fmt.Errorf("unable to create API URL: %v", err) + return nil, fmt.Errorf("unable to create API URL: %w", err) } corrCfg.Endpoint = apiURL.String() } @@ -173,7 +173,7 @@ func loadConfig(bytes []byte) (Config, error) { } if err := confmap.NewFromStringMap(data).UnmarshalExact(&cfg); err != nil { - return cfg, fmt.Errorf("failed to load default exclude metrics: %v", err) + return cfg, fmt.Errorf("failed to load default exclude metrics: %w", err) } return cfg, nil diff --git a/exporter/signalfxexporter/factory_test.go b/exporter/signalfxexporter/factory_test.go index ddf74f4cf735..1d2d43b8a148 100644 --- a/exporter/signalfxexporter/factory_test.go +++ b/exporter/signalfxexporter/factory_test.go @@ -658,7 +658,7 @@ func TestDefaultExcludes_not_translated(t *testing.T) { require.NoError(t, err) md := getMetrics(metrics) - require.Equal(t, 71, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().Len()) + require.Equal(t, 65, md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().Len()) dps := converter.MetricsToSignalFxV2(md) require.Equal(t, 0, len(dps)) } diff --git a/exporter/signalfxexporter/go.mod b/exporter/signalfxexporter/go.mod index d1a34636288d..689bf5f23eb4 100644 --- a/exporter/signalfxexporter/go.mod +++ b/exporter/signalfxexporter/go.mod @@ -14,8 +14,8 @@ require ( github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 github.com/signalfx/signalfx-agent/pkg/apm v0.0.0-20201202163743-65b4fa925fc8 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 @@ -73,7 +73,7 @@ require ( require ( github.com/jaegertracing/jaeger v1.35.1 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/signalfx v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 golang.org/x/sys v0.0.0-20220412211240-33da011f77ad ) diff --git a/exporter/signalfxexporter/go.sum b/exporter/signalfxexporter/go.sum index 7516941198c5..d364941e62a2 100644 --- a/exporter/signalfxexporter/go.sum +++ b/exporter/signalfxexporter/go.sum @@ -281,12 +281,12 @@ go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/signalfxexporter/internal/correlation/correlation.go b/exporter/signalfxexporter/internal/correlation/correlation.go index ff6ff43dcadd..f6843c2281a0 100644 --- a/exporter/signalfxexporter/internal/correlation/correlation.go +++ b/exporter/signalfxexporter/internal/correlation/correlation.go @@ -62,12 +62,12 @@ func newCorrelationClient(cfg *Config, accessToken string, params component.Expo ) { corrURL, err := url.Parse(cfg.Endpoint) if err != nil { - return nil, fmt.Errorf("failed to parse correlation endpoint URL %q: %v", cfg.Endpoint, err) + return nil, fmt.Errorf("failed to parse correlation endpoint URL %q: %w", cfg.Endpoint, err) } httpClient, err := cfg.ToClient(host.GetExtensions(), params.TelemetrySettings) if err != nil { - return nil, fmt.Errorf("failed to create correlation API client: %v", err) + return nil, fmt.Errorf("failed to create correlation API client: %w", err) } ctx, cancel := context.WithCancel(context.Background()) @@ -80,7 +80,7 @@ func newCorrelationClient(cfg *Config, accessToken string, params component.Expo if err != nil { cancel() - return nil, fmt.Errorf("failed to create correlation client: %v", err) + return nil, fmt.Errorf("failed to create correlation client: %w", err) } return &correlationContext{ diff --git a/exporter/signalfxexporter/internal/dimensions/dimclient.go b/exporter/signalfxexporter/internal/dimensions/dimclient.go index 70f31f7dcb0d..3141db4e414e 100644 --- a/exporter/signalfxexporter/internal/dimensions/dimclient.go +++ b/exporter/signalfxexporter/internal/dimensions/dimclient.go @@ -274,7 +274,7 @@ func (dc *DimensionClient) handleDimensionUpdate(dimUpdate *DimensionUpdate) err func (dc *DimensionClient) makeDimURL(key, value string) (*url.URL, error) { url, err := dc.APIURL.Parse(fmt.Sprintf("/v2/dimension/%s/%s", url.PathEscape(key), url.PathEscape(value))) if err != nil { - return nil, fmt.Errorf("could not construct dimension property PATCH URL with %s / %s: %v", key, value, err) + return nil, fmt.Errorf("could not construct dimension property PATCH URL with %s / %s: %w", key, value, err) } return url, nil diff --git a/exporter/signalfxexporter/internal/dimensions/requests.go b/exporter/signalfxexporter/internal/dimensions/requests.go index ffe59e1c2551..8082dc89a55b 100644 --- a/exporter/signalfxexporter/internal/dimensions/requests.go +++ b/exporter/signalfxexporter/internal/dimensions/requests.go @@ -104,7 +104,7 @@ func (rs *ReqSender) sendRequest(req *http.Request) error { } if err != nil { - err = fmt.Errorf("error making HTTP request to %s: %v", req.URL.String(), err) + err = fmt.Errorf("error making HTTP request to %s: %w", req.URL.String(), err) } else { err = fmt.Errorf("unexpected status code %d on response for request to %s: %s", statusCode, req.URL.String(), string(body)) } diff --git a/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go b/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go index d1d98e2e2ece..fda3350204e9 100644 --- a/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go +++ b/exporter/signalfxexporter/internal/hostmetadata/host_linux_test.go @@ -21,7 +21,6 @@ package hostmetadata import ( "errors" - "os" "reflect" "testing" @@ -73,10 +72,7 @@ func TestFillOSSpecificData(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { syscallUname = tt.args.syscallUname - if err := os.Setenv("HOST_ETC", tt.args.etc); err != nil { - t.Errorf("getOS() error = %v failed to set HOST_ETC env var", err) - return - } + t.Setenv("HOST_ETC", tt.args.etc) in := &hostOS{} if err := fillPlatformSpecificOSData(in); err != nil { if !tt.wantErr { @@ -88,7 +84,6 @@ func TestFillOSSpecificData(t *testing.T) { t.Errorf("fillPlatformSpecificOSData() = %v, want %v", in, tt.want) } }) - os.Unsetenv("HOST_ETC") syscallUname = unix.Uname } } @@ -142,7 +137,6 @@ func TestFillPlatformSpecificCPUData(t *testing.T) { t.Errorf("fillPlatformSpecificCPUData() = %v, want %v", in, tt.want) } }) - os.Unsetenv("HOST_ETC") syscallUname = unix.Uname } } diff --git a/exporter/signalfxexporter/internal/hostmetadata/host_test.go b/exporter/signalfxexporter/internal/hostmetadata/host_test.go index af8c6ad564e3..eb5bf1ed9c15 100644 --- a/exporter/signalfxexporter/internal/hostmetadata/host_test.go +++ b/exporter/signalfxexporter/internal/hostmetadata/host_test.go @@ -20,7 +20,6 @@ package hostmetadata import ( "context" "errors" - "os" "reflect" "testing" @@ -179,10 +178,7 @@ func TestGetOS(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { hostInfo = tt.testfixtures.hostInfo - if err := os.Setenv("HOST_ETC", tt.testfixtures.hostEtc); err != nil { - t.Errorf("getOS() error = %v failed to set HOST_ETC env var", err) - return - } + t.Setenv("HOST_ETC", tt.testfixtures.hostEtc) gotInfo, err := getOS() if (err != nil) != tt.wantErr { t.Errorf("getOS() error = %v, wantErr %v", err, tt.wantErr) @@ -195,7 +191,6 @@ func TestGetOS(t *testing.T) { } } }) - os.Unsetenv("HOST_ETC") } } @@ -239,10 +234,7 @@ func Test_GetLinuxVersion(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if err := os.Setenv("HOST_ETC", tt.etc); err != nil { - t.Errorf("getLinuxVersion() error = %v failed to set HOST_ETC env var", err) - return - } + t.Setenv("HOST_ETC", tt.etc) got, err := getLinuxVersion() if (err != nil) != tt.wantErr { t.Errorf("getLinuxVersion() error = %v, wantErr %v", err, tt.wantErr) @@ -252,7 +244,6 @@ func Test_GetLinuxVersion(t *testing.T) { t.Errorf("getLinuxVersion() = %v, want %v", got, tt.want) } }) - os.Unsetenv("HOST_ETC") } } @@ -305,16 +296,12 @@ func TestEtcPath(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { if tt.etc != "" { - if err := os.Setenv("HOST_ETC", tt.etc); err != nil { - t.Errorf("etcPath error = %v failed to set HOST_ETC env var", err) - return - } + t.Setenv("HOST_ETC", tt.etc) } if got := etcPath(); !reflect.DeepEqual(got, tt.want) { t.Errorf("etcPath = %v, want %v", got, tt.want) } }) - os.Unsetenv("HOST_ETC") } } diff --git a/exporter/signalfxexporter/internal/hostmetadata/metadata_test.go b/exporter/signalfxexporter/internal/hostmetadata/metadata_test.go index aa1410ad207d..9407f9889398 100644 --- a/exporter/signalfxexporter/internal/hostmetadata/metadata_test.go +++ b/exporter/signalfxexporter/internal/hostmetadata/metadata_test.go @@ -17,7 +17,6 @@ package hostmetadata import ( "context" "errors" - "os" "sync" "testing" @@ -251,8 +250,7 @@ func TestSyncMetadata(t *testing.T) { syncer := NewSyncer(logger, dimClient) // mock system stats calls. - os.Setenv("HOST_ETC", ".") - defer os.Unsetenv("HOST_ETC") + t.Setenv("HOST_ETC", ".") cpuInfo = func(context.Context) ([]cpu.InfoStat, error) { return []cpu.InfoStat{tt.cpuStat}, tt.cpuStatErr } diff --git a/exporter/signalfxexporter/internal/translation/default_metrics.go b/exporter/signalfxexporter/internal/translation/default_metrics.go index aba9492627e9..ccdc8e8b0209 100644 --- a/exporter/signalfxexporter/internal/translation/default_metrics.go +++ b/exporter/signalfxexporter/internal/translation/default_metrics.go @@ -118,10 +118,17 @@ exclude_metrics: - '!k8s.container.memory_limit' - '!k8s.container.cpu_limit' + # matches all container request metrics but k8s.container.cpu_request and k8s.container.memory_request - /^k8s\.container\..+_request$/ + - '!k8s.container.memory_request' + - '!k8s.container.cpu_request' - # matches any node condition but k8s.node.condition_ready + # matches any node condition but memory_pressure, network_unavailable, out_of_disk, p_i_d_pressure, and ready - /^k8s\.node\.condition_.+$/ + - '!k8s.node.condition_memory_pressure' + - '!k8s.node.condition_network_unavailable' + - '!k8s.node.condition_out_of_disk' + - '!k8s.node.condition_p_i_d_pressure' - '!k8s.node.condition_ready' # kubelet metrics @@ -141,8 +148,8 @@ exclude_metrics: # matches (k8s.node|k8s.pod).cpu.time - /^k8s\.(?i:(node)|(pod))\.cpu\.time$/ - # matches (container|k8s.node|k8s.pod).cpu.utilization - - /^(?i:(container)|(k8s\.node)|(k8s\.pod))\.cpu\.utilization$/ + # matches (k8s.node|k8s.pod).cpu.utilization + - /^(?i:(k8s\.node)|(k8s\.pod))\.cpu\.utilization$/ # matches k8s.node.network.io and k8s.node.network.errors - /^k8s\.node\.network\.(?:(io)|(errors))$/ diff --git a/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go b/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go index a3a0c57b06a4..bf4f0d912048 100644 --- a/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go +++ b/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2.go @@ -121,6 +121,12 @@ func convertLogRecord(lr plog.LogRecord, resourceAttrs pcommon.Map, logger *zap. // SignalFx event timestamps. event.Timestamp = int64(lr.Timestamp()) / 1e6 + // EventType is a required field, if not set sfx event ingest will drop it + if event.EventType == "" { + logger.Debug("EventType is not set; setting it to unknown") + event.EventType = "unknown" + } + return &event, true } diff --git a/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2_test.go b/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2_test.go index d3ed4f6b4969..6bb163605f69 100644 --- a/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2_test.go +++ b/exporter/signalfxexporter/internal/translation/logdata_to_signalfxv2_test.go @@ -112,6 +112,20 @@ func TestLogDataToSignalFxEvents(t *testing.T) { return logs }(), }, + { + name: "missing event type", + sfxEvents: func() []*sfxpb.Event { + e := buildDefaultSFxEvent() + e.EventType = "unknown" + return []*sfxpb.Event{e} + }(), + logData: func() plog.Logs { + logs := buildDefaultLogs() + lrs := logs.ResourceLogs().At(0).ScopeLogs().At(0).LogRecords() + lrs.At(0).Attributes().Remove("com.splunk.signalfx.event_type") + return logs + }(), + }, } for _, tt := range tests { diff --git a/exporter/signalfxexporter/testdata/json/non_default_metrics_otel_convention.json b/exporter/signalfxexporter/testdata/json/non_default_metrics_otel_convention.json index bed7d2a466ad..30b8249de164 100644 --- a/exporter/signalfxexporter/testdata/json/non_default_metrics_otel_convention.json +++ b/exporter/signalfxexporter/testdata/json/non_default_metrics_otel_convention.json @@ -101,30 +101,12 @@ { "k8s.hpa.desired_replicas": null }, - { - "k8s.container.cpu_request": null - }, { "k8s.container.ephemeral-storage_limit": null }, { "k8s.container.ephemeral-storage_request": null }, - { - "k8s.container.memory_request": null - }, - { - "k8s.node.condition_memory_pressure": null - }, - { - "k8s.node.condition_network_unavailable": null - }, - { - "k8s.node.condition_out_of_disk": null - }, - { - "k8s.node.condition_p_i_d_pressure": null - }, { "container.memory.available": null }, diff --git a/exporter/skywalkingexporter/go.mod b/exporter/skywalkingexporter/go.mod index c5cca1c87853..7d7594fe3fed 100644 --- a/exporter/skywalkingexporter/go.mod +++ b/exporter/skywalkingexporter/go.mod @@ -6,9 +6,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 google.golang.org/grpc v1.47.0 skywalking.apache.org/repo/goapi v0.0.0-20211122071111-ffc517fbfe21 diff --git a/exporter/skywalkingexporter/go.sum b/exporter/skywalkingexporter/go.sum index bc630e994cfe..62604dcc1fea 100644 --- a/exporter/skywalkingexporter/go.sum +++ b/exporter/skywalkingexporter/go.sum @@ -211,12 +211,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/skywalkingexporter/skywalking_benchmark_test.go b/exporter/skywalkingexporter/skywalking_benchmark_test.go index af18d8e0e9ab..c719e35b1029 100644 --- a/exporter/skywalkingexporter/skywalking_benchmark_test.go +++ b/exporter/skywalkingexporter/skywalking_benchmark_test.go @@ -16,6 +16,7 @@ package skywalkingexporter import ( "context" + "errors" "io" "net" "strconv" @@ -194,7 +195,7 @@ type mockLogHandler2 struct { func (h *mockLogHandler2) Collect(stream logpb.LogReportService_CollectServer) error { for { _, err := stream.Recv() - if err == io.EOF { + if errors.Is(err, io.EOF) { h.stopChan <- -1 return stream.SendAndClose(&v3.Commands{}) } diff --git a/exporter/skywalkingexporter/skywalking_test.go b/exporter/skywalkingexporter/skywalking_test.go index a7a668eb1d80..04305a3f8a31 100644 --- a/exporter/skywalkingexporter/skywalking_test.go +++ b/exporter/skywalkingexporter/skywalking_test.go @@ -17,6 +17,7 @@ package skywalkingexporter import ( "context" + "errors" "io" "net" "sync" @@ -225,7 +226,7 @@ type mockLogHandler struct { func (h *mockLogHandler) Collect(stream logpb.LogReportService_CollectServer) error { for { r, err := stream.Recv() - if err == io.EOF { + if errors.Is(err, io.EOF) { return stream.SendAndClose(&v3.Commands{}) } if err == nil { @@ -242,7 +243,7 @@ type mockMetricHandler struct { func (h *mockMetricHandler) CollectBatch(stream metricpb.MeterReportService_CollectBatchServer) error { for { r, err := stream.Recv() - if err == io.EOF { + if errors.Is(err, io.EOF) { return stream.SendAndClose(&v3.Commands{}) } if err == nil { diff --git a/exporter/splunkhecexporter/client.go b/exporter/splunkhecexporter/client.go index d16aab76b599..86ab04276958 100644 --- a/exporter/splunkhecexporter/client.go +++ b/exporter/splunkhecexporter/client.go @@ -102,11 +102,11 @@ func (c *client) pushMetricsData( gzipWriter.Reset(gzipBuffer) if _, err = io.Copy(gzipWriter, buf); err != nil { - return fmt.Errorf("failed copying buffer to gzip writer: %v", err) + return fmt.Errorf("failed copying buffer to gzip writer: %w", err) } if err = gzipWriter.Close(); err != nil { - return fmt.Errorf("failed flushing compressed data to gzip writer: %v", err) + return fmt.Errorf("failed flushing compressed data to gzip writer: %w", err) } return c.postEvents(ctx, gzipBuffer, localHeaders, shouldCompress) @@ -148,11 +148,11 @@ func (c *client) pushTraceData( gzipWriter.Reset(gzipBuffer) if _, err = io.Copy(gzipWriter, buf); err != nil { - return fmt.Errorf("failed copying buffer to gzip writer: %v", err) + return fmt.Errorf("failed copying buffer to gzip writer: %w", err) } if err = gzipWriter.Close(); err != nil { - return fmt.Errorf("failed flushing compressed data to gzip writer: %v", err) + return fmt.Errorf("failed flushing compressed data to gzip writer: %w", err) } return c.postEvents(ctx, gzipBuffer, localHeaders, shouldCompress) @@ -203,11 +203,11 @@ func (c *client) pushLogData(ctx context.Context, ld plog.Logs) error { gzipWriter.Reset(gzipBuffer) if _, err = io.Copy(gzipWriter, buf); err != nil { - return fmt.Errorf("failed copying buffer to gzip writer: %v", err) + return fmt.Errorf("failed copying buffer to gzip writer: %w", err) } if err = gzipWriter.Close(); err != nil { - return fmt.Errorf("failed flushing compressed data to gzip writer: %v", err) + return fmt.Errorf("failed flushing compressed data to gzip writer: %w", err) } return c.postEvents(ctx, gzipBuffer, localHeaders, shouldCompress) @@ -332,7 +332,7 @@ func (c *client) pushLogRecords(ctx context.Context, lds plog.ResourceLogsSlice, // JSON encoding event and writing to buffer. b, err := jsoniter.Marshal(event) if err != nil { - permanentErrors = append(permanentErrors, consumererror.NewPermanent(fmt.Errorf("dropped log event: %v, error: %v", event, err))) + permanentErrors = append(permanentErrors, consumererror.NewPermanent(fmt.Errorf("dropped log event: %v, error: %w", event, err))) continue } state.buf.Write(b) @@ -398,7 +398,7 @@ func (c *client) pushMetricsRecords(ctx context.Context, mds pmetric.ResourceMet // JSON encoding event and writing to buffer. b, err := jsoniter.Marshal(event) if err != nil { - permanentErrors = append(permanentErrors, consumererror.NewPermanent(fmt.Errorf("dropped metric events: %v, error: %v", events, err))) + permanentErrors = append(permanentErrors, consumererror.NewPermanent(fmt.Errorf("dropped metric events: %v, error: %w", events, err))) continue } state.buf.Write(b) @@ -464,7 +464,7 @@ func (c *client) pushTracesData(ctx context.Context, tds ptrace.ResourceSpansSli // JSON encoding event and writing to buffer. b, err := jsoniter.Marshal(event) if err != nil { - permanentErrors = append(permanentErrors, consumererror.NewPermanent(fmt.Errorf("dropped span events: %v, error: %v", event, err))) + permanentErrors = append(permanentErrors, consumererror.NewPermanent(fmt.Errorf("dropped span events: %v, error: %w", event, err))) continue } state.buf.Write(b) diff --git a/exporter/splunkhecexporter/client_test.go b/exporter/splunkhecexporter/client_test.go index 90a42732685d..c52def5114f0 100644 --- a/exporter/splunkhecexporter/client_test.go +++ b/exporter/splunkhecexporter/client_test.go @@ -948,29 +948,30 @@ func Test_pushLogData_PostError(t *testing.T) { c.config.MaxContentLengthLogs, c.config.DisableCompression = 0, true err := c.pushLogData(context.Background(), logs) require.Error(t, err) - assert.IsType(t, consumererror.Logs{}, err) - assert.Equal(t, (err.(consumererror.Logs)).GetLogs(), logs) + var logsErr consumererror.Logs + assert.ErrorAs(t, err, &logsErr) + assert.Equal(t, logs, logsErr.GetLogs()) // 0 -> unlimited size batch, false -> compression enabled. c.config.MaxContentLengthLogs, c.config.DisableCompression = 0, false err = c.pushLogData(context.Background(), logs) require.Error(t, err) - assert.IsType(t, consumererror.Logs{}, err) - assert.Equal(t, (err.(consumererror.Logs)).GetLogs(), logs) + assert.ErrorAs(t, err, &logsErr) + assert.Equal(t, logs, logsErr.GetLogs()) // 200000 < 371888 -> multiple batches, true -> compression disabled. c.config.MaxContentLengthLogs, c.config.DisableCompression = 200000, true err = c.pushLogData(context.Background(), logs) require.Error(t, err) - assert.IsType(t, consumererror.Logs{}, err) - assert.Equal(t, (err.(consumererror.Logs)).GetLogs(), logs) + assert.ErrorAs(t, err, &logsErr) + assert.Equal(t, logs, logsErr.GetLogs()) // 200000 < 371888 -> multiple batches, false -> compression enabled. c.config.MaxContentLengthLogs, c.config.DisableCompression = 200000, false err = c.pushLogData(context.Background(), logs) require.Error(t, err) - assert.IsType(t, consumererror.Logs{}, err) - assert.Equal(t, (err.(consumererror.Logs)).GetLogs(), logs) + assert.ErrorAs(t, err, &logsErr) + assert.Equal(t, logs, logsErr.GetLogs()) } func Test_pushLogData_ShouldAddResponseTo400Error(t *testing.T) { @@ -1032,8 +1033,10 @@ func Test_pushLogData_ShouldReturnUnsentLogsOnly(t *testing.T) { assert.IsType(t, consumererror.Logs{}, err) // Only the record that was not successfully sent should be returned - assert.Equal(t, 1, (err.(consumererror.Logs)).GetLogs().ResourceLogs().Len()) - assert.Equal(t, logs.ResourceLogs().At(1), (err.(consumererror.Logs)).GetLogs().ResourceLogs().At(0)) + var logsErr consumererror.Logs + require.ErrorAs(t, err, &logsErr) + assert.Equal(t, 1, logsErr.GetLogs().ResourceLogs().Len()) + assert.Equal(t, logs.ResourceLogs().At(1), logsErr.GetLogs().ResourceLogs().At(0)) } func Test_pushLogData_ShouldAddHeadersForProfilingData(t *testing.T) { diff --git a/exporter/splunkhecexporter/config.go b/exporter/splunkhecexporter/config.go index 710e9f1f720f..9776d7c2979b 100644 --- a/exporter/splunkhecexporter/config.go +++ b/exporter/splunkhecexporter/config.go @@ -110,7 +110,7 @@ func (cfg *Config) getOptionsFromConfig() (*exporterOptions, error) { url, err := cfg.getURL() if err != nil { - return nil, fmt.Errorf(`invalid "endpoint": %v`, err) + return nil, fmt.Errorf(`invalid "endpoint": %w`, err) } return &exporterOptions{ diff --git a/exporter/splunkhecexporter/exporter.go b/exporter/splunkhecexporter/exporter.go index a33ab591bce8..916cdb6531d1 100644 --- a/exporter/splunkhecexporter/exporter.go +++ b/exporter/splunkhecexporter/exporter.go @@ -80,7 +80,7 @@ func createExporter( options, err := config.getOptionsFromConfig() if err != nil { return nil, - fmt.Errorf("failed to process %q config: %v", config.ID().String(), err) + fmt.Errorf("failed to process %q config: %w", config.ID().String(), err) } client, err := buildClient(options, config, logger) diff --git a/exporter/splunkhecexporter/go.mod b/exporter/splunkhecexporter/go.mod index 56e1c412a517..efe0ef70d089 100644 --- a/exporter/splunkhecexporter/go.mod +++ b/exporter/splunkhecexporter/go.mod @@ -10,9 +10,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.28.0 diff --git a/exporter/splunkhecexporter/go.sum b/exporter/splunkhecexporter/go.sum index 2d32af1a48d7..412ab351bd41 100644 --- a/exporter/splunkhecexporter/go.sum +++ b/exporter/splunkhecexporter/go.sum @@ -189,12 +189,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/sumologicexporter/go.mod b/exporter/sumologicexporter/go.mod index 55c83c2a597e..077b68160d32 100644 --- a/exporter/sumologicexporter/go.mod +++ b/exporter/sumologicexporter/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/multierr v1.8.0 ) diff --git a/exporter/sumologicexporter/go.sum b/exporter/sumologicexporter/go.sum index 1d8978a8c7c4..9ded53f5e61d 100644 --- a/exporter/sumologicexporter/go.sum +++ b/exporter/sumologicexporter/go.sum @@ -198,10 +198,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/sumologicexporter/sender_test.go b/exporter/sumologicexporter/sender_test.go index c2189e722e39..85dff89b4b4b 100644 --- a/exporter/sumologicexporter/sender_test.go +++ b/exporter/sumologicexporter/sender_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck package sumologicexporter import ( @@ -546,7 +545,8 @@ func TestSendCompressGzip(t *testing.T) { test := prepareSenderTest(t, []func(res http.ResponseWriter, req *http.Request){ func(res http.ResponseWriter, req *http.Request) { res.WriteHeader(200) - res.Write([]byte("")) + _, err := res.Write([]byte("")) + require.NoError(t, err) body := decodeGzip(t, req.Body) assert.Equal(t, "gzip", req.Header.Get("Content-Encoding")) assert.Equal(t, "Some example log", body) @@ -570,7 +570,8 @@ func TestSendCompressDeflate(t *testing.T) { test := prepareSenderTest(t, []func(res http.ResponseWriter, req *http.Request){ func(res http.ResponseWriter, req *http.Request) { res.WriteHeader(200) - res.Write([]byte("")) + _, err := res.Write([]byte("")) + require.NoError(t, err) body := decodeDeflate(t, req.Body) assert.Equal(t, "deflate", req.Header.Get("Content-Encoding")) assert.Equal(t, "Some example log", body) diff --git a/exporter/tanzuobservabilityexporter/config.go b/exporter/tanzuobservabilityexporter/config.go index f16c83a566d1..087a9bbc5d11 100644 --- a/exporter/tanzuobservabilityexporter/config.go +++ b/exporter/tanzuobservabilityexporter/config.go @@ -69,13 +69,13 @@ func (c *Config) Validate() error { if c.hasTracesEndpoint() { tracesHostName, _, err = c.parseTracesEndpoint() if err != nil { - return fmt.Errorf("Failed to parse traces.endpoint: %v", err) + return fmt.Errorf("failed to parse traces.endpoint: %w", err) } } if c.hasMetricsEndpoint() { metricsHostName, _, err = c.parseMetricsEndpoint() if err != nil { - return fmt.Errorf("Failed to parse metrics.endpoint: %v", err) + return fmt.Errorf("failed to parse metrics.endpoint: %w", err) } } if c.hasTracesEndpoint() && c.hasMetricsEndpoint() && tracesHostName != metricsHostName { diff --git a/exporter/tanzuobservabilityexporter/exporter.go b/exporter/tanzuobservabilityexporter/exporter.go index 4feca974f938..150b5f7c50fc 100644 --- a/exporter/tanzuobservabilityexporter/exporter.go +++ b/exporter/tanzuobservabilityexporter/exporter.go @@ -72,13 +72,13 @@ func newTracesExporter(settings component.ExporterCreateSettings, c config.Expor } tracingHost, tracingPort, err := cfg.parseTracesEndpoint() if err != nil { - return nil, fmt.Errorf("failed to parse traces.endpoint: %v", err) + return nil, fmt.Errorf("failed to parse traces.endpoint: %w", err) } metricsPort := defaultMetricsPort if cfg.hasMetricsEndpoint() { _, metricsPort, err = cfg.parseMetricsEndpoint() if err != nil { - return nil, fmt.Errorf("failed to parse metrics.endpoint: %v", err) + return nil, fmt.Errorf("failed to parse metrics.endpoint: %w", err) } } @@ -92,7 +92,7 @@ func newTracesExporter(settings component.ExporterCreateSettings, c config.Expor SDKMetricsTags: map[string]string{"otel.traces.collector_version": settings.BuildInfo.Version}, }) if err != nil { - return nil, fmt.Errorf("failed to create proxy sender: %v", err) + return nil, fmt.Errorf("failed to create proxy sender: %w", err) } return &tracesExporter{ diff --git a/exporter/tanzuobservabilityexporter/go.mod b/exporter/tanzuobservabilityexporter/go.mod index 7be36ce5abe8..cab58adc542f 100644 --- a/exporter/tanzuobservabilityexporter/go.mod +++ b/exporter/tanzuobservabilityexporter/go.mod @@ -8,9 +8,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/resourcetotelemetry v0.53.0 github.com/stretchr/testify v1.7.2 github.com/wavefronthq/wavefront-sdk-go v0.9.11 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 diff --git a/exporter/tanzuobservabilityexporter/go.sum b/exporter/tanzuobservabilityexporter/go.sum index 14dda95f6d2a..6a4720430694 100644 --- a/exporter/tanzuobservabilityexporter/go.sum +++ b/exporter/tanzuobservabilityexporter/go.sum @@ -196,12 +196,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/tanzuobservabilityexporter/metrics_exporter.go b/exporter/tanzuobservabilityexporter/metrics_exporter.go index 1289e98c3333..89142eeb5e42 100644 --- a/exporter/tanzuobservabilityexporter/metrics_exporter.go +++ b/exporter/tanzuobservabilityexporter/metrics_exporter.go @@ -37,7 +37,7 @@ func createMetricsConsumer(hostName string, port int, settings component.Telemet SDKMetricsTags: map[string]string{"otel.metrics.collector_version": otelVersion}, }) if err != nil { - return nil, fmt.Errorf("failed to create proxy sender: %v", err) + return nil, fmt.Errorf("failed to create proxy sender: %w", err) } cumulative := newCumulativeHistogramDataPointConsumer(s) delta := newDeltaHistogramDataPointConsumer(s) @@ -66,7 +66,7 @@ func newMetricsExporter(settings component.ExporterCreateSettings, c config.Expo } hostName, port, err := cfg.parseMetricsEndpoint() if err != nil { - return nil, fmt.Errorf("failed to parse metrics.endpoint: %v", err) + return nil, fmt.Errorf("failed to parse metrics.endpoint: %w", err) } consumer, err := creator(hostName, port, settings.TelemetrySettings, settings.BuildInfo.Version) if err != nil { diff --git a/exporter/tencentcloudlogserviceexporter/README.md b/exporter/tencentcloudlogserviceexporter/README.md index 6958bf08c9ab..d8acfd7016bb 100644 --- a/exporter/tencentcloudlogserviceexporter/README.md +++ b/exporter/tencentcloudlogserviceexporter/README.md @@ -1,5 +1,11 @@ # TencentCloud LogService Exporter +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Supported pipeline types | logs | +| Distributions | [contrib] | + This exporter supports sending OpenTelemetry log data to [LogService](https://cloud.tencent.com/product/cls). # Configuration options: @@ -44,4 +50,7 @@ service: # Changelog - 2021-11-10 Change configuration item **endpoint** to **region**, by @wgliang -- 2021-11-01 Initial implementation by @wgliang in #5722 \ No newline at end of file +- 2021-11-01 Initial implementation by @wgliang in #5722 + +[beta]:https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib \ No newline at end of file diff --git a/exporter/tencentcloudlogserviceexporter/go.mod b/exporter/tencentcloudlogserviceexporter/go.mod index d4f3109e45d7..0d710707f8bf 100644 --- a/exporter/tencentcloudlogserviceexporter/go.mod +++ b/exporter/tencentcloudlogserviceexporter/go.mod @@ -5,14 +5,14 @@ go 1.17 require ( github.com/pierrec/lz4 v2.6.1+incompatible github.com/stretchr/testify v1.7.2 - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.416 - go.opentelemetry.io/collector v0.53.0 + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.418 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) require ( - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 google.golang.org/protobuf v1.28.0 ) diff --git a/exporter/tencentcloudlogserviceexporter/go.sum b/exporter/tencentcloudlogserviceexporter/go.sum index cba91ac5d5e6..c55e3bcdae1d 100644 --- a/exporter/tencentcloudlogserviceexporter/go.sum +++ b/exporter/tencentcloudlogserviceexporter/go.sum @@ -189,19 +189,19 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.416 h1:kD1JlhMcIO2sV+Ps+V1c1DlxC0r/VeIxMQXzZ7eRvoY= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.416/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.418 h1:8F7BYx/udM6ohaXB5s94OTDkjS90EusRV/xSeI/yyrM= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.418/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/exporter/zipkinexporter/go.mod b/exporter/zipkinexporter/go.mod index 2a25b9027e68..25d292a09e8a 100644 --- a/exporter/zipkinexporter/go.mod +++ b/exporter/zipkinexporter/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.53.0 github.com/openzipkin/zipkin-go v0.4.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( @@ -41,7 +41,7 @@ require ( github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/exporter/zipkinexporter/go.sum b/exporter/zipkinexporter/go.sum index 03b83137494e..243b90141dd9 100644 --- a/exporter/zipkinexporter/go.sum +++ b/exporter/zipkinexporter/go.sum @@ -251,12 +251,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/exporter/zipkinexporter/zipkin_test.go b/exporter/zipkinexporter/zipkin_test.go index 67e03e6acc75..d0c9a8d466e5 100644 --- a/exporter/zipkinexporter/zipkin_test.go +++ b/exporter/zipkinexporter/zipkin_test.go @@ -322,11 +322,11 @@ func TestZipkinExporter_roundtripProto(t *testing.T) { mzr.serializer = zipkin_proto3.SpanSerializer{} // Run the Zipkin receiver to "receive spans upload from a client application" - port := testutil.GetAvailablePort(t) + addr := testutil.GetAvailableLocalAddress(t) recvCfg := &zipkinreceiver.Config{ ReceiverSettings: config.NewReceiverSettings(config.NewComponentIDWithName("zipkin", "receiver")), HTTPServerSettings: confighttp.HTTPServerSettings{ - Endpoint: fmt.Sprintf(":%d", port), + Endpoint: addr, }, } zi, err := zipkinreceiver.NewFactory().CreateTracesReceiver(context.Background(), componenttest.NewNopReceiverCreateSettings(), recvCfg, zexp) @@ -337,7 +337,7 @@ func TestZipkinExporter_roundtripProto(t *testing.T) { t.Cleanup(func() { require.NoError(t, zi.Shutdown(context.Background())) }) // Let the receiver receive "uploaded Zipkin spans from a Java client application" - _, _ = http.Post(fmt.Sprintf("http://localhost:%d", port), "", strings.NewReader(zipkinSpansJSONJavaLibrary)) + _, _ = http.Post("http://"+addr, "", strings.NewReader(zipkinSpansJSONJavaLibrary)) // Use the mock zipkin reporter to ensure all expected spans in a single batch. Since Flush waits for // server response there is no need for further synchronization. diff --git a/extension/asapauthextension/go.mod b/extension/asapauthextension/go.mod index 59c74d77430c..fda0ac52342e 100644 --- a/extension/asapauthextension/go.mod +++ b/extension/asapauthextension/go.mod @@ -6,7 +6,7 @@ require ( bitbucket.org/atlassian/go-asap/v2 v2.6.0 github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 google.golang.org/grpc v1.47.0 ) @@ -30,7 +30,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect github.com/vincent-petithory/dataurl v1.0.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/asapauthextension/go.sum b/extension/asapauthextension/go.sum index cc0c04b91284..e00988e520c6 100644 --- a/extension/asapauthextension/go.sum +++ b/extension/asapauthextension/go.sum @@ -191,10 +191,10 @@ github.com/vincent-petithory/dataurl v1.0.0/go.mod h1:FHafX5vmDzyP+1CQATJn7WFKc9 github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/awsproxy/factory_test.go b/extension/awsproxy/factory_test.go index e51cf6820996..c9a5163fe217 100644 --- a/extension/awsproxy/factory_test.go +++ b/extension/awsproxy/factory_test.go @@ -19,7 +19,6 @@ import ( "fmt" "net/http" "net/http/httptest" - "os" "strings" "testing" "time" @@ -71,8 +70,8 @@ func TestFactory_CreateExtension(t *testing.T) { cfg.ProxyConfig.Region = "us-east-2" // Simplest way to get SDK to use fake credentials - os.Setenv("AWS_ACCESS_KEY_ID", "fakeAccessKeyID") - os.Setenv("AWS_SECRET_ACCESS_KEY", "fakeSecretAccessKey") + t.Setenv("AWS_ACCESS_KEY_ID", "fakeAccessKeyID") + t.Setenv("AWS_SECRET_ACCESS_KEY", "fakeSecretAccessKey") ctx := context.Background() ext, err := createExtension(ctx, componenttest.NewNopExtensionCreateSettings(), cfg) diff --git a/extension/awsproxy/go.mod b/extension/awsproxy/go.mod index a8068e6869f7..1247461cd59d 100644 --- a/extension/awsproxy/go.mod +++ b/extension/awsproxy/go.mod @@ -6,12 +6,12 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) require ( - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.2 // indirect @@ -25,7 +25,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/awsproxy/go.sum b/extension/awsproxy/go.sum index 5f35a439a828..602b490fc670 100644 --- a/extension/awsproxy/go.sum +++ b/extension/awsproxy/go.sum @@ -5,8 +5,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -179,10 +179,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/basicauthextension/extension_test.go b/extension/basicauthextension/extension_test.go index 6ce142af322b..bdbb9bfb9504 100644 --- a/extension/basicauthextension/extension_test.go +++ b/extension/basicauthextension/extension_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck package basicauthextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension" import ( @@ -165,7 +164,8 @@ func TestBasicAuth_HtpasswdInlinePrecedence(t *testing.T) { require.NoError(t, err) defer os.Remove(f.Name()) - f.WriteString("username:fromfile") + _, err = f.WriteString("username:fromfile") + require.NoError(t, err) ext, err := newServerAuthExtension(&Config{ Htpasswd: &HtpasswdSettings{ diff --git a/extension/basicauthextension/go.mod b/extension/basicauthextension/go.mod index 2a09e3842b57..13a380f662ac 100644 --- a/extension/basicauthextension/go.mod +++ b/extension/basicauthextension/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 github.com/tg123/go-htpasswd v1.2.0 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 google.golang.org/grpc v1.47.0 ) @@ -26,7 +26,7 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/basicauthextension/go.sum b/extension/basicauthextension/go.sum index 71e21fa08724..0be9694ccb26 100644 --- a/extension/basicauthextension/go.sum +++ b/extension/basicauthextension/go.sum @@ -184,10 +184,10 @@ github.com/tg123/go-htpasswd v1.2.0/go.mod h1:h7IzlfpvIWnVJhNZ0nQ9HaFxHb7pn5uFJY github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/bearertokenauthextension/go.mod b/extension/bearertokenauthextension/go.mod index c80bf6958735..65d0146455ca 100644 --- a/extension/bearertokenauthextension/go.mod +++ b/extension/bearertokenauthextension/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.47.0 ) @@ -25,7 +25,7 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/bearertokenauthextension/go.sum b/extension/bearertokenauthextension/go.sum index 048c3020beb2..d2678698c913 100644 --- a/extension/bearertokenauthextension/go.sum +++ b/extension/bearertokenauthextension/go.sum @@ -180,10 +180,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/fluentbitextension/README.md b/extension/fluentbitextension/README.md index afb00957642a..75ba92533f42 100644 --- a/extension/fluentbitextension/README.md +++ b/extension/fluentbitextension/README.md @@ -1,5 +1,10 @@ # Deprecated FluentBit Subprocess Extension +| Status | | +| ------------------------ |-------------------| +| Stability | [deprecated] | +| Distributions | [contrib] | + This extension has been deprecated due to security concerns around the ability to specify the execution of any arbitrary processes via its configuration. See [#6721](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/6721) for additional details. @@ -91,3 +96,6 @@ service: exporters: [mymetricsexporter] extensions: [health_check, zpages, fluentbit, pprof] ``` + +[deprecated]:https://github.com/open-telemetry/opentelemetry-collector#deprecated +[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib \ No newline at end of file diff --git a/extension/fluentbitextension/go.mod b/extension/fluentbitextension/go.mod index 81c45214bdee..718cea89ae58 100644 --- a/extension/fluentbitextension/go.mod +++ b/extension/fluentbitextension/go.mod @@ -7,7 +7,7 @@ require ( github.com/davecgh/go-spew v1.1.1 github.com/shirou/gopsutil/v3 v3.22.5 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -33,7 +33,7 @@ require ( github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/numcpus v0.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/fluentbitextension/go.sum b/extension/fluentbitextension/go.sum index 7d207e0a5059..849c5e210d8f 100644 --- a/extension/fluentbitextension/go.sum +++ b/extension/fluentbitextension/go.sum @@ -195,10 +195,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/fluentbitextension/process_linux_test.go b/extension/fluentbitextension/process_linux_test.go index d34eafd2fec9..77fa25669765 100644 --- a/extension/fluentbitextension/process_linux_test.go +++ b/extension/fluentbitextension/process_linux_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck package fluentbitextension import ( @@ -91,8 +90,10 @@ func TestProcessManager(t *testing.T) { }) defer cleanup() - pm.Start(ctx, nil) - defer pm.Shutdown(ctx) + require.NoError(t, pm.Start(ctx, nil)) + defer func() { + require.NoError(t, pm.Shutdown(ctx)) + }() require.Eventually(t, findSubproc, 12*time.Second, 100*time.Millisecond) require.NotNil(t, *mockProc) @@ -126,8 +127,10 @@ func TestProcessManagerArgs(t *testing.T) { }) defer cleanup() - pm.Start(ctx, nil) - defer pm.Shutdown(ctx) + require.NoError(t, pm.Start(ctx, nil)) + defer func() { + require.NoError(t, pm.Shutdown(ctx)) + }() require.Eventually(t, findSubproc, 12*time.Second, 100*time.Millisecond) require.NotNil(t, *mockProc) @@ -153,8 +156,10 @@ func TestProcessManagerBadExec(t *testing.T) { Config: "example config", }, logger) - pm.Start(ctx, nil) - defer pm.Shutdown(ctx) + require.NoError(t, pm.Start(ctx, nil)) + defer func() { + require.NoError(t, pm.Shutdown(ctx)) + }() time.Sleep(restartDelay + 2*time.Second) require.Len(t, logObserver.FilterMessage("FluentBit process died").All(), 2) @@ -170,8 +175,10 @@ func TestProcessManagerEmptyConfig(t *testing.T) { }) defer cleanup() - pm.Start(ctx, nil) - defer pm.Shutdown(ctx) + require.NoError(t, pm.Start(ctx, nil)) + defer func() { + require.NoError(t, pm.Shutdown(ctx)) + }() require.Eventually(t, findSubproc, 15*time.Second, 100*time.Millisecond) require.NotNil(t, *mockProc) diff --git a/extension/healthcheckextension/go.mod b/extension/healthcheckextension/go.mod index d78637ea00ab..5fbe2ebd267b 100644 --- a/extension/healthcheckextension/go.mod +++ b/extension/healthcheckextension/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -24,7 +24,7 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/healthcheckextension/go.sum b/extension/healthcheckextension/go.sum index fff18ecc9f1b..53906e298373 100644 --- a/extension/healthcheckextension/go.sum +++ b/extension/healthcheckextension/go.sum @@ -177,10 +177,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/httpforwarder/extension_test.go b/extension/httpforwarder/extension_test.go index 19b5b327138e..828c791f96dd 100644 --- a/extension/httpforwarder/extension_test.go +++ b/extension/httpforwarder/extension_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:errcheck,gocritic package httpforwarder import ( @@ -196,7 +195,8 @@ func TestExtension(t *testing.T) { w.Header().Set(k, v) } w.WriteHeader(test.expectedbackendStatusCode) - w.Write(test.expectedBackendResponseBody) + _, err := w.Write(test.expectedBackendResponseBody) + assert.NoError(t, err) })) defer backend.Close() @@ -244,7 +244,10 @@ func TestExtension(t *testing.T) { header := strings.ToLower(k) if want, ok := test.expectedHeaders[header]; ok { assert.Equal(t, want, got) - } else if k == "Content-Length" || k == "Content-Type" || k == "X-Content-Type-Options" || k == "Date" || k == "Via" { + continue + } + + if k == "Content-Length" || k == "Content-Type" || k == "X-Content-Type-Options" || k == "Date" || k == "Via" { // Content-Length, Content-Type, X-Content-Type-Options and Date are certain headers added by default. // Assertion for Via is done above. continue diff --git a/extension/httpforwarder/go.mod b/extension/httpforwarder/go.mod index 6584dc7905c7..1b457935e14a 100644 --- a/extension/httpforwarder/go.mod +++ b/extension/httpforwarder/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -32,7 +32,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/rs/cors v1.8.2 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/extension/httpforwarder/go.sum b/extension/httpforwarder/go.sum index 8d02e3e32d23..9ca26c99a531 100644 --- a/extension/httpforwarder/go.sum +++ b/extension/httpforwarder/go.sum @@ -190,10 +190,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/extension/jaegerremotesampling/extension.go b/extension/jaegerremotesampling/extension.go index 82deeb3f3713..ed6069900f8f 100644 --- a/extension/jaegerremotesampling/extension.go +++ b/extension/jaegerremotesampling/extension.go @@ -61,7 +61,7 @@ func (jrse *jrsExtension) Start(ctx context.Context, host component.Host) error } ss, err := static.NewStrategyStore(opts, jrse.telemetry.Logger) if err != nil { - return fmt.Errorf("failed to create the local file strategy store: %v", err) + return fmt.Errorf("failed to create the local file strategy store: %w", err) } // there's a Close function on the concrete type, which is not visible to us... @@ -72,11 +72,11 @@ func (jrse *jrsExtension) Start(ctx context.Context, host component.Host) error if jrse.cfg.Source.Remote != nil { opts, err := jrse.cfg.Source.Remote.ToDialOptions(host, jrse.telemetry) if err != nil { - return fmt.Errorf("error while setting up the remote sampling source: %v", err) + return fmt.Errorf("error while setting up the remote sampling source: %w", err) } conn, err := grpc.Dial(jrse.cfg.Source.Remote.Endpoint, opts...) if err != nil { - return fmt.Errorf("error while connecting to the remote sampling source: %v", err) + return fmt.Errorf("error while connecting to the remote sampling source: %w", err) } jrse.samplingStore = grpcStore.NewConfigManager(conn) @@ -88,7 +88,7 @@ func (jrse *jrsExtension) Start(ctx context.Context, host component.Host) error if jrse.cfg.HTTPServerSettings != nil { httpServer, err := internal.NewHTTP(jrse.telemetry, *jrse.cfg.HTTPServerSettings, jrse.samplingStore) if err != nil { - return fmt.Errorf("error while creating the HTTP server: %v", err) + return fmt.Errorf("error while creating the HTTP server: %w", err) } jrse.httpServer = httpServer } @@ -96,7 +96,7 @@ func (jrse *jrsExtension) Start(ctx context.Context, host component.Host) error // then we start our own server interfaces, starting with the HTTP one err := jrse.httpServer.Start(ctx, host) if err != nil { - return fmt.Errorf("error while starting the HTTP server: %v", err) + return fmt.Errorf("error while starting the HTTP server: %w", err) } return nil diff --git a/extension/jaegerremotesampling/go.mod b/extension/jaegerremotesampling/go.mod index b29122cfeb47..62503e9a439c 100644 --- a/extension/jaegerremotesampling/go.mod +++ b/extension/jaegerremotesampling/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/jaegertracing/jaeger v1.35.1 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.47.0 ) @@ -46,7 +46,7 @@ require ( github.com/subosito/gotenv v1.2.0 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect diff --git a/extension/jaegerremotesampling/go.sum b/extension/jaegerremotesampling/go.sum index 074e5ef5cff6..8f4ba7cc5241 100644 --- a/extension/jaegerremotesampling/go.sum +++ b/extension/jaegerremotesampling/go.sum @@ -369,10 +369,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= diff --git a/extension/jaegerremotesampling/internal/http.go b/extension/jaegerremotesampling/internal/http.go index 99c5a7a96fa2..0a8d614b1c4a 100644 --- a/extension/jaegerremotesampling/internal/http.go +++ b/extension/jaegerremotesampling/internal/http.go @@ -85,7 +85,7 @@ func (h *SamplingHTTPServer) Start(_ context.Context, host component.Host) error go func() { defer h.shutdownWG.Done() - if err := h.srv.Serve(hln); err != http.ErrServerClosed && err != nil { + if err := h.srv.Serve(hln); err != nil && !errors.Is(err, http.ErrServerClosed) { host.ReportFatalError(err) } }() @@ -109,21 +109,21 @@ func (h *SamplingHTTPServer) samplingStrategyHandler(rw http.ResponseWriter, r * resp, err := h.strategyStore.GetSamplingStrategy(r.Context(), svc) if err != nil { - err = fmt.Errorf("failed to get sampling strategy for service %q: %v", svc, err) + err = fmt.Errorf("failed to get sampling strategy for service %q: %w", svc, err) http.Error(rw, err.Error(), http.StatusInternalServerError) return } jsonBytes, err := json.Marshal(resp) if err != nil { - err = fmt.Errorf("cannot convert sampling strategy to JSON: %v", err) + err = fmt.Errorf("cannot convert sampling strategy to JSON: %w", err) http.Error(rw, err.Error(), http.StatusInternalServerError) return } rw.Header().Add("Content-Type", "application/json") if _, err := rw.Write(jsonBytes); err != nil { - err = fmt.Errorf("cannot write response to client: %v", err) + err = fmt.Errorf("cannot write response to client: %w", err) http.Error(rw, err.Error(), http.StatusInternalServerError) return } diff --git a/extension/oauth2clientauthextension/go.mod b/extension/oauth2clientauthextension/go.mod index 8b6cf346e86f..c3ad44b5254c 100644 --- a/extension/oauth2clientauthextension/go.mod +++ b/extension/oauth2clientauthextension/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 google.golang.org/grpc v1.47.0 @@ -33,7 +33,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/cors v1.8.2 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/extension/oauth2clientauthextension/go.sum b/extension/oauth2clientauthextension/go.sum index 3186d2ec3554..60109f5bd62c 100644 --- a/extension/oauth2clientauthextension/go.sum +++ b/extension/oauth2clientauthextension/go.sum @@ -315,10 +315,10 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/extension/observer/dockerobserver/extension.go b/extension/observer/dockerobserver/extension.go index 67e26081678a..07426a90df47 100644 --- a/extension/observer/dockerobserver/extension.go +++ b/extension/observer/dockerobserver/extension.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:gocritic package dockerobserver // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/dockerobserver" import ( @@ -217,13 +216,11 @@ func (d *dockerObserver) updateEndpointsByContainerID(listener observer.Notify, // If it does not exist already, it is a new endpoint. Add it. if existingEndpoint, ok := existingEndpointsMap[e.ID]; !ok { addedEndpoints = append(addedEndpoints, e) - } else { + } else if !reflect.DeepEqual(existingEndpoint, e) { // if it already exists, see if it's equal. // if it's not equal, update it // if its equal, no-op. - if !reflect.DeepEqual(existingEndpoint, e) { - updatedEndpoints = append(updatedEndpoints, e) - } + updatedEndpoints = append(updatedEndpoints, e) } } diff --git a/extension/observer/dockerobserver/go.mod b/extension/observer/dockerobserver/go.mod index 0f80c602b60d..fe1cdbd7137a 100644 --- a/extension/observer/dockerobserver/go.mod +++ b/extension/observer/dockerobserver/go.mod @@ -3,14 +3,14 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/obser go 1.17 require ( - github.com/docker/docker v20.10.16+incompatible + github.com/docker/docker v20.10.17+incompatible github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -41,7 +41,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/observer/dockerobserver/go.sum b/extension/observer/dockerobserver/go.sum index 10e628724ca7..69fa98150021 100644 --- a/extension/observer/dockerobserver/go.sum +++ b/extension/observer/dockerobserver/go.sum @@ -43,8 +43,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.0-beta.1+incompatible h1:9MjVa+OTMHm4C0kKZB68jPlDM9Cg75ta4i46Gxxxn8o= github.com/docker/distribution v2.8.0-beta.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -209,10 +209,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/observer/ecsobserver/go.mod b/extension/observer/ecsobserver/go.mod index 746f259ceea5..7f418f4546cf 100644 --- a/extension/observer/ecsobserver/go.mod +++ b/extension/observer/ecsobserver/go.mod @@ -3,10 +3,10 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/extension/obser go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/hashicorp/golang-lru v0.5.4 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 gopkg.in/yaml.v2 v2.4.0 @@ -28,7 +28,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/observer/ecsobserver/go.sum b/extension/observer/ecsobserver/go.sum index 54f3b7676f55..f800e3c5bbf4 100644 --- a/extension/observer/ecsobserver/go.sum +++ b/extension/observer/ecsobserver/go.sum @@ -5,8 +5,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -186,10 +186,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/observer/ecsobserver/internal/errctx/value.go b/extension/observer/ecsobserver/internal/errctx/value.go index 55bde21920fe..c07509220b7e 100644 --- a/extension/observer/ecsobserver/internal/errctx/value.go +++ b/extension/observer/ecsobserver/internal/errctx/value.go @@ -94,8 +94,8 @@ func ValueFrom(err error, key string) (interface{}, bool) { if err == nil { return nil, false } - verr, ok := err.(ErrorWithValue) - if ok { + var verr ErrorWithValue + if errors.As(err, &verr) { v, vok := verr.Value(key) if vok { return v, vok diff --git a/extension/observer/ecsobserver/matcher.go b/extension/observer/ecsobserver/matcher.go index 219f0c8fa835..4afa8e582c30 100644 --- a/extension/observer/ecsobserver/matcher.go +++ b/extension/observer/ecsobserver/matcher.go @@ -15,6 +15,7 @@ package ecsobserver // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer/ecsobserver" import ( + "errors" "fmt" "regexp" @@ -168,7 +169,7 @@ func matchContainers(tasks []*taskAnnotated, matcher targetMatcher, matcherIndex // NOTE: we don't stop when there is an error because it could be one task having invalid docker label. if err != nil { // Keep track of unexpected error - if err != errNotMatched { + if !errors.Is(err, errNotMatched) { multierr.AppendInto(&merr, err) } continue diff --git a/extension/observer/ecsobserver/task_test.go b/extension/observer/ecsobserver/task_test.go index cfa52b0a4332..e64979f774c2 100644 --- a/extension/observer/ecsobserver/task_test.go +++ b/extension/observer/ecsobserver/task_test.go @@ -96,8 +96,9 @@ func TestTask_PrivateIP(t *testing.T) { task.Definition.NetworkMode = aws.String(mode) _, err := task.PrivateIP() assert.Error(t, err) - assert.IsType(t, &errPrivateIPNotFound{}, err) - assert.Equal(t, mode, err.(*errPrivateIPNotFound).NetworkMode) + errPINF := &errPrivateIPNotFound{} + require.ErrorAs(t, err, &errPINF) + assert.Equal(t, mode, errPINF.NetworkMode) // doing contains on error message is not good, but this line increase test coverage from 93% to 98% // not sure how the average coverage is calculated ... assert.Contains(t, err.Error(), mode) @@ -192,7 +193,9 @@ func TestTask_MappedPort(t *testing.T) { task.Definition.NetworkMode = aws.String(mode) _, err := task.MappedPort(&ecs.ContainerDefinition{Name: aws.String("c11")}, 1234) assert.Error(t, err) - assert.Equal(t, mode, err.(*errMappedPortNotFound).NetworkMode) + errMPNF := &errMappedPortNotFound{} + require.ErrorAs(t, err, &errMPNF) + assert.Equal(t, mode, errMPNF.NetworkMode) assert.Contains(t, err.Error(), mode) // for coverage } }) diff --git a/extension/observer/ecstaskobserver/README.md b/extension/observer/ecstaskobserver/README.md index 37bb7b270480..1d4ccfd85084 100644 --- a/extension/observer/ecstaskobserver/README.md +++ b/extension/observer/ecstaskobserver/README.md @@ -70,14 +70,14 @@ All fields are optional. | Name | Type | Default | Docs | | ---- | ---- | ------- | ---- | | endpoint |string| | The task metadata endpoint, detected from first of `ECS_CONTAINER_METADATA_URI_V4` and `ECS_CONTAINER_METADATA_URI` environment variables by default | -| tls |[configtls-TLSClientSetting](#configtls-TLSClientSetting)| | TLSSetting struct exposes TLS client configuration. | +| tls |[configtls-TLSClientSetting](#configtls-tlsclientsetting)| | TLSSetting struct exposes TLS client configuration. | | read_buffer_size |int| | ReadBufferSize for HTTP client. See http.Transport.ReadBufferSize. | | write_buffer_size |int| | WriteBufferSize for HTTP client. See http.Transport.WriteBufferSize. | -| timeout |[time-Duration](#time-Duration)| | Timeout parameter configures `http.Client.Timeout`. | +| timeout |[time-Duration](#time-duration)| | Timeout parameter configures `http.Client.Timeout`. | | headers |map[string]string| | Additional headers attached to each HTTP request sent by the client. Existing header values are overwritten if collision happens. | | customroundtripper |func(http.RoundTripper) (http.RoundTripper, error)| | Custom Round Tripper to allow for individual components to intercept HTTP requests | -| auth |[configauth-Authentication](#configauth-Authentication)| | Auth configuration for outgoing HTTP calls. | -| refresh_interval |[time-Duration](#time-Duration)| 30s | RefreshInterval determines the frequency at which the observer needs to poll for collecting new information about task containers. | +| auth |[Authentication]| | Auth configuration for outgoing HTTP calls. | +| refresh_interval |[time-Duration](#time-duration)| 30s | RefreshInterval determines the frequency at which the observer needs to poll for collecting new information about task containers. | | port_labels |[]string| `[ECS_TASK_OBSERVER_PORT]` | PortLabels is a list of container Docker labels from which to obtain the observed Endpoint port. The first label with valid port found will be used. If no PortLabels provided, default of ECS_TASK_OBSERVER_PORT will be used. | ### configtls-TLSClientSetting @@ -93,11 +93,7 @@ All fields are optional. | insecure_skip_verify |bool| | InsecureSkipVerify will enable TLS but not verify the certificate. | | server_name_override |string| | ServerName requested by client for virtual hosting. This sets the ServerName in the TLSConfig. Please refer to https://godoc.org/crypto/tls#Config for more information. (optional) | -### configauth-Authentication - -| Name | Type | Default | Docs | -| ---- | ---- | ------- | ---- | -| authenticator |[config-ComponentID](#config-ComponentID)| | AuthenticatorID specifies the name of the extension to use in order to authenticate the incoming data point. | - ### time-Duration An optionally signed sequence of decimal numbers, each with a unit suffix, such as `300ms`, `-1.5h`, or `2h45m`. Valid time units are `ns`, `us`, `ms`, `s`, `m`, `h`. + +[Authentication]: https://github.com/open-telemetry/opentelemetry-collector/tree/main/config/configauth \ No newline at end of file diff --git a/extension/observer/ecstaskobserver/go.mod b/extension/observer/ecstaskobserver/go.mod index 3572a503bea8..28ebe9b1480b 100644 --- a/extension/observer/ecstaskobserver/go.mod +++ b/extension/observer/ecstaskobserver/go.mod @@ -7,7 +7,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -29,7 +29,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rs/cors v1.8.2 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/extension/observer/ecstaskobserver/go.sum b/extension/observer/ecstaskobserver/go.sum index b0f53988b09b..f88c0a0a1ef7 100644 --- a/extension/observer/ecstaskobserver/go.sum +++ b/extension/observer/ecstaskobserver/go.sum @@ -182,10 +182,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/extension/observer/endpointswatcher.go b/extension/observer/endpointswatcher.go index 90160fd7aeef..269665ac9356 100644 --- a/extension/observer/endpointswatcher.go +++ b/extension/observer/endpointswatcher.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:gocritic package observer // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer" import ( @@ -73,12 +72,10 @@ func (ew *EndpointsWatcher) refreshEndpoints(listener Notify) { if existingEndpoint, ok := ew.existingEndpoints[e.ID]; !ok { ew.existingEndpoints[e.ID] = e addedEndpoints = append(addedEndpoints, e) - } else { + } else if !reflect.DeepEqual(existingEndpoint, e) { // Collect updated endpoints. - if !reflect.DeepEqual(existingEndpoint, e) { - ew.existingEndpoints[e.ID] = e - updatedEndpoints = append(updatedEndpoints, e) - } + ew.existingEndpoints[e.ID] = e + updatedEndpoints = append(updatedEndpoints, e) } } diff --git a/extension/observer/hostobserver/extension.go b/extension/observer/hostobserver/extension.go index 83ed2baddec2..6950f3242030 100644 --- a/extension/observer/hostobserver/extension.go +++ b/extension/observer/hostobserver/extension.go @@ -228,12 +228,12 @@ type processDetails struct { func collectProcessDetails(proc *process.Process) (*processDetails, error) { name, err := proc.Name() if err != nil { - return nil, fmt.Errorf("could not get process name: %v", err) + return nil, fmt.Errorf("could not get process name: %w", err) } args, err := proc.Cmdline() if err != nil { - return nil, fmt.Errorf("could not get process args: %v", err) + return nil, fmt.Errorf("could not get process args: %w", err) } return &processDetails{ diff --git a/extension/observer/hostobserver/go.mod b/extension/observer/hostobserver/go.mod index 15388a17f696..08f60930beb7 100644 --- a/extension/observer/hostobserver/go.mod +++ b/extension/observer/hostobserver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.53.0 github.com/shirou/gopsutil/v3 v3.22.5 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -33,7 +33,7 @@ require ( github.com/tklauser/go-sysconf v0.3.10 // indirect github.com/tklauser/numcpus v0.4.0 // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/observer/hostobserver/go.sum b/extension/observer/hostobserver/go.sum index 7d207e0a5059..849c5e210d8f 100644 --- a/extension/observer/hostobserver/go.sum +++ b/extension/observer/hostobserver/go.sum @@ -195,10 +195,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/observer/k8sobserver/config_test.go b/extension/observer/k8sobserver/config_test.go index 42bbacb2808b..4400773a3bfb 100644 --- a/extension/observer/k8sobserver/config_test.go +++ b/extension/observer/k8sobserver/config_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:gocritic package k8sobserver import ( @@ -73,7 +72,7 @@ func TestInvalidAuth(t *testing.T) { factory := NewFactory() factories.Extensions[typeStr] = factory - cfg, err := servicetest.LoadConfigAndValidate(filepath.Join("testdata/invalid_auth.yaml"), factories) + cfg, err := servicetest.LoadConfigAndValidate(filepath.Join("testdata", "invalid_auth.yaml"), factories) require.NotNil(t, cfg) require.EqualError(t, err, `extension "k8s_observer" has invalid configuration: invalid authType for kubernetes: not a real auth type`) } @@ -84,7 +83,7 @@ func TestInvalidNoObserving(t *testing.T) { factory := NewFactory() factories.Extensions[typeStr] = factory - cfg, err := servicetest.LoadConfigAndValidate(filepath.Join("testdata/invalid_no_observing.yaml"), factories) + cfg, err := servicetest.LoadConfigAndValidate(filepath.Join("testdata", "invalid_no_observing.yaml"), factories) require.NotNil(t, cfg) require.EqualError(t, err, `extension "k8s_observer" has invalid configuration: one of observe_pods and observe_nodes must be true`) } diff --git a/extension/observer/k8sobserver/extension_test.go b/extension/observer/k8sobserver/extension_test.go index ccadb3d4831f..944935e0853a 100644 --- a/extension/observer/k8sobserver/extension_test.go +++ b/extension/observer/k8sobserver/extension_test.go @@ -16,7 +16,6 @@ package k8sobserver import ( "context" - "os" "testing" "github.com/stretchr/testify/assert" @@ -33,21 +32,16 @@ const ( servicePortEnv = "KUBERNETES_SERVICE_PORT" ) -func mockServiceHost(c *Config) func() { +func mockServiceHost(t testing.TB, c *Config) { c.AuthType = k8sconfig.AuthTypeNone - host, port := os.Getenv(serviceHostEnv), os.Getenv(servicePortEnv) - os.Setenv(serviceHostEnv, "mock") - os.Setenv(servicePortEnv, "12345") - return func() { - os.Setenv(serviceHostEnv, host) - os.Setenv(servicePortEnv, port) - } + t.Setenv(serviceHostEnv, "mock") + t.Setenv(servicePortEnv, "12345") } func TestNewExtension(t *testing.T) { factory := NewFactory() config := factory.CreateDefaultConfig().(*Config) - defer mockServiceHost(config)() + mockServiceHost(t, config) ext, err := newObserver(config, componenttest.NewNopTelemetrySettings()) require.NoError(t, err) @@ -57,7 +51,7 @@ func TestNewExtension(t *testing.T) { func TestExtensionObservePods(t *testing.T) { factory := NewFactory() config := factory.CreateDefaultConfig().(*Config) - defer mockServiceHost(config)() + mockServiceHost(t, config) ext, err := newObserver(config, componenttest.NewNopTelemetrySettings()) require.NoError(t, err) @@ -117,7 +111,7 @@ func TestExtensionObservePods(t *testing.T) { func TestExtensionObserveNodes(t *testing.T) { factory := NewFactory() config := factory.CreateDefaultConfig().(*Config) - defer mockServiceHost(config)() + mockServiceHost(t, config) ext, err := newObserver(config, componenttest.NewNopTelemetrySettings()) require.NoError(t, err) diff --git a/extension/observer/k8sobserver/go.mod b/extension/observer/k8sobserver/go.mod index be8e44b7513c..e63e8b2dd81d 100644 --- a/extension/observer/k8sobserver/go.mod +++ b/extension/observer/k8sobserver/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/observer v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 k8s.io/api v0.24.1 k8s.io/apimachinery v0.24.1 @@ -45,7 +45,7 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/observer/k8sobserver/go.sum b/extension/observer/k8sobserver/go.sum index 3811261a5468..af44c8386456 100644 --- a/extension/observer/k8sobserver/go.sum +++ b/extension/observer/k8sobserver/go.sum @@ -384,10 +384,10 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/observer/k8sobserver/mocks_test.go b/extension/observer/k8sobserver/mocks_test.go index c8593ab2d99b..96dc9404b3e6 100644 --- a/extension/observer/k8sobserver/mocks_test.go +++ b/extension/observer/k8sobserver/mocks_test.go @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -// nolint:gocritic package k8sobserver import ( @@ -47,7 +46,8 @@ func (e *endpointSink) OnRemove(removed []observer.Endpoint) { func (e *endpointSink) OnChange(changed []observer.Endpoint) { e.Lock() defer e.Unlock() - e.changed = append(e.removed, changed...) + e.changed = e.removed + e.changed = append(e.changed, changed...) } var _ observer.Notify = (*endpointSink)(nil) diff --git a/extension/oidcauthextension/go.mod b/extension/oidcauthextension/go.mod index 9876de70e1c9..bc8eaad23c9a 100644 --- a/extension/oidcauthextension/go.mod +++ b/extension/oidcauthextension/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/coreos/go-oidc v2.2.1+incompatible github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -26,7 +26,7 @@ require ( github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/pquerna/cachecontrol v0.1.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/oidcauthextension/go.sum b/extension/oidcauthextension/go.sum index a0c20f709927..033f7c10990e 100644 --- a/extension/oidcauthextension/go.sum +++ b/extension/oidcauthextension/go.sum @@ -262,10 +262,10 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/pprofextension/go.mod b/extension/pprofextension/go.mod index d3b07e24599e..51214bdc2863 100644 --- a/extension/pprofextension/go.mod +++ b/extension/pprofextension/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/zap v1.21.0 ) @@ -26,7 +26,7 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/pprofextension/go.sum b/extension/pprofextension/go.sum index b4fd17fb959d..fd14d66e6e51 100644 --- a/extension/pprofextension/go.sum +++ b/extension/pprofextension/go.sum @@ -180,10 +180,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/sigv4authextension/go.mod b/extension/sigv4authextension/go.mod index 83a99e45faf8..46b48f848ec8 100644 --- a/extension/sigv4authextension/go.mod +++ b/extension/sigv4authextension/go.mod @@ -8,7 +8,7 @@ require ( github.com/aws/aws-sdk-go-v2/credentials v1.4.3 github.com/aws/aws-sdk-go-v2/service/sts v1.7.2 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.47.0 ) @@ -31,7 +31,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/sigv4authextension/go.sum b/extension/sigv4authextension/go.sum index 81b29bb5ad43..982b3cfc4835 100644 --- a/extension/sigv4authextension/go.sum +++ b/extension/sigv4authextension/go.sum @@ -181,10 +181,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/extension/storage/filestorage/README.md b/extension/storage/filestorage/README.md index 8650f963542a..571912d1ca33 100644 --- a/extension/storage/filestorage/README.md +++ b/extension/storage/filestorage/README.md @@ -12,14 +12,49 @@ The default directory is `%ProgramData%\Otelcol\FileStorage` on Windows and `/va `timeout` is the maximum time to wait for a file lock. This value does not need to be modified in most circumstances. The default timeout is `1s`. -`compaction` defines how and when files should be compacted. -For now only compaction on start of the collector is supported, and can be enabled by `compaction.on_start` option. +## Compaction +`compaction` defines how and when files should be compacted. There are two modes of compaction available (both of which can be set concurrently): +- `compaction.on_start` (default: false), which happens when collector starts +- `compaction.on_rebound` (default: false), which happens online when certain criteria are met; it's discussed in more detail below -`compaction.directory` is the directory used for compaction (as midstep). +`compaction.directory` specifies the directory used for compaction (as a midstep). -`compaction.max_transaction_size` defines maximum size of the compaction transaction. +`compaction.max_transaction_size` (default: 65536): defines maximum size of the compaction transaction. A value of zero will ignore transaction sizes. +### Rebound (online) compaction + +For rebound compaction, there are two additional parameters available: +- `compaction.rebound_needed_threshold_mib` (default: 100) - when allocated data exceeds this amount, the "compaction needed" flag will be enabled +- `compaction.rebound_trigger_threshold_mib` (default: 10) - if the "compaction needed" flag is set and allocated data drops below this amount, compaction will begin and the "compaction needed" flag will be cleared +- `compaction.check_interval` (default: 5s) - specifies how frequently the conditions for compaction are being checked + +The idea behind rebound compaction is that in certain workloads (e.g. [persistent queue](https://github.com/open-telemetry/opentelemetry-collector/tree/main/exporter/exporterhelper#persistent-queue)) the storage might grow significantly (e.g. when the exporter is unable to send the data due to network problem) after which it is being emptied as the underlying issue is gone (e.g. network connectivity is back). This leaves a significant space that needs to be reclaimed (also, this space is reported in memory usage as mmap() is used underneath). The optimal conditions for this to happen online is after the storage is largely drained, which is being controlled by `rebound_trigger_threshold_mib`. To make sure this is not too sensitive, there's also `rebound_needed_threshold_mib` which specifies the total claimed space size that must be met for online compaction to even be considered. Consider following diagram for an example of meeting the rebound (online) compaction conditions. + +``` + β–² + β”‚ + β”‚ XX............. +m β”‚ XXXX............ +e β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€XXXXXXX..........──────────── rebound_needed_threshold_mib +m β”‚ XXXXXXXXX.......... +o β”‚ XXXXXXXXXXX......... +r β”‚ XXXXXXXXXXXXXXXXX.... +y β”œβ”€β”€β”€β”€β”€XXXXXXXXXXXXXXXXXXXXX..──────────── rebound_trigger_threshold_mib + β”‚ XXXXXXXXXXXXXXXXXXXXXXXXXX......... + β”‚ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX + └──────────────── time ─────────────────► + β”‚ | | + issue draining compaction happens + starts begins and reclaims space + + X - actually used space + . - claimed but no longer used space +``` + + +## Example + ``` extensions: file_storage: diff --git a/extension/storage/filestorage/client.go b/extension/storage/filestorage/client.go index d788a02e4400..a9e9e0b2f39f 100644 --- a/extension/storage/filestorage/client.go +++ b/extension/storage/filestorage/client.go @@ -19,16 +19,32 @@ import ( "errors" "io/ioutil" "os" + "sync" "time" "go.etcd.io/bbolt" "go.opentelemetry.io/collector/extension/experimental/storage" + "go.uber.org/zap" ) var defaultBucket = []byte(`default`) +const ( + elapsedKey = "elapsed" + directoryKey = "directory" + tempDirectoryKey = "tempDirectory" + + oneMiB = 1048576 +) + type fileStorageClient struct { - db *bbolt.DB + logger *zap.Logger + compactionMutex sync.RWMutex + db *bbolt.DB + compactionCfg *CompactionConfig + openTimeout time.Duration + cancel context.CancelFunc + closed bool } func bboltOptions(timeout time.Duration) *bbolt.Options { @@ -40,7 +56,7 @@ func bboltOptions(timeout time.Duration) *bbolt.Options { } } -func newClient(filePath string, timeout time.Duration) (*fileStorageClient, error) { +func newClient(logger *zap.Logger, filePath string, timeout time.Duration, compactionCfg *CompactionConfig) (*fileStorageClient, error) { options := bboltOptions(timeout) db, err := bbolt.Open(filePath, 0600, options) if err != nil { @@ -56,7 +72,12 @@ func newClient(filePath string, timeout time.Duration) (*fileStorageClient, erro return nil, err } - return &fileStorageClient{db}, nil + client := &fileStorageClient{logger: logger, db: db, compactionCfg: compactionCfg, openTimeout: timeout} + if compactionCfg.OnRebound { + client.startCompactionLoop(context.Background()) + } + + return client, nil } // Get will retrieve data from storage that corresponds to the specified key @@ -81,7 +102,7 @@ func (c *fileStorageClient) Delete(ctx context.Context, key string) error { } // Batch executes the specified operations in order. Get operation results are updated in place -func (c *fileStorageClient) Batch(_ context.Context, ops ...storage.Operation) error { +func (c *fileStorageClient) Batch(ctx context.Context, ops ...storage.Operation) error { batch := func(tx *bbolt.Tx) error { bucket := tx.Bucket(defaultBucket) if bucket == nil { @@ -109,53 +130,169 @@ func (c *fileStorageClient) Batch(_ context.Context, ops ...storage.Operation) e return nil } + c.compactionMutex.RLock() + defer c.compactionMutex.RUnlock() return c.db.Update(batch) } // Close will close the database func (c *fileStorageClient) Close(_ context.Context) error { + c.compactionMutex.Lock() + defer c.compactionMutex.Unlock() + + if c.cancel != nil { + c.cancel() + } + c.closed = true return c.db.Close() } // Compact database. Use temporary file as helper as we cannot replace database in-place -func (c *fileStorageClient) Compact(ctx context.Context, compactionDirectory string, timeout time.Duration, maxTransactionSize int64) (*fileStorageClient, error) { +func (c *fileStorageClient) Compact(compactionDirectory string, timeout time.Duration, maxTransactionSize int64) error { + var err error + var file *os.File + var compactedDb *bbolt.DB + // create temporary file in compactionDirectory - file, err := ioutil.TempFile(compactionDirectory, "tempdb") + file, err = ioutil.TempFile(compactionDirectory, "tempdb") if err != nil { - return nil, err + return err } err = file.Close() if err != nil { - return nil, err + return err } + defer func() { + _, statErr := os.Stat(file.Name()) + if statErr == nil { + // File still exists and needs to be removed + if removeErr := os.Remove(file.Name()); removeErr != nil { + c.logger.Error("removing temporary compaction file failed", zap.Error(removeErr)) + } + } + }() + // use temporary file as compaction target options := bboltOptions(timeout) + c.compactionMutex.Lock() + defer c.compactionMutex.Unlock() + if c.closed { + c.logger.Debug("skipping compaction since database is already closed") + return nil + } + + c.logger.Debug("starting compaction", + zap.String(directoryKey, c.db.Path()), + zap.String(tempDirectoryKey, file.Name())) + // cannot reuse newClient as db shouldn't contain any bucket - db, err := bbolt.Open(file.Name(), 0600, options) + compactedDb, err = bbolt.Open(file.Name(), 0600, options) if err != nil { - return nil, err + return err } - if err := bbolt.Compact(db, c.db, maxTransactionSize); err != nil { - return nil, err + compactionStart := time.Now() + + if err = bbolt.Compact(compactedDb, c.db, maxTransactionSize); err != nil { + return err } dbPath := c.db.Path() - tempDBPath := db.Path() + compactedDbPath := compactedDb.Path() - db.Close() - c.Close(ctx) + c.db.Close() + compactedDb.Close() // replace current db file with compacted db file - if err := os.Remove(dbPath); err != nil { - return nil, err + if err = os.Remove(dbPath); err != nil { + return err } - if err := os.Rename(tempDBPath, dbPath); err != nil { - return nil, err + if err = os.Rename(compactedDbPath, dbPath); err != nil { + return err + } + + c.db, err = bbolt.Open(dbPath, 0600, options) + + c.logger.Info("finished compaction", + zap.String(directoryKey, dbPath), + zap.Duration(elapsedKey, time.Since(compactionStart))) + + return err +} + +// startCompactionLoop provides asynchronous compaction function +func (c *fileStorageClient) startCompactionLoop(ctx context.Context) { + ctx, c.cancel = context.WithCancel(ctx) + + go func() { + c.logger.Debug("starting compaction loop", + zap.Duration("compaction_check_interval", c.compactionCfg.CheckInterval)) + + compactionTicker := time.NewTicker(c.compactionCfg.CheckInterval) + defer compactionTicker.Stop() + + for { + select { + case <-compactionTicker.C: + if c.shouldCompact() { + err := c.Compact(c.compactionCfg.Directory, c.openTimeout, c.compactionCfg.MaxTransactionSize) + if err != nil { + c.logger.Error("compaction failure", + zap.String(directoryKey, c.compactionCfg.Directory), + zap.Error(err)) + } + } + case <-ctx.Done(): + c.logger.Debug("shutting down compaction loop") + return + } + } + }() +} + +// shouldCompact checks whether the conditions for online compaction are met +func (c *fileStorageClient) shouldCompact() bool { + if !c.compactionCfg.OnRebound { + return false + } + + totalSizeBytes, dataSizeBytes, err := c.getDbSize() + if err != nil { + c.logger.Error("failed to get db size", zap.Error(err)) + return false + } + + c.logger.Debug("shouldCompact check", + zap.Int64("totalSizeBytes", totalSizeBytes), + zap.Int64("dataSizeBytes", dataSizeBytes)) + + if dataSizeBytes > c.compactionCfg.ReboundNeededThresholdMiB*oneMiB || + totalSizeBytes < c.compactionCfg.ReboundTriggerThresholdMiB*oneMiB { + return false + } + + c.logger.Debug("shouldCompact returns true", + zap.Int64("totalSizeBytes", totalSizeBytes), + zap.Int64("dataSizeBytes", dataSizeBytes)) + + return true +} + +func (c *fileStorageClient) getDbSize() (totalSizeResult int64, dataSizeResult int64, errResult error) { + var totalSize int64 + + err := c.db.View(func(tx *bbolt.Tx) error { + totalSize = tx.Size() + return nil + }) + if err != nil { + return 0, 0, err } - return newClient(dbPath, timeout) + dbStats := c.db.Stats() + dataSize := totalSize - int64(dbStats.FreeAlloc) + return totalSize, dataSize, nil } diff --git a/extension/storage/filestorage/client_test.go b/extension/storage/filestorage/client_test.go index 06b086f7fa4a..f1ec86d32be4 100644 --- a/extension/storage/filestorage/client_test.go +++ b/extension/storage/filestorage/client_test.go @@ -17,19 +17,23 @@ package filestorage import ( "context" "fmt" + "os" "path/filepath" + "sync" "testing" "time" "github.com/stretchr/testify/require" "go.etcd.io/bbolt" "go.opentelemetry.io/collector/extension/experimental/storage" + "go.uber.org/zap" + "go.uber.org/zap/zaptest/observer" ) func TestClientOperations(t *testing.T) { dbFile := filepath.Join(t.TempDir(), "my_db") - client, err := newClient(dbFile, time.Second) + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, client.Close(context.TODO())) @@ -67,7 +71,7 @@ func TestClientBatchOperations(t *testing.T) { tempDir := t.TempDir() dbFile := filepath.Join(tempDir, "my_db") - client, err := newClient(dbFile, time.Second) + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) require.NoError(t, err) t.Cleanup(func() { require.NoError(t, client.Close(context.TODO())) @@ -188,8 +192,11 @@ func TestNewClientTransactionErrors(t *testing.T) { tempDir := t.TempDir() dbFile := filepath.Join(tempDir, "my_db") - client, err := newClient(dbFile, timeout) + client, err := newClient(zap.NewNop(), dbFile, timeout, &CompactionConfig{}) require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, client.Close(context.TODO())) + }) // Create a problem require.NoError(t, client.db.Update(tc.setup)) @@ -209,19 +216,153 @@ func TestNewClientErrorsOnInvalidBucket(t *testing.T) { tempDir := t.TempDir() dbFile := filepath.Join(tempDir, "my_db") - client, err := newClient(dbFile, time.Second) + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) require.Error(t, err) require.Nil(t, client) defaultBucket = temp } +func TestClientReboundCompaction(t *testing.T) { + tempDir := t.TempDir() + dbFile := filepath.Join(tempDir, "my_db") + + checkInterval := time.Second + + logger, _ := zap.NewDevelopment() + client, err := newClient(logger, dbFile, time.Second, &CompactionConfig{ + OnRebound: true, + CheckInterval: checkInterval, + ReboundNeededThresholdMiB: 1, + ReboundTriggerThresholdMiB: 4, + }) + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, client.Close(context.TODO())) + }) + + // 1. Fill up the database + position := int64(0) + ctx := context.Background() + + entrySize := int64(1048576) + + for ; position < 5; position++ { + batchWrite := []storage.Operation{ + storage.SetOperation(fmt.Sprintf("foo-%d", position), make([]byte, entrySize)), + storage.SetOperation(fmt.Sprintf("bar-%d", position), []byte("testValueBar")), + } + err = client.Batch(ctx, batchWrite...) + require.NoError(t, err) + } + + require.Eventually(t, + func() bool { + totalSize, realSize, dbErr := client.getDbSize() + require.NoError(t, dbErr) + return totalSize > position*entrySize && realSize > position*entrySize + }, + 10*time.Second, 5*time.Millisecond, "database allocated space for data", + ) + + // 2. Remove the large entries + for i := 0; i < int(position); i++ { + err = client.Batch(ctx, storage.DeleteOperation(fmt.Sprintf("foo-%d", i))) + require.NoError(t, err) + } + + require.Eventually(t, + func() bool { + // The check is performed while the database might be compacted, hence we're reusing the mutex here + // (getDbSize is not called from outside the compaction loop otherwise) + client.compactionMutex.Lock() + defer client.compactionMutex.Unlock() + + totalSize, realSize, dbErr := client.getDbSize() + require.NoError(t, dbErr) + return totalSize < entrySize && realSize < entrySize + }, + 10*time.Second, 5*time.Millisecond, "database cleaned up not used space", + ) +} + +func TestClientConcurrentCompaction(t *testing.T) { + t.Skip("Flaky test - See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11039") + logCore, logObserver := observer.New(zap.DebugLevel) + logger := zap.New(logCore) + + tempDir := t.TempDir() + dbFile := filepath.Join(tempDir, "my_db") + + checkInterval := time.Millisecond + + client, err := newClient(logger, dbFile, time.Second, &CompactionConfig{ + OnRebound: true, + CheckInterval: checkInterval, + ReboundNeededThresholdMiB: 1, + ReboundTriggerThresholdMiB: 5, + }) + require.NoError(t, err) + + t.Cleanup(func() { + require.NoError(t, client.Close(context.TODO())) + }) + + var wg sync.WaitGroup + repeats := 5 + ctx := context.Background() + + clientOperationsThread := func(id int) { + for i := 0; i < repeats; i++ { + batchWrite := []storage.Operation{ + storage.SetOperation(fmt.Sprintf("foo-%d-%d", id, i), make([]byte, 1000000)), + storage.SetOperation(fmt.Sprintf("bar-%d-%d", id, i), []byte("testValueBar")), + } + err := client.Batch(ctx, batchWrite...) + require.NoError(t, err) + + err = client.Batch(ctx, storage.DeleteOperation(fmt.Sprintf("foo-%d-%d", id, i))) + require.NoError(t, err) + + // Make sure the requests are somewhat spaced + time.Sleep(checkInterval * 2) + + result, err := client.Get(ctx, fmt.Sprintf("foo-%d-%d", id, i)) + require.NoError(t, err) + require.Equal(t, []byte(nil), result) + + result, err = client.Get(ctx, fmt.Sprintf("bar-%d-%d", id, i)) + require.NoError(t, err) + require.Equal(t, []byte("testValueBar"), result) + + // Make sure the requests are somewhat spaced + time.Sleep(checkInterval) + } + + wg.Done() + } + + // Start a couple of concurrent threads and see how they add/remove data as needed without failures + for i := 0; i < 10; i++ { + wg.Add(1) + go clientOperationsThread(i) + } + + wg.Wait() + + // The actual number might vary a bit depending on the actual intervals + require.GreaterOrEqual(t, len(logObserver.FilterMessage("finished compaction").All()), 3) +} + func BenchmarkClientGet(b *testing.B) { tempDir := b.TempDir() dbFile := filepath.Join(tempDir, "my_db") - client, err := newClient(dbFile, time.Second) + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) require.NoError(b, err) + b.Cleanup(func() { + require.NoError(b, client.Close(context.TODO())) + }) ctx := context.Background() testKey := "testKey" @@ -237,8 +378,11 @@ func BenchmarkClientGet100(b *testing.B) { tempDir := b.TempDir() dbFile := filepath.Join(tempDir, "my_db") - client, err := newClient(dbFile, time.Second) + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) require.NoError(b, err) + b.Cleanup(func() { + require.NoError(b, client.Close(context.TODO())) + }) ctx := context.Background() @@ -257,8 +401,11 @@ func BenchmarkClientSet(b *testing.B) { tempDir := b.TempDir() dbFile := filepath.Join(tempDir, "my_db") - client, err := newClient(dbFile, time.Second) + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) require.NoError(b, err) + b.Cleanup(func() { + require.NoError(b, client.Close(context.TODO())) + }) ctx := context.Background() testKey := "testKey" @@ -274,9 +421,11 @@ func BenchmarkClientSet100(b *testing.B) { tempDir := b.TempDir() dbFile := filepath.Join(tempDir, "my_db") - client, err := newClient(dbFile, time.Second) + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) require.NoError(b, err) - + b.Cleanup(func() { + require.NoError(b, client.Close(context.TODO())) + }) ctx := context.Background() testEntries := make([]storage.Operation, 100) @@ -294,8 +443,11 @@ func BenchmarkClientDelete(b *testing.B) { tempDir := b.TempDir() dbFile := filepath.Join(tempDir, "my_db") - client, err := newClient(dbFile, time.Second) + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) require.NoError(b, err) + b.Cleanup(func() { + require.NoError(b, client.Close(context.TODO())) + }) ctx := context.Background() testKey := "testKey" @@ -317,8 +469,11 @@ func BenchmarkClientSetLargeDB(b *testing.B) { tempDir := b.TempDir() dbFile := filepath.Join(tempDir, "my_db") - client, err := newClient(dbFile, time.Second) + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) require.NoError(b, err) + b.Cleanup(func() { + require.NoError(b, client.Close(context.TODO())) + }) ctx := context.Background() @@ -351,8 +506,11 @@ func BenchmarkClientInitLargeDB(b *testing.B) { tempDir := b.TempDir() dbFile := filepath.Join(tempDir, "my_db") - client, err := newClient(dbFile, time.Second) + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) require.NoError(b, err) + b.Cleanup(func() { + require.NoError(b, client.Close(context.TODO())) + }) ctx := context.Background() @@ -367,7 +525,7 @@ func BenchmarkClientInitLargeDB(b *testing.B) { var tempClient *fileStorageClient b.ResetTimer() for n := 0; n < b.N; n++ { - tempClient, err = newClient(dbFile, time.Second) + tempClient, err = newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) require.NoError(b, err) b.StopTimer() err = tempClient.Close(ctx) @@ -375,3 +533,91 @@ func BenchmarkClientInitLargeDB(b *testing.B) { b.StartTimer() } } + +func BenchmarkClientCompactLargeDBFile(b *testing.B) { + entrySizeInBytes := 1024 * 1024 + entryCount := 2000 + entry := make([]byte, entrySizeInBytes) + var testKey string + + tempDir := b.TempDir() + dbFile := filepath.Join(tempDir, "my_db") + + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) + require.NoError(b, err) + b.Cleanup(func() { + require.NoError(b, client.Close(context.TODO())) + }) + + ctx := context.Background() + + for n := 0; n < entryCount; n++ { + testKey = fmt.Sprintf("testKey-%d", n) + require.NoError(b, client.Set(ctx, testKey, entry)) + } + + // Leave one key in the db + for n := 0; n < entryCount-1; n++ { + testKey = fmt.Sprintf("testKey-%d", n) + require.NoError(b, client.Delete(ctx, testKey)) + } + + require.NoError(b, client.Close(ctx)) + + b.ResetTimer() + b.StopTimer() + for n := 0; n < b.N; n++ { + testDbFile := filepath.Join(tempDir, fmt.Sprintf("my_db%d", n)) + err = os.Link(dbFile, testDbFile) + require.NoError(b, err) + client, err = newClient(zap.NewNop(), testDbFile, time.Second, &CompactionConfig{}) + require.NoError(b, err) + b.StartTimer() + require.NoError(b, client.Compact(tempDir, time.Second, 65536)) + b.StopTimer() + } +} + +func BenchmarkClientCompactDb(b *testing.B) { + entrySizeInBytes := 1024 * 128 + entryCount := 160 + entry := make([]byte, entrySizeInBytes) + var testKey string + + tempDir := b.TempDir() + dbFile := filepath.Join(tempDir, "my_db") + + client, err := newClient(zap.NewNop(), dbFile, time.Second, &CompactionConfig{}) + require.NoError(b, err) + b.Cleanup(func() { + require.NoError(b, client.Close(context.TODO())) + }) + + ctx := context.Background() + + for n := 0; n < entryCount; n++ { + testKey = fmt.Sprintf("testKey-%d", n) + require.NoError(b, client.Set(ctx, testKey, entry)) + } + + // Leave half the keys in the DB + for n := 0; n < entryCount/2; n++ { + testKey = fmt.Sprintf("testKey-%d", n) + require.NoError(b, client.Delete(ctx, testKey)) + } + + require.NoError(b, client.Close(ctx)) + + b.ResetTimer() + b.StopTimer() + for n := 0; n < b.N; n++ { + testDbFile := filepath.Join(tempDir, fmt.Sprintf("my_db%d", n)) + err = os.Link(dbFile, testDbFile) + require.NoError(b, err) + client, err = newClient(zap.NewNop(), testDbFile, time.Second, &CompactionConfig{}) + require.NoError(b, err) + b.StartTimer() + require.NoError(b, client.Compact(tempDir, time.Second, 65536)) + b.StopTimer() + } +} diff --git a/extension/storage/filestorage/config.go b/extension/storage/filestorage/config.go index 9a728558bc9a..922e90b41879 100644 --- a/extension/storage/filestorage/config.go +++ b/extension/storage/filestorage/config.go @@ -24,7 +24,7 @@ import ( "go.opentelemetry.io/collector/config" ) -// Config defines configuration for http forwarder extension. +// Config defines configuration for file storage extension. type Config struct { config.ExtensionSettings `mapstructure:",squash"` @@ -34,10 +34,29 @@ type Config struct { Compaction *CompactionConfig `mapstructure:"compaction,omitempty"` } +// CompactionConfig defines configuration for optional file storage compaction. type CompactionConfig struct { - OnStart bool `mapstructure:"on_start,omitempty"` - Directory string `mapstructure:"directory,omitempty"` - MaxTransactionSize int64 `mapstructure:"max_transaction_size,omitempty"` + // OnStart specifies that compaction is attempted each time on start + OnStart bool `mapstructure:"on_start,omitempty"` + // OnRebound specifies that compaction is attempted online, when rebound conditions are met. + // This typically happens when storage usage has increased, which caused increase in space allocation + // and afterwards it had most items removed. We want to run the compaction online only when there are + // not too many elements still being stored (which is an indication that "heavy usage" period is over) + // so compaction should be relatively fast and at the same time there is relatively large volume of space + // that might be reclaimed. + OnRebound bool `mapstructure:"on_rebound,omitempty"` + // Directory specifies where the temporary files for compaction will be stored + Directory string `mapstructure:"directory,omitempty"` + // ReboundNeededThresholdMiB specifies the minimum total allocated size (both used and empty) + // to mark the need for online compaction + ReboundNeededThresholdMiB int64 `mapstructure:"rebound_needed_threshold_mib"` + // ReboundTriggerThresholdMiB is used when compaction is marked as needed. When allocated data size drops + // below the specified value, the compactions starts and the flag marking need for compaction is cleared + ReboundTriggerThresholdMiB int64 `mapstructure:"rebound_trigger_threshold_mib"` + // MaxTransactionSize specifies the maximum number of items that might be present in single compaction iteration + MaxTransactionSize int64 `mapstructure:"max_transaction_size,omitempty"` + // CheckInterval specifies frequency of compaction check + CheckInterval time.Duration `mapstructure:"check_interval,omitempty"` } func (cfg *Config) Validate() error { @@ -51,15 +70,13 @@ func (cfg *Config) Validate() error { info, err := os.Stat(dir) if err != nil { if os.IsNotExist(err) { - return fmt.Errorf("directory must exist: %v", err) - } - if fsErr, ok := err.(*fs.PathError); ok { - return fmt.Errorf( - "problem accessing configured directory: %s, err: %v", - dir, fsErr, - ) + return fmt.Errorf("directory must exist: %w", err) } + fsErr := &fs.PathError{} + if errors.As(err, &fsErr) { + return fmt.Errorf("problem accessing configured directory: %s, err: %w", dir, fsErr) + } } if !info.IsDir() { return fmt.Errorf("%s is not a directory", dir) @@ -70,5 +87,9 @@ func (cfg *Config) Validate() error { return errors.New("max transaction size for compaction cannot be less than 0") } + if cfg.Compaction.OnRebound && cfg.Compaction.CheckInterval <= 0 { + return errors.New("compaction check interval must be positive when rebound compaction is set") + } + return nil } diff --git a/extension/storage/filestorage/config_test.go b/extension/storage/filestorage/config_test.go index bfbddde36c6c..c824404c79cd 100644 --- a/extension/storage/filestorage/config_test.go +++ b/extension/storage/filestorage/config_test.go @@ -57,9 +57,13 @@ func TestLoadConfig(t *testing.T) { ExtensionSettings: config.NewExtensionSettings(config.NewComponentIDWithName(typeStr, "all_settings")), Directory: ".", Compaction: &CompactionConfig{ - Directory: ".", - OnStart: true, - MaxTransactionSize: 2048, + Directory: ".", + OnStart: true, + OnRebound: true, + MaxTransactionSize: 2048, + ReboundTriggerThresholdMiB: 16, + ReboundNeededThresholdMiB: 128, + CheckInterval: time.Second * 5, }, Timeout: 2 * time.Second, }, diff --git a/extension/storage/filestorage/extension.go b/extension/storage/filestorage/extension.go index 4cc311191099..c45998c817f8 100644 --- a/extension/storage/filestorage/extension.go +++ b/extension/storage/filestorage/extension.go @@ -18,7 +18,6 @@ import ( "context" "fmt" "path/filepath" - "time" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config" @@ -27,12 +26,8 @@ import ( ) type localFileStorage struct { - directory string - timeout time.Duration - logger *zap.Logger - compactionDirectory string - compactOnStart bool - maxCompactionSize int64 + cfg *Config + logger *zap.Logger } // Ensure this storage extension implements the appropriate interface @@ -40,11 +35,8 @@ var _ storage.Extension = (*localFileStorage)(nil) func newLocalFileStorage(logger *zap.Logger, config *Config) (component.Extension, error) { return &localFileStorage{ - directory: filepath.Clean(config.Directory), - compactionDirectory: filepath.Clean(config.Compaction.Directory), - compactOnStart: config.Compaction.OnStart, - timeout: config.Timeout, - logger: logger, + cfg: config, + logger: logger, }, nil } @@ -69,16 +61,22 @@ func (lfs *localFileStorage) GetClient(ctx context.Context, kind component.Kind, rawName = fmt.Sprintf("%s_%s_%s_%s", kindString(kind), ent.Type(), ent.Name(), name) } // TODO sanitize rawName - absoluteName := filepath.Join(lfs.directory, rawName) - client, err := newClient(absoluteName, lfs.timeout) + absoluteName := filepath.Join(lfs.cfg.Directory, rawName) + client, err := newClient(lfs.logger, absoluteName, lfs.cfg.Timeout, lfs.cfg.Compaction) + + if err != nil { + return nil, err + } // return if compaction is not required - if err != nil || !lfs.compactOnStart { - return client, err + if lfs.cfg.Compaction.OnStart { + compactionErr := client.Compact(lfs.cfg.Compaction.Directory, lfs.cfg.Timeout, lfs.cfg.Compaction.MaxTransactionSize) + if compactionErr != nil { + lfs.logger.Error("compaction on start failed", zap.Error(compactionErr)) + } } - // perform compaction and returns client - return client.Compact(ctx, lfs.compactionDirectory, lfs.timeout, lfs.maxCompactionSize) + return client, nil } func kindString(k component.Kind) string { diff --git a/extension/storage/filestorage/extension_test.go b/extension/storage/filestorage/extension_test.go index 6fea6d008678..db917ff65dad 100644 --- a/extension/storage/filestorage/extension_test.go +++ b/extension/storage/filestorage/extension_test.go @@ -300,10 +300,10 @@ func TestCompaction(t *testing.T) { // compact the db c, ok := client.(*fileStorageClient) require.True(t, ok) - fsClient1, err := c.Compact(ctx, tempDir, cfg.Timeout, 1) + err = c.Compact(tempDir, cfg.Timeout, 1) require.NoError(t, err) t.Cleanup(func() { - require.NoError(t, fsClient1.Close(ctx)) + require.NoError(t, client.Close(ctx)) }) // check size after compaction @@ -314,15 +314,17 @@ func TestCompaction(t *testing.T) { // remove data from database for i = 0; i < numEntries; i++ { key = fmt.Sprintf("key_%d", i) - err = fsClient1.Delete(ctx, key) + err = c.Delete(ctx, key) require.NoError(t, err) } // compact after data removal - fsClient2, err := fsClient1.Compact(ctx, tempDir, cfg.Timeout, 1) + c, ok = client.(*fileStorageClient) + require.True(t, ok) + err = c.Compact(tempDir, cfg.Timeout, 1) require.NoError(t, err) t.Cleanup(func() { - require.NoError(t, fsClient2.Close(ctx)) + require.NoError(t, client.Close(ctx)) }) // check size @@ -369,10 +371,10 @@ func TestCompactionRemoveTemp(t *testing.T) { // perform compaction in the same directory c, ok := client.(*fileStorageClient) require.True(t, ok) - fsClient1, err := c.Compact(ctx, tempDir, cfg.Timeout, 1) + err = c.Compact(tempDir, cfg.Timeout, 1) require.NoError(t, err) t.Cleanup(func() { - require.NoError(t, fsClient1.Close(ctx)) + require.NoError(t, client.Close(ctx)) }) // check if only db exists in tempDir @@ -384,10 +386,12 @@ func TestCompactionRemoveTemp(t *testing.T) { // perform compaction in different directory emptyTempDir := t.TempDir() - fsClient2, err := fsClient1.Compact(ctx, emptyTempDir, cfg.Timeout, 1) + c, ok = client.(*fileStorageClient) + require.True(t, ok) + err = c.Compact(emptyTempDir, cfg.Timeout, 1) require.NoError(t, err) t.Cleanup(func() { - require.NoError(t, fsClient2.Close(ctx)) + require.NoError(t, client.Close(ctx)) }) // check if emptyTempDir is empty after compaction diff --git a/extension/storage/filestorage/factory.go b/extension/storage/filestorage/factory.go index a523d5d2d564..9785a7f5140e 100644 --- a/extension/storage/filestorage/factory.go +++ b/extension/storage/filestorage/factory.go @@ -25,6 +25,15 @@ import ( // The value of extension "type" in configuration. const typeStr config.Type = "file_storage" +const ( + // use default bbolt value + // https://github.com/etcd-io/bbolt/blob/d5db64bdbfdee1cb410894605f42ffef898f395d/cmd/bbolt/main.go#L1955 + defaultMaxTransactionSize = 65536 + defaultReboundTriggerThresholdMib = 10 + defaultReboundNeededThresholdMib = 100 + defaultCompactionInterval = time.Second * 5 +) + // NewFactory creates a factory for HostObserver extension. func NewFactory() component.ExtensionFactory { return component.NewExtensionFactory( @@ -38,11 +47,13 @@ func createDefaultConfig() config.Extension { ExtensionSettings: config.NewExtensionSettings(config.NewComponentID(typeStr)), Directory: getDefaultDirectory(), Compaction: &CompactionConfig{ - Directory: getDefaultDirectory(), - OnStart: false, - // use default bbolt value - // https://github.com/etcd-io/bbolt/blob/d5db64bdbfdee1cb410894605f42ffef898f395d/cmd/bbolt/main.go#L1955 - MaxTransactionSize: 65536, + Directory: getDefaultDirectory(), + OnStart: false, + OnRebound: false, + MaxTransactionSize: defaultMaxTransactionSize, + ReboundNeededThresholdMiB: defaultReboundTriggerThresholdMib, + ReboundTriggerThresholdMiB: defaultReboundNeededThresholdMib, + CheckInterval: defaultCompactionInterval, }, Timeout: time.Second, } diff --git a/extension/storage/filestorage/testdata/config.yaml b/extension/storage/filestorage/testdata/config.yaml index 1bc59b790ccc..06269ee7f990 100644 --- a/extension/storage/filestorage/testdata/config.yaml +++ b/extension/storage/filestorage/testdata/config.yaml @@ -9,6 +9,9 @@ extensions: compaction: directory: . on_start: true + on_rebound: true + rebound_trigger_threshold_mib: 16 + rebound_needed_threshold_mib: 128 max_transaction_size: 2048 timeout: 2s diff --git a/extension/storage/go.mod b/extension/storage/go.mod index 91f6c6f78982..0c732ada2e68 100644 --- a/extension/storage/go.mod +++ b/extension/storage/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 go.etcd.io/bbolt v1.3.6 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -39,7 +39,7 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/extension/storage/go.sum b/extension/storage/go.sum index 687d2edbf2a3..09994dd2c8d0 100644 --- a/extension/storage/go.sum +++ b/extension/storage/go.sum @@ -272,10 +272,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/go.mod b/go.mod index 95eb6f5ad9d5..d437d9904c1f 100644 --- a/go.mod +++ b/go.mod @@ -21,6 +21,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter v0.53.0 + github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombexporter v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/humioexporter v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter v0.53.0 @@ -80,6 +81,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver v0.53.0 + github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver v0.0.0-00010101000000-000000000000 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver v0.53.0 @@ -142,9 +144,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/windowsperfcountersreceiver v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zookeeperreceiver v0.53.0 - github.com/prometheus/prometheus v0.36.0 + github.com/prometheus/prometheus v0.36.1 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a ) @@ -182,18 +184,20 @@ require ( github.com/DataDog/datadog-go v4.8.2+incompatible // indirect github.com/DataDog/sketches-go v1.4.1 // indirect github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.1 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.30.2-0.20220512190557-875976f87023 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.6.1 // indirect - github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.30.1 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.32.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 // indirect + github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/ReneKroon/ttlcache/v2 v2.11.0 // indirect github.com/SAP/go-hdb v0.105.5 // indirect github.com/SermoDigital/jose v0.9.2-0.20161205224733-f6df55f235c2 // indirect - github.com/Shopify/sarama v1.34.0 // indirect + github.com/Shopify/sarama v1.34.1 // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect github.com/StackExchange/wmi v1.2.1 // indirect github.com/VividCortex/gohistogram v1.0.0 // indirect + github.com/aerospike/aerospike-client-go/v5 v5.8.0 // indirect github.com/alecthomas/participle/v2 v2.0.0-alpha9 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/aliyun/aliyun-log-go-sdk v0.1.36 // indirect @@ -201,7 +205,7 @@ require ( github.com/apache/thrift v0.16.0 // indirect github.com/armon/go-metrics v0.3.10 // indirect github.com/avast/retry-go v3.0.0+incompatible // indirect - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/aws/aws-sdk-go-v2 v1.9.2 // indirect github.com/aws/aws-sdk-go-v2/config v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.4.3 // indirect @@ -239,11 +243,11 @@ require ( github.com/dgraph-io/ristretto v0.1.0 // indirect github.com/digitalocean/godo v1.80.0 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/dustin/go-humanize v1.0.0 // indirect - github.com/dynatrace-oss/dynatrace-metric-utils-go v0.3.0 // indirect + github.com/dynatrace-oss/dynatrace-metric-utils-go v0.4.0 // indirect github.com/eapache/go-resiliency v1.2.0 // indirect github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect github.com/eapache/queue v1.1.0 // indirect @@ -453,7 +457,7 @@ require ( github.com/subosito/gotenv v1.2.0 // indirect github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect github.com/syndtr/goleveldb v1.0.0 // indirect - github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.416 // indirect + github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.418 // indirect github.com/tg123/go-htpasswd v1.2.0 // indirect github.com/tidwall/gjson v1.12.1 // indirect github.com/tidwall/match v1.1.1 // indirect @@ -478,6 +482,7 @@ require ( github.com/xdg-go/scram v1.1.1 // indirect github.com/xdg-go/stringprep v1.0.3 // indirect github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect + github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da // indirect github.com/yusufpapurcu/wmi v1.2.2 // indirect go.elastic.co/apm v1.15.0 // indirect go.elastic.co/fastjson v1.1.0 // indirect @@ -485,8 +490,8 @@ require ( go.mongodb.org/atlas v0.16.0 // indirect go.mongodb.org/mongo-driver v1.9.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/contrib/zpages v0.32.0 // indirect @@ -501,18 +506,18 @@ require ( go.uber.org/zap v1.21.0 // indirect golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect - golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect + golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect gonum.org/v1/gonum v0.11.0 // indirect - google.golang.org/api v0.82.0 // indirect + google.golang.org/api v0.83.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 // indirect + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/DataDog/dd-trace-go.v1 v1.38.1 // indirect @@ -607,6 +612,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/filee replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter => ./exporter/googlecloudexporter +replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter => ./exporter/googlemanagedprometheusexporter + replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter => ./exporter/googlecloudpubsubexporter replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombexporter => ./exporter/honeycombexporter @@ -753,6 +760,8 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/sche replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver => ./receiver/activedirectorydsreceiver +replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver => ./receiver/aerospikereceiver + replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver => ./receiver/apachereceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver => ./receiver/awscontainerinsightreceiver diff --git a/go.sum b/go.sum index 0177609cb357..fb3755bfd664 100644 --- a/go.sum +++ b/go.sum @@ -172,14 +172,16 @@ github.com/DataDog/zstd v1.5.0 h1:+K/VEwIAaPcHiMtQvpLD4lqW7f0Gk3xdYZmI1hD+CXo= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 h1:KeNholpO2xKjgaaSyd+DyQRrsQjhbSeS7qe4nEw8aQw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962/go.mod h1:kC29dT1vFpj7py2OvG1khBdQpo3kInWP+6QipLbdngo= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.1 h1:v2ey6AUQFjj6vPMdXNL9K1R1/4V20qPBuL3os831jvw= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.1/go.mod h1:s7Gpwj0tk7XnVCm4BQEmx/mbS36SuTCY/vMB2SNxe8o= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.30.2-0.20220512190557-875976f87023 h1:a5qaC/K40oknHppvTFqQZkLMY7XZSvWyxcG/T6W6DF8= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.30.2-0.20220512190557-875976f87023/go.mod h1:kXt5P2nDYWk6ltkQi+YmcGCNMwS54nnYfLm8jrU0APk= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.6.1 h1:LNl8Tg6N6qChoiM6lKC1Z44Z+CkPAdYx45L/lJDgThs= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.6.1/go.mod h1:ZFRHg4zuQuc6sQyx16A53fB7kxPvPguSeE8GFVpT6rQ= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.30.1 h1:JftlZfpIvptFTzSD/BXuoK9i0nT3D1GSz1EEBr+jjuM= -github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.30.1/go.mod h1:j+FS9VBW3mwtHBmm9KOJEy5Tq68fCp7fE/R9bV/flIM= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.2 h1:aMWts6QP6yqlluU7KXl6j1zdPLW/PNNKHwm9804M5t4= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.2/go.mod h1:s7Gpwj0tk7XnVCm4BQEmx/mbS36SuTCY/vMB2SNxe8o= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2 h1:FNWwTVLRrrJIDmkkJiLEXcdKye09TxgRhQHXWGT709Y= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector v0.32.2/go.mod h1:Rb8oT91vuHT7MEyikxGyU7RaKypEwr3fBjoaBcmw0Y4= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.32.2 h1:/U4z1upRwp3XEUldq+4LfKEcuc0kH8ZsB95jQ2MrcgQ= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/collector/googlemanagedprometheus v0.32.2/go.mod h1:Dbl28z/FsamWrRT9cwLwWxS1zQUTOkRzibiLSQ8ixNg= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2 h1:Dg+BIoU7Xz5QAj9VgDyhl5sz8Uz1IE1O6NAdJ1/Lmyk= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.2/go.mod h1:vCKAVz9WbhvBYuqNignSpjoyMtBT/CFELC3z98onw4o= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2 h1:lw6BPuBgZKGwl4jm8xrU7AGnK8ohy7UT9hPM1+S16ts= +github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.2/go.mod h1:j+FS9VBW3mwtHBmm9KOJEy5Tq68fCp7fE/R9bV/flIM= github.com/HdrHistogram/hdrhistogram-go v0.9.0/go.mod h1:nxrse8/Tzg2tg3DZcZjm6qEclQKK70g0KxO61gFFZD4= github.com/HdrHistogram/hdrhistogram-go v1.0.1/go.mod h1:BWJ+nMSHY3L41Zj7CA3uXnloDp7xxV0YvstAE7nKTaM= github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= @@ -235,13 +237,14 @@ github.com/Shopify/sarama v1.29.1/go.mod h1:mdtqvCSg8JOxk8PmpTNGyo6wzd4BMm4QXSfD github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs= github.com/Shopify/sarama v1.31.0/go.mod h1:BeW3gXRc/CxgAsrSly2RE9nIXUfC9ezb7QHBPVhvzjI= github.com/Shopify/sarama v1.32.0/go.mod h1:+EmJJKZWVT/faR9RcOxJerP+LId4iWdQPBGLy1Y1Njs= -github.com/Shopify/sarama v1.34.0 h1:j4zTaFHFnfvuV2fdLZyXqIg0Tu4Mzl9f064Z5/H+o4o= -github.com/Shopify/sarama v1.34.0/go.mod h1:V2ceE9UupUf4/oP1Z38SI49fAnD0/MtkqDDHvolIeeQ= +github.com/Shopify/sarama v1.34.1 h1:pVCQO7BMAK3s1jWhgi5v1W6lwZ6Veiekfc2vsgRS06Y= +github.com/Shopify/sarama v1.34.1/go.mod h1:NZSNswsnStpq8TUdFaqnpXm2Do6KRzTIjdBdVlL1YRM= 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.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= -github.com/Shopify/toxiproxy/v2 v2.3.0 h1:62YkpiP4bzdhKMH+6uC5E95y608k3zDwdzuBMsnn3uQ= github.com/Shopify/toxiproxy/v2 v2.3.0/go.mod h1:KvQTtB6RjCJY4zqNJn7C7JDFgsG5uoHYDirfUfpIm0c= +github.com/Shopify/toxiproxy/v2 v2.4.0 h1:O1e4Jfvr/hefNTNu+8VtdEG5lSeamJRo4aKhMOKNM64= +github.com/Shopify/toxiproxy/v2 v2.4.0/go.mod h1:3ilnjng821bkozDRxNoo64oI/DKqM+rOyJzb564+bvg= 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= @@ -249,6 +252,8 @@ github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDO github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/aerospike/aerospike-client-go/v5 v5.8.0 h1:EUV2wG80yIenQqOyUlf5NfyhagPIwoeL09MJIE+xILE= +github.com/aerospike/aerospike-client-go/v5 v5.8.0/go.mod h1:rJ/KpmClE7kiBPfvAPrGw9WuNOiz8v2uKbQaUyYPXtI= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/participle/v2 v2.0.0-alpha9 h1:TnflwDbtf5/aG6JMbmdiA+YB3bLg0sc6yRtmAfedfN4= @@ -304,8 +309,8 @@ github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/ github.com/aws/aws-sdk-go v1.35.24/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.38.68/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.0.0/go.mod h1:smfAbmpW+tcRVuNUjo3MOArSZmW72t62rkCzc2i0TWM= github.com/aws/aws-sdk-go-v2 v1.7.0/go.mod h1:tb9wi5s61kTDA5qCkcDbt3KRVV74GGslQkl/DRdX/P4= @@ -612,8 +617,8 @@ github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6 github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= @@ -633,8 +638,8 @@ github.com/dropbox/godropbox v0.0.0-20180512210157-31879d3884b9/go.mod h1:glr97h github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dynatrace-oss/dynatrace-metric-utils-go v0.3.0 h1:q2Ayh9s6Cr75bS5URiOUAoyFXemgKQaBJphbhAaJHCY= -github.com/dynatrace-oss/dynatrace-metric-utils-go v0.3.0/go.mod h1:qw0E9EJ0PnSlhWawDNuqE0zhc1hqOBUCFIAj3dd9DNw= +github.com/dynatrace-oss/dynatrace-metric-utils-go v0.4.0 h1:DNKHy0pt6iKh5w/FqWTlNL/vvZE5zxPLfjfm0Zqclc4= +github.com/dynatrace-oss/dynatrace-metric-utils-go v0.4.0/go.mod h1:qw0E9EJ0PnSlhWawDNuqE0zhc1hqOBUCFIAj3dd9DNw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q= github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= @@ -1434,7 +1439,6 @@ github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47e github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.14.2/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.4/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= @@ -1867,8 +1871,8 @@ github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= -github.com/prometheus/prometheus v0.36.0/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= @@ -2046,8 +2050,8 @@ github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFd github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.416 h1:kD1JlhMcIO2sV+Ps+V1c1DlxC0r/VeIxMQXzZ7eRvoY= -github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.416/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.418 h1:8F7BYx/udM6ohaXB5s94OTDkjS90EusRV/xSeI/yyrM= +github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.418/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/testcontainers/testcontainers-go v0.13.0 h1:OUujSlEGsXVo/ykPVZk3KanBNGN0TYb/7oKIPVn15JA= github.com/tg123/go-htpasswd v1.2.0 h1:UKp34m9H467/xklxUxU15wKRru7fwXoTojtxg25ITF0= github.com/tg123/go-htpasswd v1.2.0/go.mod h1:h7IzlfpvIWnVJhNZ0nQ9HaFxHb7pn5uFJYLlEUJa2sM= @@ -2175,6 +2179,8 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da h1:NimzV1aGyq29m5ukMK0AMWEhFaL/lrEOaephfuoiARg= +github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPRg= github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= @@ -2236,16 +2242,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/collector v0.52.0/go.mod h1:a9GvaOhyc0nVOUzqvdv5mxyWghCSso/WRO2GgRl4I1g= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= go.opentelemetry.io/collector/model v0.44.0/go.mod h1:4jo1R8uBDspLCxUGhQ0k3v/EFXFbW7s0AIy3LuGLbcU= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/pdata v0.52.0/go.mod h1:GJUTfTv8mlYpHRjcmHXVbvJr48EW/q/P/HuBvpXAE58= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/collector/semconv v0.52.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= @@ -2490,6 +2498,7 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210610132358-84b48f89b13b/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -2505,8 +2514,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= 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-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2543,8 +2552,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2557,6 +2567,7 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2875,8 +2886,8 @@ google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -2986,8 +2997,8 @@ google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= diff --git a/internal/aws/awsutil/conn.go b/internal/aws/awsutil/conn.go index 3ea6f1bcfbd4..d8caccea06cf 100644 --- a/internal/aws/awsutil/conn.go +++ b/internal/aws/awsutil/conn.go @@ -18,6 +18,7 @@ package awsutil // import "github.com/open-telemetry/opentelemetry-collector-con import ( "crypto/tls" + "errors" "net/http" "net/url" "os" @@ -230,11 +231,12 @@ func getSTSCreds(logger *zap.Logger, region string, roleArn string) (*credential // Make explicit call to fetch credentials. _, err = stsCred.Get() if err != nil { - if aerr, ok := err.(awserr.Error); ok { + var awsErr awserr.Error + if errors.As(err, &awsErr) { err = nil - switch aerr.Code() { + switch awsErr.Code() { case sts.ErrCodeRegionDisabledException: - logger.Error("Region ", zap.String("region", region), zap.String("error", aerr.Error())) + logger.Error("Region ", zap.String("region", region), zap.Error(awsErr)) stsCred = getSTSCredsFromPrimaryRegionEndpoint(logger, t, roleArn, region) } } diff --git a/internal/aws/awsutil/conn_test.go b/internal/aws/awsutil/conn_test.go index 70ad7838fa7f..7f3e3a6dd7c5 100644 --- a/internal/aws/awsutil/conn_test.go +++ b/internal/aws/awsutil/conn_test.go @@ -16,8 +16,6 @@ package awsutil import ( "errors" - "os" - "strings" "testing" "github.com/aws/aws-sdk-go/aws" @@ -69,9 +67,7 @@ func TestRegionEnv(t *testing.T) { logger := zap.NewNop() sessionCfg := CreateDefaultSessionConfig() region := "us-east-1" - env := stashEnv() - defer popEnv(env) - os.Setenv("AWS_REGION", region) + t.Setenv("AWS_REGION", region) var m = &mockConn{} var expectedSession *session.Session @@ -88,9 +84,7 @@ func TestGetAWSConfigSessionWithSessionErr(t *testing.T) { sessionCfg := CreateDefaultSessionConfig() sessionCfg.Region = "" sessionCfg.NoVerifySSL = false - env := stashEnv() - defer popEnv(env) - os.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") + t.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") m := new(mockConn) m.On("getEC2Region", nil).Return("").Once() var expectedSession *session.Session @@ -122,10 +116,8 @@ func TestNewAWSSessionWithErr(t *testing.T) { logger := zap.NewNop() roleArn := "fake_arn" region := "fake_region" - env := stashEnv() - defer popEnv(env) - os.Setenv("AWS_EC2_METADATA_DISABLED", "true") - os.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") + t.Setenv("AWS_EC2_METADATA_DISABLED", "true") + t.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") conn := &Conn{} se, err := conn.newAWSSession(logger, roleArn, region) assert.NotNil(t, err) @@ -134,8 +126,8 @@ func TestNewAWSSessionWithErr(t *testing.T) { se, err = conn.newAWSSession(logger, roleArn, region) assert.NotNil(t, err) assert.Nil(t, se) - os.Setenv("AWS_SDK_LOAD_CONFIG", "true") - os.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "regional") + t.Setenv("AWS_SDK_LOAD_CONFIG", "true") + t.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "regional") se, _ = session.NewSession(&aws.Config{ Region: aws.String("us-east-1"), }) @@ -160,9 +152,7 @@ func TestGetSTSCredsFromPrimaryRegionEndpoint(t *testing.T) { func TestGetDefaultSession(t *testing.T) { logger := zap.NewNop() - env := stashEnv() - defer popEnv(env) - os.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") + t.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") _, err := GetDefaultSession(logger) assert.NotNil(t, err) } @@ -173,25 +163,7 @@ func TestGetSTSCreds(t *testing.T) { roleArn := "" _, err := getSTSCreds(logger, region, roleArn) assert.Nil(t, err) - env := stashEnv() - defer popEnv(env) - os.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") + t.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "fake") _, err = getSTSCreds(logger, region, roleArn) assert.NotNil(t, err) } - -func stashEnv() []string { - env := os.Environ() - os.Clearenv() - - return env -} - -func popEnv(env []string) { - os.Clearenv() - - for _, e := range env { - p := strings.SplitN(e, "=", 2) - os.Setenv(p[0], p[1]) - } -} diff --git a/internal/aws/awsutil/go.mod b/internal/aws/awsutil/go.mod index 432f1cd9290d..39c45cc8eb70 100644 --- a/internal/aws/awsutil/go.mod +++ b/internal/aws/awsutil/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/aw go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/stretchr/testify v1.7.2 go.uber.org/zap v1.21.0 golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd diff --git a/internal/aws/awsutil/go.sum b/internal/aws/awsutil/go.sum index c4609cfa7fbc..bff70759a765 100644 --- a/internal/aws/awsutil/go.sum +++ b/internal/aws/awsutil/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/internal/aws/containerinsight/go.mod b/internal/aws/containerinsight/go.mod index 1ba0cbf63a70..d2228f3e270e 100644 --- a/internal/aws/containerinsight/go.mod +++ b/internal/aws/containerinsight/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/internal/aws/containerinsight/go.sum b/internal/aws/containerinsight/go.sum index 80b0b8f7ab1e..cf975575f872 100644 --- a/internal/aws/containerinsight/go.sum +++ b/internal/aws/containerinsight/go.sum @@ -75,8 +75,8 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.8.0 h1:CUhrE4N1rqSE6FM9ecihEjRkLQu8cDfgDyoOs83mEY4= diff --git a/internal/aws/cwlogs/cwlog_client.go b/internal/aws/cwlogs/cwlog_client.go index 8226b52ff131..b0736b48f5be 100644 --- a/internal/aws/cwlogs/cwlog_client.go +++ b/internal/aws/cwlogs/cwlog_client.go @@ -16,6 +16,7 @@ package cwlogs // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs" import ( + "errors" "fmt" "regexp" @@ -72,8 +73,8 @@ func (client *Client) PutLogEvents(input *cloudwatchlogs.PutLogEventsInput, retr input.SequenceToken = token response, err = client.svc.PutLogEvents(input) if err != nil { - awsErr, ok := err.(awserr.Error) - if !ok { + var awsErr awserr.Error + if !errors.As(err, &awsErr) { client.logger.Error("Cannot cast PutLogEvents error into awserr.Error.", zap.Error(err)) return token, err } @@ -152,7 +153,8 @@ func (client *Client) CreateStream(logGroup, streamName *string) (token string, }) if err != nil { client.logger.Debug("cwlog_client: creating stream fail", zap.Error(err)) - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == cloudwatchlogs.ErrCodeResourceNotFoundException { + var awsErr awserr.Error + if errors.As(err, &awsErr) && awsErr.Code() == cloudwatchlogs.ErrCodeResourceNotFoundException { _, err = client.svc.CreateLogGroup(&cloudwatchlogs.CreateLogGroupInput{ LogGroupName: logGroup, }) @@ -166,7 +168,8 @@ func (client *Client) CreateStream(logGroup, streamName *string) (token string, } if err != nil { - if awsErr, ok := err.(awserr.Error); ok && awsErr.Code() == cloudwatchlogs.ErrCodeResourceAlreadyExistsException { + var awsErr awserr.Error + if errors.As(err, &awsErr) && awsErr.Code() == cloudwatchlogs.ErrCodeResourceAlreadyExistsException { return "", nil } client.logger.Debug("CreateLogStream / CreateLogGroup has errors.", zap.String("LogGroupName", *logGroup), zap.String("LogStreamName", *streamName), zap.Error(e)) diff --git a/internal/aws/cwlogs/go.mod b/internal/aws/cwlogs/go.mod index 3ad35f583fa5..f78cfe839406 100644 --- a/internal/aws/cwlogs/go.mod +++ b/internal/aws/cwlogs/go.mod @@ -3,9 +3,9 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cw go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -26,7 +26,7 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/stretchr/objx v0.1.1 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/internal/aws/cwlogs/go.sum b/internal/aws/cwlogs/go.sum index 300fdc81e539..05b0824942d8 100644 --- a/internal/aws/cwlogs/go.sum +++ b/internal/aws/cwlogs/go.sum @@ -5,8 +5,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -186,10 +186,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/internal/aws/ecsutil/endpoints/metadata_test.go b/internal/aws/ecsutil/endpoints/metadata_test.go index 6a44f45f8851..dc4ec4314370 100644 --- a/internal/aws/ecsutil/endpoints/metadata_test.go +++ b/internal/aws/ecsutil/endpoints/metadata_test.go @@ -15,7 +15,6 @@ package endpoints import ( - "os" "testing" "github.com/stretchr/testify/assert" @@ -23,9 +22,8 @@ import ( ) func Test_ecsPrefersLatestTME(t *testing.T) { - os.Clearenv() - os.Setenv(TaskMetadataEndpointV3EnvVar, "http://3") - os.Setenv(TaskMetadataEndpointV4EnvVar, "http://4") + t.Setenv(TaskMetadataEndpointV3EnvVar, "http://3") + t.Setenv(TaskMetadataEndpointV4EnvVar, "http://4") tme, err := GetTMEFromEnv() require.NoError(t, err) diff --git a/internal/aws/ecsutil/go.mod b/internal/aws/ecsutil/go.mod index 39916af42c6b..3c010948eb6c 100644 --- a/internal/aws/ecsutil/go.mod +++ b/internal/aws/ecsutil/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -31,7 +31,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.0 // indirect github.com/rs/cors v1.8.2 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/internal/aws/ecsutil/go.sum b/internal/aws/ecsutil/go.sum index 8d02e3e32d23..9ca26c99a531 100644 --- a/internal/aws/ecsutil/go.sum +++ b/internal/aws/ecsutil/go.sum @@ -190,10 +190,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/internal/aws/k8s/go.mod b/internal/aws/k8s/go.mod index 672b8dab4358..63f515a2a4c6 100644 --- a/internal/aws/k8s/go.mod +++ b/internal/aws/k8s/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/k8 go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/stretchr/testify v1.7.2 go.uber.org/zap v1.21.0 k8s.io/api v0.24.1 diff --git a/internal/aws/k8s/go.sum b/internal/aws/k8s/go.sum index 6641aa43c1a3..06d8f0c7c7f5 100644 --- a/internal/aws/k8s/go.sum +++ b/internal/aws/k8s/go.sum @@ -52,8 +52,8 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= diff --git a/internal/aws/k8s/k8sclient/job.go b/internal/aws/k8s/k8sclient/job.go index 2726e3feb98c..41572184e238 100644 --- a/internal/aws/k8s/k8sclient/job.go +++ b/internal/aws/k8s/k8sclient/job.go @@ -126,7 +126,7 @@ func newJobClient(clientSet kubernetes.Interface, logger *zap.Logger, options .. ctx := context.Background() if _, err := clientSet.BatchV1().Jobs(metav1.NamespaceAll).List(ctx, metav1.ListOptions{}); err != nil { - return nil, fmt.Errorf("cannot list Job. err: %v", err) + return nil, fmt.Errorf("cannot list Job. err: %w", err) } c.store = NewObjStore(transformFuncJob, logger) diff --git a/internal/aws/k8s/k8sclient/pod_test.go b/internal/aws/k8s/k8sclient/pod_test.go index 441fa872c866..899f780b1be7 100644 --- a/internal/aws/k8s/k8sclient/pod_test.go +++ b/internal/aws/k8s/k8sclient/pod_test.go @@ -174,7 +174,13 @@ var podArray = []interface{}{ }, } +// workaround to avoid "unused" lint errors which test is skipped +var skip = func(t *testing.T, why string) { + t.Skip(why) +} + func TestPodClient_NamespaceToRunningPodNum(t *testing.T) { + skip(t, "Flaky test - See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/11078") setOption := podSyncCheckerOption(&mockReflectorSyncChecker{}) fakeClientSet := fake.NewSimpleClientset() diff --git a/internal/aws/k8s/k8sclient/replicaset.go b/internal/aws/k8s/k8sclient/replicaset.go index 871dd3c167f7..16f236152e54 100644 --- a/internal/aws/k8s/k8sclient/replicaset.go +++ b/internal/aws/k8s/k8sclient/replicaset.go @@ -123,7 +123,7 @@ func newReplicaSetClient(clientSet kubernetes.Interface, logger *zap.Logger, opt ctx := context.Background() if _, err := clientSet.AppsV1().ReplicaSets(metav1.NamespaceAll).List(ctx, metav1.ListOptions{}); err != nil { - return nil, fmt.Errorf("cannot list ReplicaSet. err: %v", err) + return nil, fmt.Errorf("cannot list ReplicaSet. err: %w", err) } c.stopChan = make(chan struct{}) diff --git a/internal/aws/proxy/conn.go b/internal/aws/proxy/conn.go index 7008235bed5f..2cbab84c4b76 100644 --- a/internal/aws/proxy/conn.go +++ b/internal/aws/proxy/conn.go @@ -229,14 +229,15 @@ func (s *stsCalls) getCreds(region string, roleArn string) (*credentials.Credent // Make explicit call to fetch credentials. _, err = stsCred.Get() if err != nil { - if aerr, ok := err.(awserr.Error); ok { - switch aerr.Code() { + var awsErr awserr.Error + if errors.As(err, &awsErr) { + switch awsErr.Code() { case sts.ErrCodeRegionDisabledException: s.log.Warn("STS regional endpoint disabled. Credentials for provided RoleARN will be fetched from STS primary region endpoint instead", - zap.String("region", region), zap.Error(aerr)) + zap.String("region", region), zap.Error(awsErr)) stsCred, err = s.getSTSCredsFromPrimaryRegionEndpoint(sess, roleArn, region) default: - return nil, fmt.Errorf("unable to handle AWS error: %w", aerr) + return nil, fmt.Errorf("unable to handle AWS error: %w", awsErr) } } } diff --git a/internal/aws/proxy/conn_test.go b/internal/aws/proxy/conn_test.go index 1949b4e98738..8e9ee5e7281a 100644 --- a/internal/aws/proxy/conn_test.go +++ b/internal/aws/proxy/conn_test.go @@ -18,7 +18,6 @@ import ( "errors" "fmt" "os" - "strings" "testing" "github.com/aws/aws-sdk-go/aws/credentials" @@ -54,22 +53,6 @@ func logSetup() (*zap.Logger, *observer.ObservedLogs) { return zap.New(core), recorded } -func stashEnv() []string { - env := os.Environ() - os.Clearenv() - - return env -} - -func restoreEnv(env []string) { - os.Clearenv() - - for _, e := range env { - p := strings.SplitN(e, "=", 2) - os.Setenv(p[0], p[1]) - } -} - func setupMock(sess *session.Session) (f1 func(s *session.Session) (string, error), f2 func(roleArn string, region string, logger *zap.Logger) (*session.Session, error)) { f1 = getEC2Region @@ -90,13 +73,10 @@ func tearDownMock( // fetch region value from environment variable func TestRegionFromEnv(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) - logger, recordedLogs := logSetup() region := "us-east-100" - os.Setenv("AWS_REGION", region) + t.Setenv("AWS_REGION", region) expectedSession, err := session.NewSession() assert.NoError(t, err, "expectedSession should be created") @@ -140,11 +120,8 @@ func TestRegionFromConfig(t *testing.T) { } func TestRegionFromECS(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) - - os.Setenv(ecsContainerMetadataEnabledEnvVar, "true") - os.Setenv(ecsMetadataFileEnvVar, "testdata/ecsmetadatafile.txt") + t.Setenv(ecsContainerMetadataEnabledEnvVar, "true") + t.Setenv(ecsMetadataFileEnvVar, "testdata/ecsmetadatafile.txt") logger, recordedLogs := logSetup() @@ -166,11 +143,8 @@ func TestRegionFromECS(t *testing.T) { } func TestRegionFromECSInvalidArn(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) - - os.Setenv(ecsContainerMetadataEnabledEnvVar, "true") - os.Setenv(ecsMetadataFileEnvVar, "testdata/ecsmetadatafileInvalidArn.txt") + t.Setenv(ecsContainerMetadataEnabledEnvVar, "true") + t.Setenv(ecsMetadataFileEnvVar, "testdata/ecsmetadatafileInvalidArn.txt") logger, recordedLogs := logSetup() @@ -239,19 +213,14 @@ func TestNoRegion(t *testing.T) { // getRegionFromECSMetadata() returns an error if ECS metadata related env is not set func TestNoECSMetadata(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) _, err := getRegionFromECSMetadata() assert.EqualError(t, err, "ECS metadata endpoint is inaccessible", "expected error") } // getRegionFromECSMetadata() throws an error when ECS metadata file cannot be parsed as valid JSON func TestInvalidECSMetadata(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) - - os.Setenv(ecsContainerMetadataEnabledEnvVar, "true") - os.Setenv(ecsMetadataFileEnvVar, "testdata/ecsmetadatafileinvalid.txt") + t.Setenv(ecsContainerMetadataEnabledEnvVar, "true") + t.Setenv(ecsMetadataFileEnvVar, "testdata/ecsmetadatafileinvalid.txt") _, err := getRegionFromECSMetadata() assert.EqualError(t, err, @@ -261,11 +230,8 @@ func TestInvalidECSMetadata(t *testing.T) { // getRegionFromECSMetadata() throws an error and returns an empty string when ECS metadata file cannot be opened func TestMissingECSMetadataFile(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) - - os.Setenv(ecsContainerMetadataEnabledEnvVar, "true") - os.Setenv(ecsMetadataFileEnvVar, "testdata/doesntExist.txt") + t.Setenv(ecsContainerMetadataEnabledEnvVar, "true") + t.Setenv(ecsMetadataFileEnvVar, "testdata/doesntExist.txt") _, err := getRegionFromECSMetadata() assert.Regexp(t, @@ -275,9 +241,6 @@ func TestMissingECSMetadataFile(t *testing.T) { } func TestLoadEnvConfigCreds(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) - cases := struct { Env map[string]string Val credentials.Value @@ -294,7 +257,7 @@ func TestLoadEnvConfigCreds(t *testing.T) { } for k, v := range cases.Env { - os.Setenv(k, v) + t.Setenv(k, v) } cfg, err := newAWSSession("", "", zap.NewNop()) assert.NoError(t, err, "Expect no error") @@ -316,32 +279,23 @@ func TestGetProxyUrlProxyAddressNotValid(t *testing.T) { } func TestGetProxyAddressFromEnvVariable(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) - os.Setenv(httpsProxyEnvVar, "https://127.0.0.1:8888") + t.Setenv(httpsProxyEnvVar, "https://127.0.0.1:8888") assert.Equal(t, os.Getenv(httpsProxyEnvVar), getProxyAddress(""), "Expect function return value should be same with Environment value") } func TestGetProxyAddressFromConfigFile(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) const expectedAddr = "https://127.0.0.1:8888" assert.Equal(t, expectedAddr, getProxyAddress("https://127.0.0.1:8888"), "Expect function return value should be same with input value") } func TestGetProxyAddressWhenNotExist(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) - assert.Equal(t, "", getProxyAddress(""), "Expect function return value to be empty") } func TestGetProxyAddressPriority(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) - os.Setenv(httpsProxyEnvVar, "https://127.0.0.1:8888") + t.Setenv(httpsProxyEnvVar, "https://127.0.0.1:8888") assert.Equal(t, "https://127.0.0.1:9999", getProxyAddress("https://127.0.0.1:9999"), "Expect function return value to be same with input") } @@ -375,24 +329,18 @@ func TestGetSTSRegionalEndpoint(t *testing.T) { } func TestNewSessionCreationFailed(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) - // manipulate env vars so that session.NewSession() fails - os.Setenv("AWS_SDK_LOAD_CONFIG", "true") - os.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "invalid") + t.Setenv("AWS_SDK_LOAD_CONFIG", "true") + t.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "invalid") _, err := newAWSSession("", "dontCare", zap.NewNop()) assert.Error(t, err, "expected failure") } func TestGetSTSCredsFailed(t *testing.T) { - env := stashEnv() - defer restoreEnv(env) - // manipulate env vars so that session.NewSession() fails - os.Setenv("AWS_SDK_LOAD_CONFIG", "true") - os.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "invalid") + t.Setenv("AWS_SDK_LOAD_CONFIG", "true") + t.Setenv("AWS_STS_REGIONAL_ENDPOINTS", "invalid") _, err := newAWSSession("ROLEARN", "us-west-2", zap.NewNop()) assert.Error(t, err, "expected failure") diff --git a/internal/aws/proxy/go.mod b/internal/aws/proxy/go.mod index 8abf5134b8d1..552904ce60f0 100644 --- a/internal/aws/proxy/go.mod +++ b/internal/aws/proxy/go.mod @@ -3,10 +3,10 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/pr go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/internal/aws/proxy/go.sum b/internal/aws/proxy/go.sum index c72ad5b1be53..df9adc56d93a 100644 --- a/internal/aws/proxy/go.sum +++ b/internal/aws/proxy/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -30,8 +30,8 @@ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= diff --git a/internal/aws/proxy/server_test.go b/internal/aws/proxy/server_test.go index f2a8cc95dc44..5a4a828402ae 100644 --- a/internal/aws/proxy/server_test.go +++ b/internal/aws/proxy/server_test.go @@ -25,7 +25,6 @@ import ( "net" "net/http" "net/http/httptest" - "os" "strings" "testing" "time" @@ -46,9 +45,7 @@ const ( func TestHappyCase(t *testing.T) { logger, recordedLogs := logSetup() - env := stashEnv() - defer restoreEnv(env) - os.Setenv(regionEnvVarName, regionEnvVar) + t.Setenv(regionEnvVarName, regionEnvVar) cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) @@ -75,11 +72,9 @@ func TestHappyCase(t *testing.T) { func TestHandlerHappyCase(t *testing.T) { logger, _ := logSetup() - env := stashEnv() - defer restoreEnv(env) - os.Setenv(regionEnvVarName, regionEnvVar) - os.Setenv("AWS_ACCESS_KEY_ID", "fakeAccessKeyID") - os.Setenv("AWS_SECRET_ACCESS_KEY", "fakeSecretAccessKey") + t.Setenv(regionEnvVarName, regionEnvVar) + t.Setenv("AWS_ACCESS_KEY_ID", "fakeAccessKeyID") + t.Setenv("AWS_SECRET_ACCESS_KEY", "fakeSecretAccessKey") cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) @@ -102,11 +97,9 @@ func TestHandlerHappyCase(t *testing.T) { func TestHandlerIoReadSeekerCreationFailed(t *testing.T) { logger, recordedLogs := logSetup() - env := stashEnv() - defer restoreEnv(env) - os.Setenv(regionEnvVarName, regionEnvVar) - os.Setenv("AWS_ACCESS_KEY_ID", "fakeAccessKeyID") - os.Setenv("AWS_SECRET_ACCESS_KEY", "fakeSecretAccessKey") + t.Setenv(regionEnvVarName, regionEnvVar) + t.Setenv("AWS_ACCESS_KEY_ID", "fakeAccessKeyID") + t.Setenv("AWS_SECRET_ACCESS_KEY", "fakeSecretAccessKey") cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) @@ -133,11 +126,9 @@ func TestHandlerIoReadSeekerCreationFailed(t *testing.T) { func TestHandlerNilBodyIsOk(t *testing.T) { logger, recordedLogs := logSetup() - env := stashEnv() - defer restoreEnv(env) - os.Setenv(regionEnvVarName, regionEnvVar) - os.Setenv("AWS_ACCESS_KEY_ID", "fakeAccessKeyID") - os.Setenv("AWS_SECRET_ACCESS_KEY", "fakeSecretAccessKey") + t.Setenv(regionEnvVarName, regionEnvVar) + t.Setenv("AWS_ACCESS_KEY_ID", "fakeAccessKeyID") + t.Setenv("AWS_SECRET_ACCESS_KEY", "fakeSecretAccessKey") cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) @@ -161,9 +152,7 @@ func TestHandlerNilBodyIsOk(t *testing.T) { func TestHandlerSignerErrorsOut(t *testing.T) { logger, recordedLogs := logSetup() - env := stashEnv() - defer restoreEnv(env) - os.Setenv(regionEnvVarName, regionEnvVar) + t.Setenv(regionEnvVarName, regionEnvVar) cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) @@ -187,9 +176,7 @@ func TestHandlerSignerErrorsOut(t *testing.T) { func TestTCPEndpointInvalid(t *testing.T) { logger, _ := logSetup() - env := stashEnv() - defer restoreEnv(env) - os.Setenv(regionEnvVarName, regionEnvVar) + t.Setenv(regionEnvVarName, regionEnvVar) cfg := DefaultConfig() cfg.TCPAddr.Endpoint = "invalid\n" @@ -200,9 +187,7 @@ func TestTCPEndpointInvalid(t *testing.T) { func TestCantGetAWSConfigSession(t *testing.T) { logger, _ := logSetup() - env := stashEnv() - defer restoreEnv(env) - os.Setenv(regionEnvVarName, regionEnvVar) + t.Setenv(regionEnvVarName, regionEnvVar) cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) @@ -224,9 +209,7 @@ func TestCantGetAWSConfigSession(t *testing.T) { func TestCantGetServiceEndpoint(t *testing.T) { logger, _ := logSetup() - env := stashEnv() - defer restoreEnv(env) - os.Setenv(regionEnvVarName, "not a region") + t.Setenv(regionEnvVarName, "not a region") cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) @@ -240,9 +223,7 @@ func TestCantGetServiceEndpoint(t *testing.T) { func TestAWSEndpointInvalid(t *testing.T) { logger, _ := logSetup() - env := stashEnv() - defer restoreEnv(env) - os.Setenv(regionEnvVarName, regionEnvVar) + t.Setenv(regionEnvVarName, regionEnvVar) cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) @@ -257,9 +238,7 @@ func TestAWSEndpointInvalid(t *testing.T) { func TestCanCreateTransport(t *testing.T) { logger, _ := logSetup() - env := stashEnv() - defer restoreEnv(env) - os.Setenv(regionEnvVarName, regionEnvVar) + t.Setenv(regionEnvVarName, regionEnvVar) cfg := DefaultConfig() tcpAddr := testutil.GetAvailableLocalAddress(t) diff --git a/internal/aws/xray/go.mod b/internal/aws/xray/go.mod index 56266b9833d1..801fd761369d 100644 --- a/internal/aws/xray/go.mod +++ b/internal/aws/xray/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xr go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/stretchr/testify v1.7.2 ) diff --git a/internal/aws/xray/go.sum b/internal/aws/xray/go.sum index 16298bc26271..82d28156407e 100644 --- a/internal/aws/xray/go.sum +++ b/internal/aws/xray/go.sum @@ -1,5 +1,5 @@ -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= diff --git a/internal/aws/xray/testdata/sampleapp/go.mod b/internal/aws/xray/testdata/sampleapp/go.mod index ebb9055a975c..346c4b4058fe 100644 --- a/internal/aws/xray/testdata/sampleapp/go.mod +++ b/internal/aws/xray/testdata/sampleapp/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xr go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/aws/aws-xray-sdk-go v1.7.0 ) diff --git a/internal/aws/xray/testdata/sampleapp/go.sum b/internal/aws/xray/testdata/sampleapp/go.sum index 43a59ed7846a..0ff34a5c148d 100644 --- a/internal/aws/xray/testdata/sampleapp/go.sum +++ b/internal/aws/xray/testdata/sampleapp/go.sum @@ -7,8 +7,8 @@ github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aws/aws-sdk-go v1.17.12/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.6.0/go.mod h1:tI4KhsR5VkzlUa2DZAdwx7wCAYGwkZZ1H31PYrBFx1w= github.com/aws/aws-sdk-go-v2/service/route53 v1.6.2/go.mod h1:ZnAMilx42P7DgIrdjlWCkNIGSBLzeyk6T31uB8oGTwY= github.com/aws/aws-xray-sdk-go v1.7.0 h1:mATj8779Kj8Ae8oyXZ3S4GeK9BDGHqlLAKGCUiE31o4= diff --git a/internal/aws/xray/testdata/sampleserver/go.mod b/internal/aws/xray/testdata/sampleserver/go.mod index 21e19798cce8..673e9c34bb22 100644 --- a/internal/aws/xray/testdata/sampleserver/go.mod +++ b/internal/aws/xray/testdata/sampleserver/go.mod @@ -14,7 +14,7 @@ require ( require ( github.com/andybalholm/brotli v1.0.4 // indirect - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/klauspost/compress v1.15.6 // indirect diff --git a/internal/aws/xray/testdata/sampleserver/go.sum b/internal/aws/xray/testdata/sampleserver/go.sum index 43a59ed7846a..0ff34a5c148d 100644 --- a/internal/aws/xray/testdata/sampleserver/go.sum +++ b/internal/aws/xray/testdata/sampleserver/go.sum @@ -7,8 +7,8 @@ github.com/andybalholm/brotli v1.0.4 h1:V7DdXeJtZscaqfNuAdSRuRFzuiKlHSC/Zh3zl9qY github.com/andybalholm/brotli v1.0.4/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/aws/aws-sdk-go v1.17.12/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v1.6.0/go.mod h1:tI4KhsR5VkzlUa2DZAdwx7wCAYGwkZZ1H31PYrBFx1w= github.com/aws/aws-sdk-go-v2/service/route53 v1.6.2/go.mod h1:ZnAMilx42P7DgIrdjlWCkNIGSBLzeyk6T31uB8oGTwY= github.com/aws/aws-xray-sdk-go v1.7.0 h1:mATj8779Kj8Ae8oyXZ3S4GeK9BDGHqlLAKGCUiE31o4= diff --git a/internal/common/testutil/testutil.go b/internal/common/testutil/testutil.go index abdfac652c19..d989e2f0cbac 100644 --- a/internal/common/testutil/testutil.go +++ b/internal/common/testutil/testutil.go @@ -18,10 +18,10 @@ import ( "net" "os/exec" "runtime" - "strconv" "strings" "testing" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -34,21 +34,7 @@ type portpair struct { // describing it. The port is available for opening when this function returns // provided that there is no race by some other code to grab the same port // immediately. -func GetAvailableLocalAddress(t *testing.T) string { - ln, err := net.Listen("tcp", "localhost:0") - require.NoError(t, err, "Failed to get a free local port") - // There is a possible race if something else takes this same port before - // the test uses it, however, that is unlikely in practice. - defer func() { - require.NoError(t, ln.Close()) - }() - return ln.Addr().String() -} - -// GetAvailablePort finds an available local port and returns it. The port is -// available for opening when this function returns provided that there is no -// race by some other code to grab the same port immediately. -func GetAvailablePort(t *testing.T) uint16 { +func GetAvailableLocalAddress(t testing.TB) string { // Retry has been added for windows as net.Listen can return a port that is not actually available. Details can be // found in https://github.com/docker/for-win/issues/3171 but to summarize Hyper-V will reserve ranges of ports // which do not show up under the "netstat -ano" but can only be found by @@ -56,15 +42,14 @@ func GetAvailablePort(t *testing.T) uint16 { // retry if the port returned by GetAvailableLocalAddress falls in one of those them. var exclusions []portpair portFound := false - var port string - var err error if runtime.GOOS == "windows" { exclusions = getExclusionsList(t) } + var endpoint string for !portFound { - endpoint := GetAvailableLocalAddress(t) - _, port, err = net.SplitHostPort(endpoint) + endpoint = findAvailableAddress(t) + _, port, err := net.SplitHostPort(endpoint) require.NoError(t, err) portFound = true if runtime.GOOS == "windows" { @@ -77,29 +62,37 @@ func GetAvailablePort(t *testing.T) uint16 { } } - portInt, err := strconv.ParseUint(port, 10, 16) - require.NoError(t, err) + return endpoint +} - return uint16(portInt) +func findAvailableAddress(t testing.TB) string { + ln, err := net.Listen("tcp", "localhost:0") + require.NoError(t, err, "Failed to get a free local port") + // There is a possible race if something else takes this same port before + // the test uses it, however, that is unlikely in practice. + defer func() { + assert.NoError(t, ln.Close()) + }() + return ln.Addr().String() } // Get excluded ports on Windows from the command: netsh interface ipv4 show excludedportrange protocol=tcp -func getExclusionsList(t *testing.T) []portpair { +func getExclusionsList(t testing.TB) []portpair { cmdTCP := exec.Command("netsh", "interface", "ipv4", "show", "excludedportrange", "protocol=tcp") outputTCP, errTCP := cmdTCP.CombinedOutput() require.NoError(t, errTCP) - exclusions := createExclusionsList(string(outputTCP), t) + exclusions := createExclusionsList(t, string(outputTCP)) cmdUDP := exec.Command("netsh", "interface", "ipv4", "show", "excludedportrange", "protocol=udp") outputUDP, errUDP := cmdUDP.CombinedOutput() require.NoError(t, errUDP) - exclusions = append(exclusions, createExclusionsList(string(outputUDP), t)...) + exclusions = append(exclusions, createExclusionsList(t, string(outputUDP))...) return exclusions } -func createExclusionsList(exclusionsText string, t *testing.T) []portpair { - exclusions := []portpair{} +func createExclusionsList(t testing.TB, exclusionsText string) []portpair { + var exclusions []portpair parts := strings.Split(exclusionsText, "--------") require.Equal(t, len(parts), 3) diff --git a/internal/common/testutil/testutil_test.go b/internal/common/testutil/testutil_test.go index 4d1c6f87468b..1721cc723c57 100644 --- a/internal/common/testutil/testutil_test.go +++ b/internal/common/testutil/testutil_test.go @@ -16,33 +16,24 @@ package testutil import ( "net" - "strconv" "testing" "github.com/stretchr/testify/require" ) func TestGetAvailableLocalAddress(t *testing.T) { - testEndpointAvailable(t, GetAvailableLocalAddress(t)) -} - -func TestGetAvailablePort(t *testing.T) { - portStr := strconv.Itoa(int(GetAvailablePort(t))) - require.NotEqual(t, "", portStr) - - testEndpointAvailable(t, "localhost:"+portStr) -} + addr := GetAvailableLocalAddress(t) -func testEndpointAvailable(t *testing.T, endpoint string) { // Endpoint should be free. - ln0, err := net.Listen("tcp", endpoint) + ln0, err := net.Listen("tcp", addr) require.NoError(t, err) require.NotNil(t, ln0) - defer ln0.Close() + t.Cleanup(func() { + require.NoError(t, ln0.Close()) + }) - // Ensure that the endpoint wasn't something like ":0" by checking that a - // second listener will fail. - ln1, err := net.Listen("tcp", endpoint) + // Ensure that the endpoint wasn't something like ":0" by checking that a second listener will fail. + ln1, err := net.Listen("tcp", addr) require.Error(t, err) require.Nil(t, ln1) } @@ -67,9 +58,9 @@ Start Port End Port * - Administered port exclusions. ` - exclusions := createExclusionsList(exclusionsText, t) + exclusions := createExclusionsList(t, exclusionsText) require.Equal(t, len(exclusions), 2) - emptyExclusions := createExclusionsList(emptyExclusionsText, t) + emptyExclusions := createExclusionsList(t, emptyExclusionsText) require.Equal(t, len(emptyExclusions), 0) } diff --git a/internal/components/components.go b/internal/components/components.go index a43e29d08591..732ddcd2bef3 100644 --- a/internal/components/components.go +++ b/internal/components/components.go @@ -43,6 +43,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter" + "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/humioexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/influxdbexporter" @@ -100,6 +101,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver" @@ -194,6 +196,7 @@ func Components() (component.Factories, error) { receivers := []component.ReceiverFactory{ activedirectorydsreceiver.NewFactory(), + aerospikereceiver.NewFactory(), apachereceiver.NewFactory(), awscontainerinsightreceiver.NewFactory(), awsecscontainermetricsreceiver.NewFactory(), @@ -282,6 +285,7 @@ func Components() (component.Factories, error) { f5cloudexporter.NewFactory(), fileexporter.NewFactory(), googlecloudexporter.NewFactory(), + googlemanagedprometheusexporter.NewFactory(), googlecloudpubsubexporter.NewFactory(), honeycombexporter.NewFactory(), humioexporter.NewFactory(), diff --git a/internal/components/exporters_test.go b/internal/components/exporters_test.go index fbd80794c6e1..f669e6e40537 100644 --- a/internal/components/exporters_test.go +++ b/internal/components/exporters_test.go @@ -337,6 +337,10 @@ func TestDefaultExporters(t *testing.T) { exporter: "googlecloud", skipLifecycle: true, // Requires credentials to be able to successfully load the exporter }, + { + exporter: "googlemanagedprometheus", + skipLifecycle: true, // Requires credentials to be able to successfully load the exporter + }, { exporter: "googlecloudpubsub", }, diff --git a/internal/components/receivers_test.go b/internal/components/receivers_test.go index 9efeed582721..9ad6f5447f87 100644 --- a/internal/components/receivers_test.go +++ b/internal/components/receivers_test.go @@ -53,6 +53,9 @@ func TestDefaultReceivers(t *testing.T) { receiver: "active_directory_ds", skipLifecyle: true, // Requires a running windows service }, + { + receiver: "aerospike", + }, { receiver: "apache", }, diff --git a/internal/containertest/go.mod b/internal/containertest/go.mod index 26dd248a1617..e673ecd2e12b 100644 --- a/internal/containertest/go.mod +++ b/internal/containertest/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/cenkalti/backoff/v4 v4.1.3 - github.com/docker/docker v20.10.16+incompatible + github.com/docker/docker v20.10.17+incompatible github.com/docker/go-connections v0.4.0 github.com/stretchr/testify v1.7.2 ) diff --git a/internal/containertest/go.sum b/internal/containertest/go.sum index d0855b563c88..a3700786acc9 100644 --- a/internal/containertest/go.sum +++ b/internal/containertest/go.sum @@ -10,8 +10,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.0-beta.1+incompatible h1:9MjVa+OTMHm4C0kKZB68jPlDM9Cg75ta4i46Gxxxn8o= github.com/docker/distribution v2.8.0-beta.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= diff --git a/internal/coreinternal/go.mod b/internal/coreinternal/go.mod index 58b200af7d58..60ac5e15846a 100644 --- a/internal/coreinternal/go.mod +++ b/internal/coreinternal/go.mod @@ -8,9 +8,9 @@ require ( github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da github.com/spf13/cast v1.5.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.28.0 ) diff --git a/internal/coreinternal/go.sum b/internal/coreinternal/go.sum index 150bb12746d2..06e3451e84f7 100644 --- a/internal/coreinternal/go.sum +++ b/internal/coreinternal/go.sum @@ -194,12 +194,12 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= diff --git a/internal/coreinternal/processor/filterlog/filterlog.go b/internal/coreinternal/processor/filterlog/filterlog.go index 1e2a5716c834..06fd9f81f494 100644 --- a/internal/coreinternal/processor/filterlog/filterlog.go +++ b/internal/coreinternal/processor/filterlog/filterlog.go @@ -63,14 +63,14 @@ func NewMatcher(mp *filterconfig.MatchProperties) (Matcher, error) { if len(mp.LogBodies) > 0 { bodyFS, err = filterset.CreateFilterSet(mp.LogBodies, &mp.Config) if err != nil { - return nil, fmt.Errorf("error creating log record body filters: %v", err) + return nil, fmt.Errorf("error creating log record body filters: %w", err) } } var severitytextFS filterset.FilterSet if len(mp.LogSeverityTexts) > 0 { severitytextFS, err = filterset.CreateFilterSet(mp.LogSeverityTexts, &mp.Config) if err != nil { - return nil, fmt.Errorf("error creating log record severity text filters: %v", err) + return nil, fmt.Errorf("error creating log record severity text filters: %w", err) } } diff --git a/internal/coreinternal/processor/filtermatcher/filtermatcher.go b/internal/coreinternal/processor/filtermatcher/filtermatcher.go index e018a2fc6c24..e928b3f08fc9 100644 --- a/internal/coreinternal/processor/filtermatcher/filtermatcher.go +++ b/internal/coreinternal/processor/filtermatcher/filtermatcher.go @@ -46,14 +46,14 @@ func NewMatcher(mp *filterconfig.MatchProperties) (PropertiesMatcher, error) { for _, library := range mp.Libraries { name, err := filterset.CreateFilterSet([]string{library.Name}, &mp.Config) if err != nil { - return PropertiesMatcher{}, fmt.Errorf("error creating library name filters: %v", err) + return PropertiesMatcher{}, fmt.Errorf("error creating library name filters: %w", err) } var version filterset.FilterSet if library.Version != nil { filter, err := filterset.CreateFilterSet([]string{*library.Version}, &mp.Config) if err != nil { - return PropertiesMatcher{}, fmt.Errorf("error creating library version filters: %v", err) + return PropertiesMatcher{}, fmt.Errorf("error creating library version filters: %w", err) } version = filter } @@ -66,7 +66,7 @@ func NewMatcher(mp *filterconfig.MatchProperties) (PropertiesMatcher, error) { if len(mp.Attributes) > 0 { am, err = NewAttributesMatcher(mp.Config, mp.Attributes) if err != nil { - return PropertiesMatcher{}, fmt.Errorf("error creating attribute filters: %v", err) + return PropertiesMatcher{}, fmt.Errorf("error creating attribute filters: %w", err) } } @@ -74,7 +74,7 @@ func NewMatcher(mp *filterconfig.MatchProperties) (PropertiesMatcher, error) { if len(mp.Resources) > 0 { rm, err = NewAttributesMatcher(mp.Config, mp.Resources) if err != nil { - return PropertiesMatcher{}, fmt.Errorf("error creating resource filters: %v", err) + return PropertiesMatcher{}, fmt.Errorf("error creating resource filters: %w", err) } } diff --git a/internal/coreinternal/processor/filterspan/filterspan.go b/internal/coreinternal/processor/filterspan/filterspan.go index 8cb91fdb1a44..a0ef3cf84b97 100644 --- a/internal/coreinternal/processor/filterspan/filterspan.go +++ b/internal/coreinternal/processor/filterspan/filterspan.go @@ -64,7 +64,7 @@ func NewMatcher(mp *filterconfig.MatchProperties) (Matcher, error) { if len(mp.Services) > 0 { serviceFS, err = filterset.CreateFilterSet(mp.Services, &mp.Config) if err != nil { - return nil, fmt.Errorf("error creating service name filters: %v", err) + return nil, fmt.Errorf("error creating service name filters: %w", err) } } @@ -72,7 +72,7 @@ func NewMatcher(mp *filterconfig.MatchProperties) (Matcher, error) { if len(mp.SpanNames) > 0 { nameFS, err = filterset.CreateFilterSet(mp.SpanNames, &mp.Config) if err != nil { - return nil, fmt.Errorf("error creating span name filters: %v", err) + return nil, fmt.Errorf("error creating span name filters: %w", err) } } diff --git a/internal/docker/docker.go b/internal/docker/docker.go index d0a46b7e389a..81aa011dccd6 100644 --- a/internal/docker/docker.go +++ b/internal/docker/docker.go @@ -17,6 +17,7 @@ package docker // import "github.com/open-telemetry/opentelemetry-collector-cont import ( "context" "encoding/json" + "errors" "fmt" "io" "strings" @@ -188,7 +189,7 @@ func (dc *Client) toStatsJSON( containerStats.Body.Close() if err != nil { // EOF means there aren't any containerStats, perhaps because the container has been removed. - if err == io.EOF { + if errors.Is(err, io.EOF) { // It isn't indicative of actual error. return nil, err } diff --git a/internal/docker/go.mod b/internal/docker/go.mod index 8484a9fbe1d5..7f7929589011 100644 --- a/internal/docker/go.mod +++ b/internal/docker/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker go 1.17 require ( - github.com/docker/docker v20.10.16+incompatible + github.com/docker/docker v20.10.17+incompatible github.com/gobwas/glob v0.2.3 github.com/stretchr/testify v1.7.2 go.uber.org/zap v1.21.0 diff --git a/internal/docker/go.sum b/internal/docker/go.sum index 42a1a6daa23a..c42bc8af6a7d 100644 --- a/internal/docker/go.sum +++ b/internal/docker/go.sum @@ -10,8 +10,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= diff --git a/internal/kubelet/go.mod b/internal/kubelet/go.mod index 8a948028562c..17664c3c2c9f 100644 --- a/internal/kubelet/go.mod +++ b/internal/kubelet/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/internal/kubelet/go.sum b/internal/kubelet/go.sum index 3d115f1f53a3..59f9dd6300fb 100644 --- a/internal/kubelet/go.sum +++ b/internal/kubelet/go.sum @@ -290,8 +290,8 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= diff --git a/internal/metadataproviders/aws/ec2/metadata_test.go b/internal/metadataproviders/aws/ec2/metadata_test.go index 8554ba46e590..c9f0cb753e2b 100644 --- a/internal/metadataproviders/aws/ec2/metadata_test.go +++ b/internal/metadataproviders/aws/ec2/metadata_test.go @@ -22,6 +22,7 @@ import ( "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/awstesting/mock" + "github.com/stretchr/testify/assert" ) func TestMetadataProvider_get(t *testing.T) { @@ -83,9 +84,8 @@ func TestMetadataProvider_available(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { c := NewProvider(tt.args.sess) - if _, got := c.InstanceID(tt.args.ctx); got != tt.want { - t.Errorf("available() = %v, want %v", got, tt.want) - } + _, err := c.InstanceID(tt.args.ctx) + assert.ErrorIs(t, err, tt.want) }) } } diff --git a/internal/metadataproviders/azure/metadata.go b/internal/metadataproviders/azure/metadata.go index 6d8c2ba7590e..a9496df01fcd 100644 --- a/internal/metadataproviders/azure/metadata.go +++ b/internal/metadataproviders/azure/metadata.go @@ -73,7 +73,7 @@ func (p *azureProviderImpl) Metadata(ctx context.Context) (*ComputeMetadata, err req, err := http.NewRequestWithContext(ctx, http.MethodGet, p.endpoint, nil) if err != nil { - return nil, fmt.Errorf("failed to create request: %v", err) + return nil, fmt.Errorf("failed to create request: %w", err) } req.Header.Add("Metadata", "True") @@ -84,7 +84,7 @@ func (p *azureProviderImpl) Metadata(ctx context.Context) (*ComputeMetadata, err resp, err := p.client.Do(req) if err != nil { - return nil, fmt.Errorf("failed to query Azure IMDS: %v", err) + return nil, fmt.Errorf("failed to query Azure IMDS: %w", err) } else if resp.StatusCode != 200 { //lint:ignore ST1005 Azure is a capitalized proper noun here return nil, fmt.Errorf("Azure IMDS replied with status code: %s", resp.Status) @@ -93,13 +93,13 @@ func (p *azureProviderImpl) Metadata(ctx context.Context) (*ComputeMetadata, err defer resp.Body.Close() respBody, err := ioutil.ReadAll(resp.Body) if err != nil { - return nil, fmt.Errorf("failed to read Azure IMDS reply: %v", err) + return nil, fmt.Errorf("failed to read Azure IMDS reply: %w", err) } var metadata *ComputeMetadata err = json.Unmarshal(respBody, &metadata) if err != nil { - return nil, fmt.Errorf("failed to decode Azure IMDS reply: %v", err) + return nil, fmt.Errorf("failed to decode Azure IMDS reply: %w", err) } return metadata, nil diff --git a/internal/metadataproviders/go.mod b/internal/metadataproviders/go.mod index cfa155eccbd4..bf0c8eae4e12 100644 --- a/internal/metadataproviders/go.mod +++ b/internal/metadataproviders/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/Showmax/go-fqdn v1.0.0 - github.com/aws/aws-sdk-go v1.44.28 - github.com/docker/docker v20.10.16+incompatible + github.com/aws/aws-sdk-go v1.44.33 + github.com/docker/docker v20.10.17+incompatible github.com/hashicorp/consul/api v1.12.0 github.com/stretchr/testify v1.7.2 ) diff --git a/internal/metadataproviders/go.sum b/internal/metadataproviders/go.sum index bc148c611e7d..5f3dda055172 100644 --- a/internal/metadataproviders/go.sum +++ b/internal/metadataproviders/go.sum @@ -9,8 +9,8 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -18,8 +18,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= diff --git a/internal/scrapertest/go.mod b/internal/scrapertest/go.mod index 92e474248845..5790b8639e75 100644 --- a/internal/scrapertest/go.mod +++ b/internal/scrapertest/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 ) diff --git a/internal/scrapertest/go.sum b/internal/scrapertest/go.sum index a6da1b04a873..271e496783b5 100644 --- a/internal/scrapertest/go.sum +++ b/internal/scrapertest/go.sum @@ -73,8 +73,8 @@ github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8 github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= diff --git a/internal/sharedcomponent/go.mod b/internal/sharedcomponent/go.mod index 63648e1387b5..fd49be6875ce 100644 --- a/internal/sharedcomponent/go.mod +++ b/internal/sharedcomponent/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( @@ -23,7 +23,7 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/internal/sharedcomponent/go.sum b/internal/sharedcomponent/go.sum index 048c3020beb2..d2678698c913 100644 --- a/internal/sharedcomponent/go.sum +++ b/internal/sharedcomponent/go.sum @@ -180,10 +180,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/internal/splunk/go.mod b/internal/splunk/go.mod index f50c0b271126..06e776e003a7 100644 --- a/internal/splunk/go.mod +++ b/internal/splunk/go.mod @@ -4,9 +4,9 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 ) diff --git a/internal/splunk/go.sum b/internal/splunk/go.sum index 96f9a6dea8c8..99db59a11570 100644 --- a/internal/splunk/go.sum +++ b/internal/splunk/go.sum @@ -190,12 +190,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/pkg/batchperresourceattr/go.mod b/pkg/batchperresourceattr/go.mod index f9c3dd05f6d5..343c748c6af4 100644 --- a/pkg/batchperresourceattr/go.mod +++ b/pkg/batchperresourceattr/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 ) diff --git a/pkg/batchperresourceattr/go.sum b/pkg/batchperresourceattr/go.sum index 14545e79fd24..7881765a601a 100644 --- a/pkg/batchperresourceattr/go.sum +++ b/pkg/batchperresourceattr/go.sum @@ -87,10 +87,10 @@ github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8 github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= diff --git a/pkg/batchpersignal/go.mod b/pkg/batchpersignal/go.mod index 42bae3cd0599..b32ca8c39498 100644 --- a/pkg/batchpersignal/go.mod +++ b/pkg/batchpersignal/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/pkg/batchpersignal/go.sum b/pkg/batchpersignal/go.sum index 0fb192e0d25f..f22abd11ee3c 100644 --- a/pkg/batchpersignal/go.sum +++ b/pkg/batchpersignal/go.sum @@ -70,8 +70,8 @@ github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8 github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= diff --git a/pkg/resourcetotelemetry/go.mod b/pkg/resourcetotelemetry/go.mod index dbddea4d264d..f1401544d616 100644 --- a/pkg/resourcetotelemetry/go.mod +++ b/pkg/resourcetotelemetry/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/pkg/resourcetotelemetry/go.sum b/pkg/resourcetotelemetry/go.sum index 43a55be67e1a..0f7764b7ed0a 100644 --- a/pkg/resourcetotelemetry/go.sum +++ b/pkg/resourcetotelemetry/go.sum @@ -173,10 +173,10 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/pkg/stanza/adapter/receiver.go b/pkg/stanza/adapter/receiver.go index 8cfffc6aca8c..b1cd2fd10e19 100644 --- a/pkg/stanza/adapter/receiver.go +++ b/pkg/stanza/adapter/receiver.go @@ -54,12 +54,12 @@ func (r *receiver) Start(ctx context.Context, host component.Host) error { r.cancel = cancel r.logger.Info("Starting stanza receiver") - if setErr := r.setStorageClient(ctx, host); setErr != nil { - return fmt.Errorf("storage client: %s", setErr) + if err := r.setStorageClient(ctx, host); err != nil { + return fmt.Errorf("storage client: %w", err) } - if obsErr := r.pipe.Start(r.getPersister()); obsErr != nil { - return fmt.Errorf("start stanza: %s", obsErr) + if err := r.pipe.Start(r.getPersister()); err != nil { + return fmt.Errorf("start stanza: %w", err) } r.converter.Start() diff --git a/pkg/stanza/docs/operators/move.md b/pkg/stanza/docs/operators/move.md index 2745961628f9..ed765951976c 100644 --- a/pkg/stanza/docs/operators/move.md +++ b/pkg/stanza/docs/operators/move.md @@ -204,7 +204,6 @@ Remove a layer from the body } } } -} ``` diff --git a/pkg/stanza/entry/attribute_field.go b/pkg/stanza/entry/attribute_field.go index a1bf7c921355..062a757a5252 100644 --- a/pkg/stanza/entry/attribute_field.go +++ b/pkg/stanza/entry/attribute_field.go @@ -177,7 +177,7 @@ func (f AttributeField) Delete(entry *Entry) (interface{}, bool) { func (f *AttributeField) UnmarshalJSON(raw []byte) error { var value string if err := json.Unmarshal(raw, &value); err != nil { - return fmt.Errorf("the field is not a string: %s", err) + return fmt.Errorf("the field is not a string: %w", err) } keys, err := fromJSONDot(value) @@ -203,7 +203,7 @@ func (f AttributeField) MarshalJSON() ([]byte, error) { func (f *AttributeField) UnmarshalYAML(unmarshal func(interface{}) error) error { var value string if err := unmarshal(&value); err != nil { - return fmt.Errorf("the field is not a string: %s", err) + return fmt.Errorf("the field is not a string: %w", err) } keys, err := fromJSONDot(value) diff --git a/pkg/stanza/entry/body_field.go b/pkg/stanza/entry/body_field.go index b533c2de1295..08d1aab60169 100644 --- a/pkg/stanza/entry/body_field.go +++ b/pkg/stanza/entry/body_field.go @@ -169,7 +169,7 @@ func (f BodyField) Delete(entry *Entry) (interface{}, bool) { func (f *BodyField) UnmarshalJSON(raw []byte) error { var value string if err := json.Unmarshal(raw, &value); err != nil { - return fmt.Errorf("the field is not a string: %s", err) + return fmt.Errorf("the field is not a string: %w", err) } keys, err := fromJSONDot(value) @@ -195,7 +195,7 @@ func (f BodyField) MarshalJSON() ([]byte, error) { func (f *BodyField) UnmarshalYAML(unmarshal func(interface{}) error) error { var value string if err := unmarshal(&value); err != nil { - return fmt.Errorf("the field is not a string: %s", err) + return fmt.Errorf("the field is not a string: %w", err) } keys, err := fromJSONDot(value) diff --git a/pkg/stanza/entry/field.go b/pkg/stanza/entry/field.go index 6e6778d2e695..1342bc334bfb 100644 --- a/pkg/stanza/entry/field.go +++ b/pkg/stanza/entry/field.go @@ -66,7 +66,7 @@ func (f *Field) UnmarshalYAML(unmarshal func(interface{}) error) error { func NewField(s string) (Field, error) { keys, err := fromJSONDot(s) if err != nil { - return Field{}, fmt.Errorf("splitting field: %s", err) + return Field{}, fmt.Errorf("splitting field: %w", err) } switch keys[0] { diff --git a/pkg/stanza/entry/resource_field.go b/pkg/stanza/entry/resource_field.go index 0c1e06cd70e2..b3699c28182b 100644 --- a/pkg/stanza/entry/resource_field.go +++ b/pkg/stanza/entry/resource_field.go @@ -177,7 +177,7 @@ func (f ResourceField) Delete(entry *Entry) (interface{}, bool) { func (f *ResourceField) UnmarshalJSON(raw []byte) error { var value string if err := json.Unmarshal(raw, &value); err != nil { - return fmt.Errorf("the field is not a string: %s", err) + return fmt.Errorf("the field is not a string: %w", err) } keys, err := fromJSONDot(value) @@ -203,7 +203,7 @@ func (f ResourceField) MarshalJSON() ([]byte, error) { func (f *ResourceField) UnmarshalYAML(unmarshal func(interface{}) error) error { var value string if err := unmarshal(&value); err != nil { - return fmt.Errorf("the field is not a string: %s", err) + return fmt.Errorf("the field is not a string: %w", err) } keys, err := fromJSONDot(value) diff --git a/pkg/stanza/errors/error.go b/pkg/stanza/errors/error.go index 8d4cf6f810ad..0e948f64a197 100644 --- a/pkg/stanza/errors/error.go +++ b/pkg/stanza/errors/error.go @@ -16,6 +16,7 @@ package errors // import "github.com/open-telemetry/opentelemetry-collector-cont import ( "encoding/json" + "errors" "fmt" "go.uber.org/zap/zapcore" @@ -59,7 +60,8 @@ func (e AgentError) WithDetails(keyValues ...string) AgentError { // WithDetails will add details to an agent error func WithDetails(err error, keyValues ...string) AgentError { - if agentErr, ok := err.(AgentError); ok { + var agentErr AgentError + if errors.As(err, &agentErr) { if len(keyValues) > 0 { for i := 0; i+1 < len(keyValues); i += 2 { agentErr.Details[keyValues[i]] = keyValues[i+1] @@ -72,7 +74,8 @@ func WithDetails(err error, keyValues ...string) AgentError { // Wrap adds context to the description for richer logs func Wrap(err error, context string) AgentError { - if agentErr, ok := err.(AgentError); ok { + var agentErr AgentError + if errors.As(err, &agentErr) { agentErr.Description = fmt.Sprintf("%s: %s", context, agentErr.Description) return agentErr } diff --git a/pkg/stanza/go.mod b/pkg/stanza/go.mod index 262c627e7085..77bec9fa7786 100644 --- a/pkg/stanza/go.mod +++ b/pkg/stanza/go.mod @@ -11,7 +11,7 @@ require ( github.com/observiq/ctimefmt v1.0.0 github.com/observiq/nanojack v0.0.0-20201106172433-343928847ebc github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5 // indirect golang.org/x/sys v0.0.0-20220412211240-33da011f77ad @@ -27,7 +27,8 @@ require ( github.com/hashicorp/go-multierror v1.1.1 github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.uber.org/atomic v1.9.0 go.uber.org/multierr v1.8.0 ) @@ -64,7 +65,6 @@ require ( go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect - go.uber.org/atomic v1.9.0 // indirect golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect diff --git a/pkg/stanza/go.sum b/pkg/stanza/go.sum index 471ef6334cd8..6066cf2db5df 100644 --- a/pkg/stanza/go.sum +++ b/pkg/stanza/go.sum @@ -390,10 +390,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/pkg/stanza/internal/fileconsumer/benchmark_test.go b/pkg/stanza/internal/fileconsumer/benchmark_test.go new file mode 100644 index 000000000000..d417a6903348 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/benchmark_test.go @@ -0,0 +1,192 @@ +// 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 fileconsumer + +import ( + "os" + "path/filepath" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +type fileInputBenchmark struct { + name string + paths []string + config func() *Config +} + +type benchFile struct { + *os.File + log func(int) +} + +func simpleTextFile(b *testing.B, file *os.File) *benchFile { + line := string(tokenWithLength(49)) + "\n" + return &benchFile{ + File: file, + log: func(_ int) { + _, err := file.WriteString(line) + require.NoError(b, err) + }, + } +} + +func BenchmarkFileInput(b *testing.B) { + cases := []fileInputBenchmark{ + { + name: "Single", + paths: []string{ + "file0.log", + }, + config: func() *Config { + cfg := NewConfig() + cfg.Include = []string{ + "file0.log", + } + return cfg + }, + }, + { + name: "Glob", + paths: []string{ + "file0.log", + "file1.log", + "file2.log", + "file3.log", + }, + config: func() *Config { + cfg := NewConfig() + cfg.Include = []string{"file*.log"} + return cfg + }, + }, + { + name: "MultiGlob", + paths: []string{ + "file0.log", + "file1.log", + "log0.log", + "log1.log", + }, + config: func() *Config { + cfg := NewConfig() + cfg.Include = []string{ + "file*.log", + "log*.log", + } + return cfg + }, + }, + { + name: "MaxConcurrent", + paths: []string{ + "file0.log", + "file1.log", + "file2.log", + "file3.log", + }, + config: func() *Config { + cfg := NewConfig() + cfg.Include = []string{ + "file*.log", + } + cfg.MaxConcurrentFiles = 2 + return cfg + }, + }, + { + name: "FngrPrntLarge", + paths: []string{ + "file0.log", + }, + config: func() *Config { + cfg := NewConfig() + cfg.Include = []string{ + "file*.log", + } + cfg.FingerprintSize = 10 * DefaultFingerprintSize + return cfg + }, + }, + { + name: "FngrPrntSmall", + paths: []string{ + "file0.log", + }, + config: func() *Config { + cfg := NewConfig() + cfg.Include = []string{ + "file*.log", + } + cfg.FingerprintSize = DefaultFingerprintSize / 10 + return cfg + }, + }, + } + + for _, bench := range cases { + b.Run(bench.name, func(b *testing.B) { + rootDir := b.TempDir() + + var files []*benchFile + for _, path := range bench.paths { + file := openFile(b, filepath.Join(rootDir, path)) + files = append(files, simpleTextFile(b, file)) + } + + cfg := bench.config() + for i, inc := range cfg.Include { + cfg.Include[i] = filepath.Join(rootDir, inc) + } + cfg.StartAt = "beginning" + + received := make(chan []byte) + + op, err := cfg.Build(testutil.Logger(b), emitOnChan(received)) + require.NoError(b, err) + + // write half the lines before starting + mid := b.N / 2 + for i := 0; i < mid; i++ { + for _, file := range files { + file.log(i) + } + } + + b.ResetTimer() + err = op.Start(testutil.NewMockPersister("test")) + defer func() { + require.NoError(b, op.Stop()) + }() + require.NoError(b, err) + + // write the remainder of lines while running + go func() { + for i := mid; i < b.N; i++ { + for _, file := range files { + file.log(i) + } + } + }() + + for i := 0; i < b.N*len(files); i++ { + <-received + } + }) + } +} diff --git a/pkg/stanza/internal/fileconsumer/config.go b/pkg/stanza/internal/fileconsumer/config.go new file mode 100644 index 000000000000..93cc1b68c35a --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/config.go @@ -0,0 +1,148 @@ +// 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 fileconsumer // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" + +import ( + "fmt" + "time" + + "github.com/bmatcuk/doublestar/v3" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +const ( + defaultMaxLogSize = 1024 * 1024 + defaultMaxConcurrentFiles = 1024 +) + +// NewConfig creates a new input config with default values +func NewConfig() *Config { + return &Config{ + IncludeFileName: true, + IncludeFilePath: false, + IncludeFileNameResolved: false, + IncludeFilePathResolved: false, + PollInterval: helper.Duration{Duration: 200 * time.Millisecond}, + Splitter: helper.NewSplitterConfig(), + StartAt: "end", + FingerprintSize: DefaultFingerprintSize, + MaxLogSize: defaultMaxLogSize, + MaxConcurrentFiles: defaultMaxConcurrentFiles, + Encoding: helper.NewEncodingConfig(), + } +} + +// Config is the configuration of a file input operator +type Config struct { + Finder `mapstructure:",squash" yaml:",inline"` + IncludeFileName bool `mapstructure:"include_file_name,omitempty" json:"include_file_name,omitempty" yaml:"include_file_name,omitempty"` + IncludeFilePath bool `mapstructure:"include_file_path,omitempty" json:"include_file_path,omitempty" yaml:"include_file_path,omitempty"` + IncludeFileNameResolved bool `mapstructure:"include_file_name_resolved,omitempty" json:"include_file_name_resolved,omitempty" yaml:"include_file_name_resolved,omitempty"` + IncludeFilePathResolved bool `mapstructure:"include_file_path_resolved,omitempty" json:"include_file_path_resolved,omitempty" yaml:"include_file_path_resolved,omitempty"` + PollInterval helper.Duration `mapstructure:"poll_interval,omitempty" json:"poll_interval,omitempty" yaml:"poll_interval,omitempty"` + StartAt string `mapstructure:"start_at,omitempty" json:"start_at,omitempty" yaml:"start_at,omitempty"` + FingerprintSize helper.ByteSize `mapstructure:"fingerprint_size,omitempty" json:"fingerprint_size,omitempty" yaml:"fingerprint_size,omitempty"` + MaxLogSize helper.ByteSize `mapstructure:"max_log_size,omitempty" json:"max_log_size,omitempty" yaml:"max_log_size,omitempty"` + MaxConcurrentFiles int `mapstructure:"max_concurrent_files,omitempty" json:"max_concurrent_files,omitempty" yaml:"max_concurrent_files,omitempty"` + Encoding helper.EncodingConfig `mapstructure:",squash,omitempty" json:",inline,omitempty" yaml:",inline,omitempty"` + Splitter helper.SplitterConfig `mapstructure:",squash,omitempty" json:",inline,omitempty" yaml:",inline,omitempty"` +} + +// Build will build a file input operator from the supplied configuration +func (c Config) Build(logger *zap.SugaredLogger, emit EmitFunc) (*Input, error) { + if emit == nil { + return nil, fmt.Errorf("must provide emit function") + } + + if len(c.Include) == 0 { + return nil, fmt.Errorf("required argument `include` is empty") + } + + // Ensure includes can be parsed as globs + for _, include := range c.Include { + _, err := doublestar.PathMatch(include, "matchstring") + if err != nil { + return nil, fmt.Errorf("parse include glob: %w", err) + } + } + + // Ensure excludes can be parsed as globs + for _, exclude := range c.Exclude { + _, err := doublestar.PathMatch(exclude, "matchstring") + if err != nil { + return nil, fmt.Errorf("parse exclude glob: %w", err) + } + } + + if c.MaxLogSize <= 0 { + return nil, fmt.Errorf("`max_log_size` must be positive") + } + + if c.MaxConcurrentFiles <= 1 { + return nil, fmt.Errorf("`max_concurrent_files` must be greater than 1") + } + + if c.FingerprintSize == 0 { + c.FingerprintSize = DefaultFingerprintSize + } else if c.FingerprintSize < MinFingerprintSize { + return nil, fmt.Errorf("`fingerprint_size` must be at least %d bytes", MinFingerprintSize) + } + + encoding, err := c.Encoding.Build() + if err != nil { + return nil, err + } + + // Ensure that multiline is buildable + _, err = c.Splitter.Build(encoding.Encoding, false, int(c.MaxLogSize)) + if err != nil { + return nil, err + } + + var startAtBeginning bool + switch c.StartAt { + case "beginning": + startAtBeginning = true + case "end": + startAtBeginning = false + default: + return nil, fmt.Errorf("invalid start_at location '%s'", c.StartAt) + } + + return &Input{ + SugaredLogger: logger.With("component", "fileconsumer"), + finder: c.Finder, + PollInterval: c.PollInterval.Raw(), + captureFileName: c.IncludeFileName, + captureFilePath: c.IncludeFilePath, + captureFileNameResolved: c.IncludeFileNameResolved, + captureFilePathResolved: c.IncludeFilePathResolved, + startAtBeginning: startAtBeginning, + Splitter: c.Splitter, + queuedMatches: make([]string, 0), + firstCheck: true, + cancel: func() {}, + knownFiles: make([]*Reader, 0, 10), + roller: newRoller(), + fingerprintSize: int(c.FingerprintSize), + MaxLogSize: int(c.MaxLogSize), + MaxConcurrentFiles: c.MaxConcurrentFiles, + SeenPaths: make(map[string]struct{}, 100), + emit: emit, + Encoding: encoding, // TODO try to remove this + }, nil +} diff --git a/pkg/stanza/internal/fileconsumer/config_test.go b/pkg/stanza/internal/fileconsumer/config_test.go new file mode 100644 index 000000000000..381f7c8a0221 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/config_test.go @@ -0,0 +1,741 @@ +// 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 fileconsumer + +import ( + "context" + "testing" + "time" + + "github.com/mitchellh/mapstructure" + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper/operatortest" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +func TestUnmarshal(t *testing.T) { + cases := []operatortest.ConfigUnmarshalTest{ + { + Name: "default", + ExpectErr: false, + Expect: NewConfig(), + }, + { + + Name: "extra_field", + ExpectErr: false, + Expect: NewConfig(), + }, + { + Name: "include_one", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log") + return cfg + }(), + }, + { + Name: "include_multi", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log", "two.log", "three.log") + return cfg + }(), + }, + { + Name: "include_glob", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "*.log") + return cfg + }(), + }, + { + Name: "include_glob_double_asterisk", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "**.log") + return cfg + }(), + }, + { + Name: "include_glob_double_asterisk_nested", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "directory/**/*.log") + return cfg + }(), + }, + { + Name: "include_glob_double_asterisk_prefix", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "**/directory/**/*.log") + return cfg + }(), + }, + { + Name: "include_inline", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "a.log", "b.log") + return cfg + }(), + }, + { + Name: "include_invalid", + ExpectErr: true, + Expect: nil, + }, + { + Name: "exclude_one", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "*.log") + cfg.Exclude = append(cfg.Exclude, "one.log") + return cfg + }(), + }, + { + Name: "exclude_multi", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "*.log") + cfg.Exclude = append(cfg.Exclude, "one.log", "two.log", "three.log") + return cfg + }(), + }, + { + Name: "exclude_glob", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "*.log") + cfg.Exclude = append(cfg.Exclude, "not*.log") + return cfg + }(), + }, + { + Name: "exclude_glob_double_asterisk", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "*.log") + cfg.Exclude = append(cfg.Exclude, "not**.log") + return cfg + }(), + }, + { + Name: "exclude_glob_double_asterisk_nested", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "*.log") + cfg.Exclude = append(cfg.Exclude, "directory/**/not*.log") + return cfg + }(), + }, + { + Name: "exclude_glob_double_asterisk_prefix", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "*.log") + cfg.Exclude = append(cfg.Exclude, "**/directory/**/not*.log") + return cfg + }(), + }, + { + Name: "exclude_inline", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "*.log") + cfg.Exclude = append(cfg.Exclude, "a.log", "b.log") + return cfg + }(), + }, + { + Name: "exclude_invalid", + ExpectErr: true, + Expect: nil, + }, + { + Name: "poll_interval_no_units", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.PollInterval = helper.NewDuration(time.Second) + return cfg + }(), + }, + { + Name: "poll_interval_1s", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.PollInterval = helper.NewDuration(time.Second) + return cfg + }(), + }, + { + Name: "poll_interval_1ms", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.PollInterval = helper.NewDuration(time.Millisecond) + return cfg + }(), + }, + { + Name: "poll_interval_1000ms", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.PollInterval = helper.NewDuration(time.Second) + return cfg + }(), + }, + { + Name: "fingerprint_size_no_units", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.FingerprintSize = helper.ByteSize(1000) + return cfg + }(), + }, + { + Name: "fingerprint_size_1kb_lower", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.FingerprintSize = helper.ByteSize(1000) + return cfg + }(), + }, + { + Name: "fingerprint_size_1KB", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.FingerprintSize = helper.ByteSize(1000) + return cfg + }(), + }, + { + Name: "fingerprint_size_1kib_lower", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.FingerprintSize = helper.ByteSize(1024) + return cfg + }(), + }, + { + Name: "fingerprint_size_1KiB", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.FingerprintSize = helper.ByteSize(1024) + return cfg + }(), + }, + { + Name: "fingerprint_size_float", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.FingerprintSize = helper.ByteSize(1100) + return cfg + }(), + }, + { + Name: "include_file_name_lower", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log") + cfg.IncludeFileName = true + return cfg + }(), + }, + { + Name: "include_file_name_upper", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log") + cfg.IncludeFileName = true + return cfg + }(), + }, + { + Name: "include_file_name_on", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log") + cfg.IncludeFileName = true + return cfg + }(), + }, + { + Name: "include_file_name_yes", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log") + cfg.IncludeFileName = true + return cfg + }(), + }, + { + Name: "include_file_path_lower", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log") + cfg.IncludeFilePath = true + return cfg + }(), + }, + { + Name: "include_file_path_upper", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log") + cfg.IncludeFilePath = true + return cfg + }(), + }, + { + Name: "include_file_path_on", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log") + cfg.IncludeFilePath = true + return cfg + }(), + }, + { + Name: "include_file_path_yes", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log") + cfg.IncludeFilePath = true + return cfg + }(), + }, + { + Name: "include_file_path_off", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log") + cfg.IncludeFilePath = false + return cfg + }(), + }, + { + Name: "include_file_path_no", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Include = append(cfg.Include, "one.log") + cfg.IncludeFilePath = false + return cfg + }(), + }, + { + Name: "include_file_path_nonbool", + ExpectErr: true, + Expect: nil, + }, + { + Name: "multiline_line_start_string", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + newSplit := helper.NewSplitterConfig() + newSplit.Multiline.LineStartPattern = "Start" + cfg.Splitter = newSplit + return cfg + }(), + }, + { + Name: "multiline_line_start_special", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + newSplit := helper.NewSplitterConfig() + newSplit.Multiline.LineStartPattern = "%" + cfg.Splitter = newSplit + return cfg + }(), + }, + { + Name: "multiline_line_end_string", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + newSplit := helper.NewSplitterConfig() + newSplit.Multiline.LineEndPattern = "Start" + cfg.Splitter = newSplit + return cfg + }(), + }, + { + Name: "multiline_line_end_special", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + newSplit := helper.NewSplitterConfig() + newSplit.Multiline.LineEndPattern = "%" + cfg.Splitter = newSplit + return cfg + }(), + }, + { + Name: "multiline_random", + ExpectErr: true, + Expect: nil, + }, + { + Name: "start_at_string", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.StartAt = "beginning" + return cfg + }(), + }, + { + Name: "max_concurrent_large", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.MaxConcurrentFiles = 9223372036854775807 + return cfg + }(), + }, + { + Name: "max_log_size_mib_lower", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.MaxLogSize = helper.ByteSize(1048576) + return cfg + }(), + }, + { + Name: "max_log_size_mib_upper", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.MaxLogSize = helper.ByteSize(1048576) + return cfg + }(), + }, + { + Name: "max_log_size_mb_upper", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.MaxLogSize = helper.ByteSize(1048576) + return cfg + }(), + }, + { + Name: "max_log_size_mb_lower", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.MaxLogSize = helper.ByteSize(1048576) + return cfg + }(), + }, + { + Name: "encoding_lower", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Encoding = helper.EncodingConfig{Encoding: "utf-16le"} + return cfg + }(), + }, + { + Name: "encoding_upper", + ExpectErr: false, + Expect: func() *Config { + cfg := NewConfig() + cfg.Encoding = helper.EncodingConfig{Encoding: "UTF-16lE"} + return cfg + }(), + }, + } + + for _, tc := range cases { + t.Run(tc.Name, func(t *testing.T) { + tc.Run(t, NewConfig()) + }) + } +} + +func TestBuild(t *testing.T) { + t.Parallel() + + basicConfig := func() *Config { + cfg := NewConfig() + cfg.Include = []string{"/var/log/testpath.*"} + cfg.Exclude = []string{"/var/log/testpath.ex*"} + cfg.PollInterval = helper.Duration{Duration: 10 * time.Millisecond} + return cfg + } + + cases := []struct { + name string + modifyBaseConfig func(*Config) + errorRequirement require.ErrorAssertionFunc + validate func(*testing.T, *Input) + }{ + { + "Basic", + func(f *Config) {}, + require.NoError, + func(t *testing.T, f *Input) { + require.Equal(t, f.finder.Include, []string{"/var/log/testpath.*"}) + require.Equal(t, f.PollInterval, 10*time.Millisecond) + }, + }, + { + "BadIncludeGlob", + func(f *Config) { + f.Include = []string{"["} + }, + require.Error, + nil, + }, + { + "BadExcludeGlob", + func(f *Config) { + f.Include = []string{"["} + }, + require.Error, + nil, + }, + { + "MultilineConfiguredStartAndEndPatterns", + func(f *Config) { + f.Splitter = helper.NewSplitterConfig() + f.Splitter.Multiline = helper.MultilineConfig{ + LineEndPattern: "Exists", + LineStartPattern: "Exists", + } + }, + require.Error, + nil, + }, + { + "MultilineConfiguredStartPattern", + func(f *Config) { + f.Splitter = helper.NewSplitterConfig() + f.Splitter.Multiline = helper.MultilineConfig{ + LineStartPattern: "START.*", + } + }, + require.NoError, + func(t *testing.T, f *Input) {}, + }, + { + "MultilineConfiguredEndPattern", + func(f *Config) { + f.Splitter = helper.NewSplitterConfig() + f.Splitter.Multiline = helper.MultilineConfig{ + LineEndPattern: "END.*", + } + }, + require.NoError, + func(t *testing.T, f *Input) {}, + }, + { + "InvalidEncoding", + func(f *Config) { + f.Encoding = helper.EncodingConfig{Encoding: "UTF-3233"} + }, + require.Error, + nil, + }, + { + "LineStartAndEnd", + func(f *Config) { + f.Splitter = helper.NewSplitterConfig() + f.Splitter.Multiline = helper.MultilineConfig{ + LineStartPattern: ".*", + LineEndPattern: ".*", + } + }, + require.Error, + nil, + }, + { + "NoLineStartOrEnd", + func(f *Config) { + f.Splitter = helper.NewSplitterConfig() + f.Splitter.Multiline = helper.MultilineConfig{} + }, + require.NoError, + func(t *testing.T, f *Input) {}, + }, + { + "InvalidLineStartRegex", + func(f *Config) { + f.Splitter = helper.NewSplitterConfig() + f.Splitter.Multiline = helper.MultilineConfig{ + LineStartPattern: "(", + } + }, + require.Error, + nil, + }, + { + "InvalidLineEndRegex", + func(f *Config) { + f.Splitter = helper.NewSplitterConfig() + f.Splitter.Multiline = helper.MultilineConfig{ + LineEndPattern: "(", + } + }, + require.Error, + nil, + }, + } + + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + tc := tc + t.Parallel() + cfg := basicConfig() + tc.modifyBaseConfig(cfg) + + nopEmit := func(_ context.Context, _ *FileAttributes, _ []byte) {} + + input, err := cfg.Build(testutil.Logger(t), nopEmit) + tc.errorRequirement(t, err) + if err != nil { + return + } + + tc.validate(t, input) + }) + } +} + +func NewTestConfig() *Config { + cfg := NewConfig() + cfg.Include = []string{"i1", "i2"} + cfg.Exclude = []string{"e1", "e2"} + cfg.Splitter = helper.NewSplitterConfig() + cfg.Splitter.Multiline = helper.MultilineConfig{ + LineStartPattern: "start", + LineEndPattern: "end", + } + cfg.FingerprintSize = 1024 + cfg.Encoding = helper.EncodingConfig{Encoding: "utf16"} + return cfg +} + +func TestMapStructureDecodeConfigWithHook(t *testing.T) { + expect := NewTestConfig() + input := map[string]interface{}{ + // Config + "id": "config_test", + "type": "file_input", + "attributes": map[string]interface{}{}, + "resource": map[string]interface{}{}, + "include": expect.Include, + "exclude": expect.Exclude, + "poll_interval": 0.2, + "multiline": map[string]interface{}{ + "line_start_pattern": expect.Splitter.Multiline.LineStartPattern, + "line_end_pattern": expect.Splitter.Multiline.LineEndPattern, + }, + "force_flush_period": 0.5, + "include_file_name": true, + "include_file_path": false, + "start_at": "end", + "fingerprint_size": "1024", + "max_log_size": "1mib", + "max_concurrent_files": 1024, + "encoding": "utf16", + } + + var actual Config + dc := &mapstructure.DecoderConfig{Result: &actual, DecodeHook: helper.JSONUnmarshalerHook()} + ms, err := mapstructure.NewDecoder(dc) + require.NoError(t, err) + err = ms.Decode(input) + require.NoError(t, err) + require.Equal(t, expect, &actual) +} + +func TestMapStructureDecodeConfig(t *testing.T) { + expect := NewTestConfig() + input := map[string]interface{}{ + // Config + "id": "config_test", + "type": "file_input", + "attributes": map[string]interface{}{}, + "resource": map[string]interface{}{}, + "include": expect.Include, + "exclude": expect.Exclude, + "poll_interval": map[string]interface{}{ + "Duration": 200 * 1000 * 1000, + }, + "multiline": map[string]interface{}{ + "line_start_pattern": expect.Splitter.Multiline.LineStartPattern, + "line_end_pattern": expect.Splitter.Multiline.LineEndPattern, + }, + "include_file_name": true, + "include_file_path": false, + "start_at": "end", + "fingerprint_size": 1024, + "max_log_size": 1024 * 1024, + "max_concurrent_files": 1024, + "encoding": "utf16", + "force_flush_period": map[string]interface{}{ + "Duration": 500 * 1000 * 1000, + }, + } + + var actual Config + err := mapstructure.Decode(input, &actual) + require.NoError(t, err) + require.Equal(t, expect, &actual) +} diff --git a/pkg/stanza/internal/fileconsumer/design.md b/pkg/stanza/internal/fileconsumer/design.md new file mode 100644 index 000000000000..cb1678cc6996 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/design.md @@ -0,0 +1,181 @@ +# File Matching + +The operator searches the file system for files that meet the following requirements: +1. The file's path matches one or more patterns specified in the `include` setting. +2. The file's path does not match any pattern specified in the `exclude` setting. + +The set of files that satisfy these requirements are known in this document as "matched files". +The effective search space (`include - exclude`) is referred to colloquially as the operator's "matching pattern". + +# Fingerprints + +Files are identified and tracked using fingerprints. A fingerprint is the first `N` bytes of the file, with the default for `N` being `1000`. + +### Fingerprint Growth + +When a file is smaller than `N` bytes, the fingerprint is the entire contents of the file. A fingerprint that is less than `N` bytes will be compared to other fingerprints using a prefix check. As the file grows, its fingerprint will be updated, until it reaches the full size of `N`. + +### Deduplication of Files + +Multiple files with the same fingerprint are handled as if they are the same file. + +Most commonly, this circumstance is observed during file rotation that depends on a copy/truncate strategy. After copying the file, but before truncating the original, two files with the same content briefly exist. If the `file_input` operator happens to observe both files at the same time, it will detect a duplicate fingerprint and ingest only one of the files. + +If logs are replicated to multiple files, or if log files are copied manually, it is not understood to be of any significant value to ingest the duplicates. As a result, fingerprints are not designed to differentiate between these files, and double ingestion of the same content is not supported automatically. + +In some rare circumstances, a logger may print a very verbose preamble to each log file. When this occurs, fingerprinting may fail to differentiate files from one another. This can be overcome by customizing the size of the fingerprint using the `fingerprint_size` setting. + +# Readers + +Readers are a convenience struct, which exist for the purpose of managing files and their associated metadata. + +### Contents + +A Reader contains the following: +- File handle (may be open or closed) +- File fingerprint +- File offset (aka checkpoint) +- File path +- Decoder (dedicated instance to avoid concurrency issues) + +### Functionality + +As implied by the name, Readers are responsible for consuming data as it is written to a file. + +Before a Reader begins consuming, it will seek the file's last known offset. If no offset is known for the file, then the Reader will seek either the beginning or end of the file, according to the `start_at` setting. It will then begin reading from there. + +While a file is shorter than the length of a fingerprint, its Reader will continuously append to the fingerprint, as it consumes newly written data. + +A Reader consumes a file using a `bufio.Scanner`, with the Scanner's buffer size defined by the `max_log_size` setting, and the Scanner's split func defined by the `multiline` setting. + +As each log is read from the file, it is decoded according to the `encoding` function, and then emitted from the operator. + +The Reader's offset is updated accordingly whenever a log is emitted. + + +### Persistence + +Readers are always instantiated with an open file handle. Eventually, the file handle is closed, but the Reader is not immediately discarded. Rather, it is maintained for a fixed number of "poll cycles" (see Polling section below) as a reference to the file's metadata, which may be useful for detecting files that have been moved or copied, and for recalling metadata such as the file's previous path. + +Readers are maintained for a fixed period of time, and then discarded. + +When the `file_input` operator makes use of a persistence mechanism to save and recall its state, it is simply Setting and Getting a slice of Readers. These Readers contain all the information necessary to pick up exactly where the operator left off. + + +# Polling + +The file system is polled on a regular interval, defined by the `poll_interval` setting. + +Each poll cycle runs through a series of steps which are presented below. + +### Detailed Poll Cycle + +1. Dequeuing + 1. If any matches are queued from the previous cycle, an appropriate number are dequeued, and processed the same as would a newly matched set of files. +2. Aging + 1. If no queued files were left over from the previous cycle, then all previously matched files have been consumed, and we are ready to query the file system again. Prior to doing so, we will increment the "generation" of all historical Readers. Eventually, these Readers will be discarded based on their age. Until that point, they may be useful references. +3. Matching + 1. The file system is searched for files with a path that matches the `include` setting. + 2. Files that match the `exclude` setting are discarded. + 3. As a special case, on the first poll cycle, a warning is printed if no files are matched. Execution continues regardless. +4. Queueing + 1. If the number of matched files is less than or equal to the maximum degree of concurrency, as defined by the `max_concurrent_files` setting, then no queueing occurs. + 2. Else, queueing occurs, which means the following: + - Matched files are split into two sets, such that the first is small enough to respect `max_concurrent_files`, and the second contains the remaining files (called the queue). + - The current poll interval will begin processing the first set of files, just as if they were the only ones found during the matching phase. + - Subsequent poll cycles will pull matches off of the queue, until the queue is empty. + - The `max_concurrent_files` setting is respected at all times. +5. Opening + 1. Each of the matched files is opened. Note: + - A small amount of time has passed since the file was matched. + - It is possible that it has been moved or deleted by this point. + - Only a minimum set of operations should occur between file matching and opening. + - If an error occurs while opening, it is logged. +6. Fingerprinting + 1. The first `N` bytes of each file are read. (See fingerprinting section above.) +7. Exclusion + 1. Empty files are closed immediately and discarded. (There is nothing to read.) + 2. Fingerprints found in this batch are cross referenced against each other to detect duplicates. Duplicate files are closed immediately and discarded. + - In the vast majority of cases, this occurs during file rotation that uses the copy/truncate method. (See fingerprinting section above.) +8. Reader Creation + 1. Each file handle is wrapped into a `Reader` along with some metadata. (See Reader section above) + - During the creation of a `Reader`, the file's fingerprint is cross referenced with previously known fingerprints. + - If a file's fingerprint matches one that has recently been seen, then metadata is copied over from the previous iteration of the Reader. Most importantly, the offset is accurately maintained in this way. + - If a file's fingerprint does not match any recently seen files, then its offset is initialized according to the `start_at` setting. +9. Detection of Lost Files + 1. Fingerprints are used to cross reference the matched files from this poll cycle against the matched file from the previous poll cycle. Files that were matched in the previous cycle but were not matched in this cycle are referred to as "lost files". + 2. File become "lost" for several reasons: + - The file may have been deleted, typically due to rotation limits or ttl-based pruning. + - The file may have been rotated to another location. + - If the file was moved, the open file handle from the previous poll cycle may be useful. +10. Consumption + 1. Lost files are consumed. In some cases, such as deletion, this operation will fail. However, if a file was moved, we may be able to consume the remainder of its content. + - We do not expect to match this file again, so the best we can do is finish consuming their current contents. + - We can reasonably expect in most cases that these files are no longer being written to. + 2. Matched files (from this poll cycle) are consumed. + - These file handles will be left open until the next poll cycle, when they will be used to detect and potentially consume lost files. + - Typically, we can expect to find most of these files again. However, these files are consumed greedily in case we do not see them again. + 3. All open files are consumed concurrently. This includes both the lost files from the previous cycle, and the matched files from this cycle. +11. Closing + 1. All files from the previous poll cycle are closed. +12. Archiving + 1. Readers created in the current poll cycle are added to the historical record. + 2. The same Readers are also retained as a separate slice, for easy access in the next poll cycle. +13. Pruning + 1. The historical record is purged of Readers that have existed for 3 generations. + - This number is somewhat arbitrary, and should probably be made configurable. However, its exact purpose is quite obscure. +14. Persistence + 1. The historical record of readers is synced to whatever persistence mechanism was provided to the operator. +15. End Poll Cycle + 1. At this point, the operator sits idle until the poll timer fires again. + + + +# Additional Details + +### Startup Logic + +Whenever the operator starts, it: +- Requests the historical record of Readers, as described in steps 12-14 of the poll cycle. +- Starts the polling timer. + +### Shutdown Logic + +When the operator shuts down, the following occurs: +- If a poll cycle is not currently underway, the operator simply closes any open files. +- Otherwise, the current poll cycle is signaled to stop immediately, which in turn signals all Readers to stop immediately. + - If a Reader is idle or in between log entries, it will return immediately. Otherwise it will return after consuming one final log entry. + - Once all Readers have stopped, the remainder of the poll cycle completes as usual, which includes the steps labeled `Closing`, `Archiving`, `Pruning`, and `Persistence`. + +The net effect of the shut down routine is that all files are checkpointed in a normal manner (i.e. not in the middle of a log entry), and all checkpoints are persisted. + + +# Known Limitations + +### Potential data loss when maximum concurrency must be enforced + +The operator may lose a small percentage of logs, if both of the following conditions are true: +1. The number of files being matched exceeds the maximum degree of concurrency allowed by the `max_concurrent_files` setting. +2. Files are being "lost". That is, file rotation is moving files out of the operator's matching pattern, such that subsequent polling cycles will not find these files. + +When both of these conditions occur, it is impossible for the operator to both: +1. Respect the specified concurrency limitation. +2. Guarantee that if a file is rotated out of the matching pattern, it may still be consumed before being closed. + +When this scenario occurs, a design tradeoff must be made. The choice is between: +1. Ensure that `max_concurrent_files` is always respected. +2. Risk losing a small percentage of log entries. + +The current design chooses to guarantee the maximum degree of concurrency because failure to do so risks harming the operator's host system. While the loss of logs is not ideal, it is less likely to harm the operator's host system, and is therefore considered the more acceptable of the two options. + +### Potential data loss when file rotation via copy/truncate rotates backup files out of operator's matching pattern + +The operator may lose a small percentage of logs, if both of the following conditions are true: +1. Files are being rotated using the copy/truncate strategy. +2. Files are being "lost". That is, file rotation is moving files out of the operator's matching pattern, such that subsequent polling cycles will not find these files. + +When both of these conditions occur, it is possible that a file is written to (then copied elsewhere) and then truncated before the operator has a chance to consume the new data. + +### Potential failure to consume files when file rotation via move/create is used on Windows + +On Windows, rotation of files using the Move/Create strategy may cause errors and loss of data, because Golang does not currently support the Windows mechanism for `FILE_SHARE_DELETE`. \ No newline at end of file diff --git a/pkg/stanza/internal/fileconsumer/file.go b/pkg/stanza/internal/fileconsumer/file.go new file mode 100644 index 000000000000..32c804d1cb43 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/file.go @@ -0,0 +1,367 @@ +// 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 fileconsumer // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "os" + "sync" + "time" + + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" +) + +type EmitFunc func(ctx context.Context, attrs *FileAttributes, token []byte) + +// TODO rename this struct +type Input struct { + *zap.SugaredLogger + finder Finder + captureFileName bool + captureFilePath bool + captureFileNameResolved bool + captureFilePathResolved bool + PollInterval time.Duration + Splitter helper.SplitterConfig + MaxLogSize int + MaxConcurrentFiles int + SeenPaths map[string]struct{} + + persister operator.Persister + + knownFiles []*Reader + queuedMatches []string + maxBatchFiles int + roller roller + + startAtBeginning bool + + fingerprintSize int + + Encoding helper.Encoding // TODO can this be skipped and handled by caller? + + firstCheck bool + wg sync.WaitGroup + cancel context.CancelFunc + + emit EmitFunc +} + +func (f *Input) Start(persister operator.Persister) error { + ctx, cancel := context.WithCancel(context.Background()) + f.cancel = cancel + f.firstCheck = true + + f.persister = persister + + // Load offsets from disk + if err := f.loadLastPollFiles(ctx); err != nil { + return fmt.Errorf("read known files from database: %w", err) + } + + // Start polling goroutine + f.startPoller(ctx) + + return nil +} + +// Stop will stop the file monitoring process +func (f *Input) Stop() error { + f.cancel() + f.wg.Wait() + f.roller.cleanup() + for _, reader := range f.knownFiles { + reader.Close() + } + f.knownFiles = nil + f.cancel = nil + return nil +} + +// startPoller kicks off a goroutine that will poll the filesystem periodically, +// checking if there are new files or new logs in the watched files +func (f *Input) startPoller(ctx context.Context) { + f.wg.Add(1) + go func() { + defer f.wg.Done() + globTicker := time.NewTicker(f.PollInterval) + defer globTicker.Stop() + + for { + select { + case <-ctx.Done(): + return + case <-globTicker.C: + } + + f.poll(ctx) + } + }() +} + +// poll checks all the watched paths for new entries +func (f *Input) poll(ctx context.Context) { + f.maxBatchFiles = f.MaxConcurrentFiles / 2 + var matches []string + if len(f.queuedMatches) > f.maxBatchFiles { + matches, f.queuedMatches = f.queuedMatches[:f.maxBatchFiles], f.queuedMatches[f.maxBatchFiles:] + } else { + if len(f.queuedMatches) > 0 { + matches, f.queuedMatches = f.queuedMatches, make([]string, 0) + } else { + // Increment the generation on all known readers + // This is done here because the next generation is about to start + for i := 0; i < len(f.knownFiles); i++ { + f.knownFiles[i].generation++ + } + + // Get the list of paths on disk + matches = f.finder.FindFiles() + if f.firstCheck && len(matches) == 0 { + f.Warnw("no files match the configured include patterns", + "include", f.finder.Include, + "exclude", f.finder.Exclude) + } else if len(matches) > f.maxBatchFiles { + matches, f.queuedMatches = matches[:f.maxBatchFiles], matches[f.maxBatchFiles:] + } + } + } + + readers := f.makeReaders(matches) + f.firstCheck = false + + var wg sync.WaitGroup + for _, reader := range readers { + wg.Add(1) + go func(r *Reader) { + defer wg.Done() + r.ReadToEnd(ctx) + }(reader) + } + wg.Wait() + + f.roller.roll(ctx, readers) + f.saveCurrent(readers) + f.syncLastPollFiles(ctx) +} + +// makeReaders takes a list of paths, then creates readers from each of those paths, +// discarding any that have a duplicate fingerprint to other files that have already +// been read this polling interval +func (f *Input) makeReaders(filesPaths []string) []*Reader { + // Open the files first to minimize the time between listing and opening + files := make([]*os.File, 0, len(filesPaths)) + for _, path := range filesPaths { + if _, ok := f.SeenPaths[path]; !ok { + if f.startAtBeginning { + f.Infow("Started watching file", "path", path) + } else { + f.Infow("Started watching file from end. To read preexisting logs, configure the argument 'start_at' to 'beginning'", "path", path) + } + f.SeenPaths[path] = struct{}{} + } + file, err := os.Open(path) // #nosec - operator must read in files defined by user + if err != nil { + f.Debugf("Failed to open file", zap.Error(err)) + continue + } + files = append(files, file) + } + + // Get fingerprints for each file + fps := make([]*Fingerprint, 0, len(files)) + for _, file := range files { + fp, err := f.NewFingerprint(file) + if err != nil { + f.Errorw("Failed creating fingerprint", zap.Error(err)) + continue + } + fps = append(fps, fp) + } + + // Exclude any empty fingerprints or duplicate fingerprints to avoid doubling up on copy-truncate files +OUTER: + for i := 0; i < len(fps); i++ { + fp := fps[i] + if len(fp.FirstBytes) == 0 { + if err := files[i].Close(); err != nil { + f.Errorf("problem closing file", "file", files[i].Name()) + } + // Empty file, don't read it until we can compare its fingerprint + fps = append(fps[:i], fps[i+1:]...) + files = append(files[:i], files[i+1:]...) + i-- + continue + } + for j := i + 1; j < len(fps); j++ { + fp2 := fps[j] + if fp.StartsWith(fp2) || fp2.StartsWith(fp) { + // Exclude + if err := files[i].Close(); err != nil { + f.Errorf("problem closing file", "file", files[i].Name()) + } + fps = append(fps[:i], fps[i+1:]...) + files = append(files[:i], files[i+1:]...) + i-- + continue OUTER + } + } + } + + readers := make([]*Reader, 0, len(fps)) + for i := 0; i < len(fps); i++ { + reader, err := f.newReader(files[i], fps[i], f.firstCheck) + if err != nil { + f.Errorw("Failed to create reader", zap.Error(err)) + continue + } + readers = append(readers, reader) + } + + return readers +} + +// saveCurrent adds the readers from this polling interval to this list of +// known files, then increments the generation of all tracked old readers +// before clearing out readers that have existed for 3 generations. +func (f *Input) saveCurrent(readers []*Reader) { + // Add readers from the current, completed poll interval to the list of known files + f.knownFiles = append(f.knownFiles, readers...) + + // Clear out old readers. They are sorted such that they are oldest first, + // so we can just find the first reader whose generation is less than our + // max, and keep every reader after that + for i := 0; i < len(f.knownFiles); i++ { + reader := f.knownFiles[i] + if reader.generation <= 3 { + f.knownFiles = f.knownFiles[i:] + break + } + } +} + +func (f *Input) newReader(file *os.File, fp *Fingerprint, firstCheck bool) (*Reader, error) { + // Check if the new path has the same fingerprint as an old path + if oldReader, ok := f.findFingerprintMatch(fp); ok { + newReader, err := oldReader.Copy(file) + if err != nil { + return nil, err + } + newReader.fileAttributes = f.resolveFileAttributes(file.Name()) + return newReader, nil + } + + // If we don't match any previously known files, create a new reader from scratch + splitter, err := f.getMultiline() + if err != nil { + return nil, err + } + newReader, err := f.NewReader(file.Name(), file, fp, splitter, f.emit) + if err != nil { + return nil, err + } + startAtBeginning := !firstCheck || f.startAtBeginning + if err := newReader.InitializeOffset(startAtBeginning); err != nil { + return nil, fmt.Errorf("initialize offset: %w", err) + } + return newReader, nil +} + +func (f *Input) findFingerprintMatch(fp *Fingerprint) (*Reader, bool) { + // Iterate backwards to match newest first + for i := len(f.knownFiles) - 1; i >= 0; i-- { + oldReader := f.knownFiles[i] + if fp.StartsWith(oldReader.Fingerprint) { + return oldReader, true + } + } + return nil, false +} + +const knownFilesKey = "knownFiles" + +// syncLastPollFiles syncs the most recent set of files to the database +func (f *Input) syncLastPollFiles(ctx context.Context) { + var buf bytes.Buffer + enc := json.NewEncoder(&buf) + + // Encode the number of known files + if err := enc.Encode(len(f.knownFiles)); err != nil { + f.Errorw("Failed to encode known files", zap.Error(err)) + return + } + + // Encode each known file + for _, fileReader := range f.knownFiles { + if err := enc.Encode(fileReader); err != nil { + f.Errorw("Failed to encode known files", zap.Error(err)) + } + } + + if err := f.persister.Set(ctx, knownFilesKey, buf.Bytes()); err != nil { + f.Errorw("Failed to sync to database", zap.Error(err)) + } +} + +// syncLastPollFiles loads the most recent set of files to the database +func (f *Input) loadLastPollFiles(ctx context.Context) error { + encoded, err := f.persister.Get(ctx, knownFilesKey) + if err != nil { + return err + } + + if encoded == nil { + f.knownFiles = make([]*Reader, 0, 10) + return nil + } + + dec := json.NewDecoder(bytes.NewReader(encoded)) + + // Decode the number of entries + var knownFileCount int + if err := dec.Decode(&knownFileCount); err != nil { + return fmt.Errorf("decoding file count: %w", err) + } + + // Decode each of the known files + f.knownFiles = make([]*Reader, 0, knownFileCount) + for i := 0; i < knownFileCount; i++ { + splitter, err := f.getMultiline() + if err != nil { + return err + } + newReader, err := f.NewReader("", nil, nil, splitter, f.emit) + if err != nil { + return err + } + if err = dec.Decode(newReader); err != nil { + return err + } + f.knownFiles = append(f.knownFiles, newReader) + } + + return nil +} + +// getMultiline returns helper.Splitter structure and error eventually +func (f *Input) getMultiline() (*helper.Splitter, error) { + return f.Splitter.Build(f.Encoding.Encoding, false, f.MaxLogSize) +} diff --git a/pkg/stanza/internal/fileconsumer/file_test.go b/pkg/stanza/internal/fileconsumer/file_test.go new file mode 100644 index 000000000000..a03ec6632e57 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/file_test.go @@ -0,0 +1,1094 @@ +// 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 fileconsumer + +import ( + "context" + "fmt" + "io/ioutil" + "os" + "path/filepath" + "strconv" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +func TestCleanStop(t *testing.T) { + t.Parallel() + t.Skip(`Skipping due to goroutine leak in opencensus. +See this issue for details: https://github.com/census-instrumentation/opencensus-go/issues/1191#issuecomment-610440163`) + // defer goleak.VerifyNone(t) + + operator, _, tempDir := newTestScenario(t, nil) + _ = openTemp(t, tempDir) + err := operator.Start(testutil.NewMockPersister("test")) + require.NoError(t, err) + defer func() { + require.NoError(t, operator.Stop()) + }() +} + +// AddFields tests that the `log.file.name` and `log.file.path` fields are included +// when IncludeFileName and IncludeFilePath are set to true +func TestAddFileFields(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, func(cfg *Config) { + cfg.IncludeFileName = true + cfg.IncludeFilePath = true + }) + + // Create a file, then start + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog\n") + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + emitCall := waitForEmit(t, emitCalls) + require.Equal(t, filepath.Base(temp.Name()), emitCall.attrs.Name) + require.Equal(t, temp.Name(), emitCall.attrs.Path) +} + +// AddFileResolvedFields tests that the `log.file.name_resolved` and `log.file.path_resolved` fields are included +// when IncludeFileNameResolved and IncludeFilePathResolved are set to true +func TestAddFileResolvedFields(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, func(cfg *Config) { + cfg.IncludeFileName = true + cfg.IncludeFilePath = true + cfg.IncludeFileNameResolved = true + cfg.IncludeFilePathResolved = true + }) + + // Create temp dir with log file + dir := t.TempDir() + + file, err := ioutil.TempFile(dir, "") + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, file.Close()) + }) + + // Create symbolic link in monitored directory + symLinkPath := filepath.Join(tempDir, "symlink") + err = os.Symlink(file.Name(), symLinkPath) + require.NoError(t, err) + + // Populate data + writeString(t, file, "testlog\n") + + // Resolve path + real, err := filepath.EvalSymlinks(file.Name()) + require.NoError(t, err) + resolved, err := filepath.Abs(real) + require.NoError(t, err) + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + emitCall := waitForEmit(t, emitCalls) + require.Equal(t, filepath.Base(symLinkPath), emitCall.attrs.Name) + require.Equal(t, symLinkPath, emitCall.attrs.Path) + require.Equal(t, filepath.Base(resolved), emitCall.attrs.ResolvedName) + require.Equal(t, resolved, emitCall.attrs.ResolvedPath) +} + +// AddFileResolvedFields tests that the `log.file.name_resolved` and `log.file.path_resolved` fields are included +// when IncludeFileNameResolved and IncludeFilePathResolved are set to true and underlaying symlink change +// Scenario: +// monitored file (symlink) -> middleSymlink -> file_1 +// monitored file (symlink) -> middleSymlink -> file_2 +func TestAddFileResolvedFieldsWithChangeOfSymlinkTarget(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, func(cfg *Config) { + cfg.IncludeFileName = true + cfg.IncludeFilePath = true + cfg.IncludeFileNameResolved = true + cfg.IncludeFilePathResolved = true + }) + + // Create temp dir with log file + dir := t.TempDir() + + file1, err := ioutil.TempFile(dir, "") + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, file1.Close()) + }) + + file2, err := ioutil.TempFile(dir, "") + require.NoError(t, err) + t.Cleanup(func() { + require.NoError(t, file2.Close()) + }) + + // Resolve paths + real1, err := filepath.EvalSymlinks(file1.Name()) + require.NoError(t, err) + resolved1, err := filepath.Abs(real1) + require.NoError(t, err) + + real2, err := filepath.EvalSymlinks(file2.Name()) + require.NoError(t, err) + resolved2, err := filepath.Abs(real2) + require.NoError(t, err) + + // Create symbolic link in monitored directory + // symLinkPath(target of file input) -> middleSymLinkPath -> file1 + middleSymLinkPath := filepath.Join(dir, "symlink") + symLinkPath := filepath.Join(tempDir, "symlink") + err = os.Symlink(file1.Name(), middleSymLinkPath) + require.NoError(t, err) + err = os.Symlink(middleSymLinkPath, symLinkPath) + require.NoError(t, err) + + // Populate data + writeString(t, file1, "testlog\n") + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + emitCall := waitForEmit(t, emitCalls) + require.Equal(t, filepath.Base(symLinkPath), emitCall.attrs.Name) + require.Equal(t, symLinkPath, emitCall.attrs.Path) + require.Equal(t, filepath.Base(resolved1), emitCall.attrs.ResolvedName) + require.Equal(t, resolved1, emitCall.attrs.ResolvedPath) + + // Change middleSymLink to point to file2 + err = os.Remove(middleSymLinkPath) + require.NoError(t, err) + err = os.Symlink(file2.Name(), middleSymLinkPath) + require.NoError(t, err) + + // Populate data (different content due to fingerprint) + writeString(t, file2, "testlog2\n") + + emitCall = waitForEmit(t, emitCalls) + require.Equal(t, filepath.Base(symLinkPath), emitCall.attrs.Name) + require.Equal(t, symLinkPath, emitCall.attrs.Path) + require.Equal(t, filepath.Base(resolved2), emitCall.attrs.ResolvedName) + require.Equal(t, resolved2, emitCall.attrs.ResolvedPath) +} + +// ReadExistingLogs tests that, when starting from beginning, we +// read all the lines that are already there +func TestReadExistingLogs(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + + // Create a file, then start + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1\ntestlog2\n") + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForToken(t, emitCalls, []byte("testlog1")) + waitForToken(t, emitCalls, []byte("testlog2")) +} + +// TestReadUsingNopEncoding tests when nop encoding is set, that the splitfunction returns all bytes unchanged. +func TestReadUsingNopEncoding(t *testing.T) { + tcs := []struct { + testName string + input []byte + test func(*testing.T, chan *emitParams) + }{ + { + "simple", + []byte("testlog1"), + func(t *testing.T, c chan *emitParams) { + waitForToken(t, c, []byte("testlog1")) + }, + }, + { + "longer than maxlogsize", + []byte("testlog1testlog2testlog3"), + func(t *testing.T, c chan *emitParams) { + waitForToken(t, c, []byte("testlog1")) + waitForToken(t, c, []byte("testlog2")) + waitForToken(t, c, []byte("testlog3")) + }, + }, + { + "doesn't hit max log size before eof", + []byte("testlog1testlog2test"), + func(t *testing.T, c chan *emitParams) { + waitForToken(t, c, []byte("testlog1")) + waitForToken(t, c, []byte("testlog2")) + waitForToken(t, c, []byte("test")) + }, + }, + { + "special characters", + []byte("testlog1\n\ttestlog2\n\t"), + func(t *testing.T, c chan *emitParams) { + waitForToken(t, c, []byte("testlog1")) + waitForToken(t, c, []byte("\n\ttestlo")) + waitForToken(t, c, []byte("g2\n\t")) + }, + }, + } + + t.Parallel() + + for _, tc := range tcs { + t.Run(tc.testName, func(t *testing.T) { + operator, emitCalls, tempDir := newTestScenario(t, func(cfg *Config) { + cfg.MaxLogSize = 8 + cfg.Encoding.Encoding = "nop" + }) + // Create a file, then start + temp := openTemp(t, tempDir) + bytesWritten, err := temp.Write(tc.input) + require.Greater(t, bytesWritten, 0) + require.NoError(t, err) + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + tc.test(t, emitCalls) + }) + } +} + +func TestNopEncodingDifferentLogSizes(t *testing.T) { + tcs := []struct { + testName string + input []byte + test func(*testing.T, chan *emitParams) + maxLogSize helper.ByteSize + }{ + { + "same size", + []byte("testlog1"), + func(t *testing.T, c chan *emitParams) { + waitForToken(t, c, []byte("testlog1")) + }, + 8, + }, + { + "massive log size", + []byte("testlog1"), + func(t *testing.T, c chan *emitParams) { + waitForToken(t, c, []byte("testlog1")) + }, + 8000000, + }, + { + "slightly larger log size", + []byte("testlog1"), + func(t *testing.T, c chan *emitParams) { + waitForToken(t, c, []byte("testlog1")) + }, + 9, + }, + { + "slightly smaller log size", + []byte("testlog1"), + func(t *testing.T, c chan *emitParams) { + waitForToken(t, c, []byte("testlog")) + waitForToken(t, c, []byte("1")) + }, + 7, + }, + { + "tiny log size", + []byte("testlog1"), + func(t *testing.T, c chan *emitParams) { + waitForToken(t, c, []byte("t")) + waitForToken(t, c, []byte("e")) + waitForToken(t, c, []byte("s")) + waitForToken(t, c, []byte("t")) + waitForToken(t, c, []byte("l")) + waitForToken(t, c, []byte("o")) + waitForToken(t, c, []byte("g")) + waitForToken(t, c, []byte("1")) + }, + 1, + }, + } + + t.Parallel() + + for _, tc := range tcs { + t.Run(tc.testName, func(t *testing.T) { + operator, emitCalls, tempDir := newTestScenario(t, func(cfg *Config) { + cfg.MaxLogSize = tc.maxLogSize + cfg.Encoding.Encoding = "nop" + }) + // Create a file, then start + temp := openTemp(t, tempDir) + bytesWritten, err := temp.Write(tc.input) + require.Greater(t, bytesWritten, 0) + require.NoError(t, err) + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + tc.test(t, emitCalls) + }) + } +} + +// ReadNewLogs tests that, after starting, if a new file is created +// all the entries in that file are read from the beginning +func TestReadNewLogs(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + operator.persister = testutil.NewMockPersister("test") + + // Poll once so we know this isn't a new file + operator.poll(context.Background()) + defer func() { + require.NoError(t, operator.Stop()) + }() + + // Create a new file + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog\n") + + // Poll a second time after the file has been created + operator.poll(context.Background()) + + // Expect the message to come through + waitForToken(t, emitCalls, []byte("testlog")) +} + +// ReadExistingAndNewLogs tests that, on startup, if start_at +// is set to `beginning`, we read the logs that are there, and +// we read any additional logs that are written after startup +func TestReadExistingAndNewLogs(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + operator.persister = testutil.NewMockPersister("test") + defer func() { + require.NoError(t, operator.Stop()) + }() + + // Start with a file with an entry in it, and expect that entry + // to come through when we poll for the first time + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1\n") + operator.poll(context.Background()) + waitForToken(t, emitCalls, []byte("testlog1")) + + // Write a second entry, and expect that entry to come through + // as well + writeString(t, temp, "testlog2\n") + operator.poll(context.Background()) + waitForToken(t, emitCalls, []byte("testlog2")) +} + +// StartAtEnd tests that when `start_at` is configured to `end`, +// we don't read any entries that were in the file before startup +func TestStartAtEnd(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, func(cfg *Config) { + cfg.StartAt = "end" + }) + operator.persister = testutil.NewMockPersister("test") + defer func() { + require.NoError(t, operator.Stop()) + }() + + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1\n") + + // Expect no entries on the first poll + operator.poll(context.Background()) + expectNoTokens(t, emitCalls) + + // Expect any new entries after the first poll + writeString(t, temp, "testlog2\n") + operator.poll(context.Background()) + waitForToken(t, emitCalls, []byte("testlog2")) +} + +// StartAtEndNewFile tests that when `start_at` is configured to `end`, +// a file created after the operator has been started is read from the +// beginning +func TestStartAtEndNewFile(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + operator.persister = testutil.NewMockPersister("test") + operator.startAtBeginning = false + defer func() { + require.NoError(t, operator.Stop()) + }() + + operator.poll(context.Background()) + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1\ntestlog2\n") + + operator.poll(context.Background()) + waitForToken(t, emitCalls, []byte("testlog1")) + waitForToken(t, emitCalls, []byte("testlog2")) +} + +// NoNewline tests that an entry will still be sent eventually +// even if the file doesn't end in a newline +func TestNoNewline(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, func(cfg *Config) { + cfg.Splitter = helper.NewSplitterConfig() + cfg.Splitter.Flusher.Period.Duration = time.Nanosecond + }) + + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1\ntestlog2") + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForToken(t, emitCalls, []byte("testlog1")) + waitForToken(t, emitCalls, []byte("testlog2")) +} + +// SkipEmpty tests that the any empty lines are skipped +func TestSkipEmpty(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1\n\ntestlog2\n") + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForToken(t, emitCalls, []byte("testlog1")) + waitForToken(t, emitCalls, []byte("testlog2")) +} + +// SplitWrite tests a line written in two writes +// close together still is read as a single entry +func TestSplitWrite(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + operator.persister = testutil.NewMockPersister("test") + defer func() { + require.NoError(t, operator.Stop()) + }() + + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1") + + operator.poll(context.Background()) + + writeString(t, temp, "testlog2\n") + + operator.poll(context.Background()) + waitForToken(t, emitCalls, []byte("testlog1testlog2")) +} + +func TestIgnoreEmptyFiles(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + operator.persister = testutil.NewMockPersister("test") + defer func() { + require.NoError(t, operator.Stop()) + }() + + temp := openTemp(t, tempDir) + temp2 := openTemp(t, tempDir) + temp3 := openTemp(t, tempDir) + temp4 := openTemp(t, tempDir) + + writeString(t, temp, "testlog1\n") + writeString(t, temp3, "testlog2\n") + operator.poll(context.Background()) + + waitForTokens(t, emitCalls, [][]byte{[]byte("testlog1"), []byte("testlog2")}) + + writeString(t, temp2, "testlog3\n") + writeString(t, temp4, "testlog4\n") + operator.poll(context.Background()) + + waitForTokens(t, emitCalls, [][]byte{[]byte("testlog3"), []byte("testlog4")}) +} + +func TestDecodeBufferIsResized(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + temp := openTemp(t, tempDir) + expected := tokenWithLength(1<<12 + 1) + writeString(t, temp, string(expected)+"\n") + + waitForToken(t, emitCalls, expected) +} + +func TestMultiFileSimple(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + + temp1 := openTemp(t, tempDir) + temp2 := openTemp(t, tempDir) + + writeString(t, temp1, "testlog1\n") + writeString(t, temp2, "testlog2\n") + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForTokens(t, emitCalls, [][]byte{[]byte("testlog1"), []byte("testlog2")}) +} + +func TestMultiFileParallel_PreloadedFiles(t *testing.T) { + t.Parallel() + + getMessage := func(f, m int) string { return fmt.Sprintf("file %d, message %d", f, m) } + + operator, emitCalls, tempDir := newTestScenario(t, nil) + + numFiles := 10 + numMessages := 100 + + expected := make([][]byte, 0, numFiles*numMessages) + for i := 0; i < numFiles; i++ { + for j := 0; j < numMessages; j++ { + expected = append(expected, []byte(getMessage(i, j))) + } + } + + var wg sync.WaitGroup + for i := 0; i < numFiles; i++ { + temp := openTemp(t, tempDir) + wg.Add(1) + go func(tf *os.File, f int) { + defer wg.Done() + for j := 0; j < numMessages; j++ { + writeString(t, tf, getMessage(f, j)+"\n") + } + }(temp, i) + } + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForTokens(t, emitCalls, expected) + wg.Wait() +} + +func TestMultiFileParallel_LiveFiles(t *testing.T) { + t.Parallel() + + getMessage := func(f, m int) string { return fmt.Sprintf("file %d, message %d", f, m) } + + operator, emitCalls, tempDir := newTestScenario(t, nil) + + numFiles := 10 + numMessages := 100 + + expected := make([][]byte, 0, numFiles*numMessages) + for i := 0; i < numFiles; i++ { + for j := 0; j < numMessages; j++ { + expected = append(expected, []byte(getMessage(i, j))) + } + } + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + temps := make([]*os.File, 0, numFiles) + for i := 0; i < numFiles; i++ { + temps = append(temps, openTemp(t, tempDir)) + } + + var wg sync.WaitGroup + for i, temp := range temps { + wg.Add(1) + go func(tf *os.File, f int) { + defer wg.Done() + for j := 0; j < numMessages; j++ { + writeString(t, tf, getMessage(f, j)+"\n") + } + }(temp, i) + } + + waitForTokens(t, emitCalls, expected) + wg.Wait() +} + +// OffsetsAfterRestart tests that a operator is able to load +// its offsets after a restart +func TestOffsetsAfterRestart(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + persister := testutil.NewMockPersister("test") + + temp1 := openTemp(t, tempDir) + writeString(t, temp1, "testlog1\n") + + // Start the operator and expect a message + require.NoError(t, operator.Start(persister)) + defer func() { + require.NoError(t, operator.Stop()) + }() + waitForToken(t, emitCalls, []byte("testlog1")) + + // Restart the operator. Stop and build a new + // one to guarantee freshness + require.NoError(t, operator.Stop()) + require.NoError(t, operator.Start(persister)) + + // Write a new log and expect only that log + writeString(t, temp1, "testlog2\n") + waitForToken(t, emitCalls, []byte("testlog2")) +} + +func TestOffsetsAfterRestart_BigFiles(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + persister := testutil.NewMockPersister("test") + + log1 := tokenWithLength(2000) + log2 := tokenWithLength(2000) + + temp1 := openTemp(t, tempDir) + writeString(t, temp1, string(log1)+"\n") + + // Start the operator + require.NoError(t, operator.Start(persister)) + defer func() { + require.NoError(t, operator.Stop()) + }() + waitForToken(t, emitCalls, log1) + + // Restart the operator + require.NoError(t, operator.Stop()) + require.NoError(t, operator.Start(persister)) + + writeString(t, temp1, string(log2)+"\n") + waitForToken(t, emitCalls, log2) +} + +func TestOffsetsAfterRestart_BigFilesWrittenWhileOff(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + persister := testutil.NewMockPersister("test") + + log1 := tokenWithLength(2000) + log2 := tokenWithLength(2000) + + temp := openTemp(t, tempDir) + writeString(t, temp, string(log1)+"\n") + + // Start the operator and expect the first message + require.NoError(t, operator.Start(persister)) + defer func() { + require.NoError(t, operator.Stop()) + }() + waitForToken(t, emitCalls, log1) + + // Stop the operator and write a new message + require.NoError(t, operator.Stop()) + writeString(t, temp, string(log2)+"\n") + + // Start the operator and expect the message + require.NoError(t, operator.Start(persister)) + waitForToken(t, emitCalls, log2) +} + +func TestManyLogsDelivered(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + + count := 1000 + expectedTokens := make([]string, 0, count) + for i := 0; i < count; i++ { + expectedTokens = append(expectedTokens, strconv.Itoa(i)) + } + + // Start the operator + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + // Write lots of logs + temp := openTemp(t, tempDir) + for _, message := range expectedTokens { + _, err := temp.WriteString(message + "\n") + require.NoError(t, err) + } + + // Expect each of them to come through once + for _, message := range expectedTokens { + waitForToken(t, emitCalls, []byte(message)) + } + expectNoTokens(t, emitCalls) +} + +func TestFileBatching(t *testing.T) { + t.Parallel() + + files := 100 + linesPerFile := 10 + maxConcurrentFiles := 20 + maxBatchFiles := maxConcurrentFiles / 2 + + expectedBatches := files / maxBatchFiles // assumes no remainder + expectedLinesPerBatch := maxBatchFiles * linesPerFile + + expectedTokens := make([][]byte, 0, files*linesPerFile) + actualTokens := make([][]byte, 0, files*linesPerFile) + + emitCalls := make(chan *emitParams, expectedLinesPerBatch*2) + operator, tempDir := newTestScenarioWithChan(t, + func(cfg *Config) { + cfg.MaxConcurrentFiles = maxConcurrentFiles + }, + emitCalls) + operator.persister = testutil.NewMockPersister("test") + defer func() { + require.NoError(t, operator.Stop()) + }() + + temps := make([]*os.File, 0, files) + for i := 0; i < files; i++ { + temps = append(temps, openTemp(t, tempDir)) + } + + // Write logs to each file + for i, temp := range temps { + for j := 0; j < linesPerFile; j++ { + message := fmt.Sprintf("%s %d %d", tokenWithLength(100), i, j) + _, err := temp.WriteString(message + "\n") + require.NoError(t, err) + expectedTokens = append(expectedTokens, []byte(message)) + } + } + + for b := 0; b < expectedBatches; b++ { + // poll once so we can validate that files were batched + operator.poll(context.Background()) + actualTokens = append(actualTokens, waitForNTokens(t, emitCalls, expectedLinesPerBatch)...) + } + + require.ElementsMatch(t, expectedTokens, actualTokens) + + // Write more logs to each file so we can validate that all files are still known + for i, temp := range temps { + for j := 0; j < linesPerFile; j++ { + message := fmt.Sprintf("%s %d %d", tokenWithLength(20), i, j) + _, err := temp.WriteString(message + "\n") + require.NoError(t, err) + expectedTokens = append(expectedTokens, []byte(message)) + } + } + + for b := 0; b < expectedBatches; b++ { + // poll once so we can validate that files were batched + operator.poll(context.Background()) + actualTokens = append(actualTokens, waitForNTokens(t, emitCalls, expectedLinesPerBatch)...) + } + + require.ElementsMatch(t, expectedTokens, actualTokens) +} + +func TestFileReader_FingerprintUpdated(t *testing.T) { + t.Parallel() + + operator, emitCalls, tempDir := newTestScenario(t, nil) + defer func() { + require.NoError(t, operator.Stop()) + }() + + temp := openTemp(t, tempDir) + tempCopy := openFile(t, temp.Name()) + fp, err := operator.NewFingerprint(temp) + require.NoError(t, err) + + splitter, err := operator.getMultiline() + require.NoError(t, err) + + reader, err := operator.NewReader(temp.Name(), tempCopy, fp, splitter, operator.emit) + require.NoError(t, err) + defer reader.Close() + + writeString(t, temp, "testlog1\n") + reader.ReadToEnd(context.Background()) + waitForToken(t, emitCalls, []byte("testlog1")) + require.Equal(t, []byte("testlog1\n"), reader.Fingerprint.FirstBytes) +} + +// Test that a fingerprint: +// - Starts empty +// - Updates as a file is read +// - Stops updating when the max fingerprint size is reached +// - Stops exactly at max fingerprint size, regardless of content +func TestFingerprintGrowsAndStops(t *testing.T) { + t.Parallel() + + // Use a number with many factors. + // Sometimes fingerprint length will align with + // the end of a line, sometimes not. Test both. + maxFP := 360 + + // Use prime numbers to ensure variation in + // whether or not they are factors of maxFP + lineLens := []int{3, 5, 7, 11, 13, 17, 19, 23, 27} + + for _, lineLen := range lineLens { + t.Run(fmt.Sprintf("%d", lineLen), func(t *testing.T) { + t.Parallel() + operator, _, tempDir := newTestScenario(t, func(cfg *Config) { + cfg.FingerprintSize = helper.ByteSize(maxFP) + }) + defer func() { + require.NoError(t, operator.Stop()) + }() + + temp := openTemp(t, tempDir) + tempCopy := openFile(t, temp.Name()) + fp, err := operator.NewFingerprint(temp) + require.NoError(t, err) + require.Equal(t, []byte(""), fp.FirstBytes) + + splitter, err := operator.getMultiline() + require.NoError(t, err) + + reader, err := operator.NewReader(temp.Name(), tempCopy, fp, splitter, operator.emit) + require.NoError(t, err) + defer reader.Close() + + // keep track of what has been written to the file + fileContent := []byte{} + + // keep track of expected fingerprint size + expectedFP := 0 + + // Write lines until file is much larger than the length of the fingerprint + for len(fileContent) < 2*maxFP { + expectedFP += lineLen + if expectedFP > maxFP { + expectedFP = maxFP + } + + line := string(tokenWithLength(lineLen-1)) + "\n" + fileContent = append(fileContent, []byte(line)...) + + writeString(t, temp, line) + reader.ReadToEnd(context.Background()) + require.Equal(t, fileContent[:expectedFP], reader.Fingerprint.FirstBytes) + } + }) + } +} + +// This is same test like TestFingerprintGrowsAndStops, but with additional check for fingerprint size check +// Test that a fingerprint: +// - Starts empty +// - Updates as a file is read +// - Stops updating when the max fingerprint size is reached +// - Stops exactly at max fingerprint size, regardless of content +// - Do not change size after fingerprint configuration change +func TestFingerprintChangeSize(t *testing.T) { + t.Parallel() + + // Use a number with many factors. + // Sometimes fingerprint length will align with + // the end of a line, sometimes not. Test both. + maxFP := 360 + + // Use prime numbers to ensure variation in + // whether or not they are factors of maxFP + lineLens := []int{3, 5, 7, 11, 13, 17, 19, 23, 27} + + for _, lineLen := range lineLens { + t.Run(fmt.Sprintf("%d", lineLen), func(t *testing.T) { + t.Parallel() + operator, _, tempDir := newTestScenario(t, func(cfg *Config) { + cfg.FingerprintSize = helper.ByteSize(maxFP) + }) + defer func() { + require.NoError(t, operator.Stop()) + }() + + temp := openTemp(t, tempDir) + tempCopy := openFile(t, temp.Name()) + fp, err := operator.NewFingerprint(temp) + require.NoError(t, err) + require.Equal(t, []byte(""), fp.FirstBytes) + + splitter, err := operator.getMultiline() + require.NoError(t, err) + + reader, err := operator.NewReader(temp.Name(), tempCopy, fp, splitter, operator.emit) + require.NoError(t, err) + defer reader.Close() + + // keep track of what has been written to the file + fileContent := []byte{} + + // keep track of expected fingerprint size + expectedFP := 0 + + // Write lines until file is much larger than the length of the fingerprint + for len(fileContent) < 2*maxFP { + expectedFP += lineLen + if expectedFP > maxFP { + expectedFP = maxFP + } + + line := string(tokenWithLength(lineLen-1)) + "\n" + fileContent = append(fileContent, []byte(line)...) + + writeString(t, temp, line) + reader.ReadToEnd(context.Background()) + require.Equal(t, fileContent[:expectedFP], reader.Fingerprint.FirstBytes) + } + + // Test fingerprint change + // Change fingerprint and try to read file again + // We do not expect fingerprint change + // We test both increasing and decreasing fingerprint size + reader.fileInput.fingerprintSize = maxFP * (lineLen / 3) + line := string(tokenWithLength(lineLen-1)) + "\n" + fileContent = append(fileContent, []byte(line)...) + + writeString(t, temp, line) + reader.ReadToEnd(context.Background()) + require.Equal(t, fileContent[:expectedFP], reader.Fingerprint.FirstBytes) + + reader.fileInput.fingerprintSize = maxFP / 2 + line = string(tokenWithLength(lineLen-1)) + "\n" + fileContent = append(fileContent, []byte(line)...) + + writeString(t, temp, line) + reader.ReadToEnd(context.Background()) + require.Equal(t, fileContent[:expectedFP], reader.Fingerprint.FirstBytes) + }) + } +} + +// func TestEncodings(t *testing.T) { +// t.Parallel() +// cases := []struct { +// name string +// contents []byte +// encoding string +// expected [][]byte +// }{ +// { +// "Nop", +// []byte{0xc5, '\n'}, +// "", +// [][]byte{{0xc5}}, +// }, +// { +// "InvalidUTFReplacement", +// []byte{0xc5, '\n'}, +// "utf8", +// [][]byte{{0xef, 0xbf, 0xbd}}, +// }, +// { +// "ValidUTF8", +// []byte("foo\n"), +// "utf8", +// [][]byte{[]byte("foo")}, +// }, +// { +// "ChineseCharacter", +// []byte{230, 138, 152, '\n'}, // 折\n +// "utf8", +// [][]byte{{230, 138, 152}}, +// }, +// { +// "SmileyFaceUTF16", +// []byte{216, 61, 222, 0, 0, 10}, // πŸ˜€\n +// "utf-16be", +// [][]byte{{240, 159, 152, 128}}, +// }, +// { +// "SmileyFaceNewlineUTF16", +// []byte{216, 61, 222, 0, 0, 10, 0, 102, 0, 111, 0, 111}, // πŸ˜€\nfoo +// "utf-16be", +// [][]byte{{240, 159, 152, 128}, {102, 111, 111}}, +// }, +// { +// "SmileyFaceNewlineUTF16LE", +// []byte{61, 216, 0, 222, 10, 0, 102, 0, 111, 0, 111, 0}, // πŸ˜€\nfoo +// "utf-16le", +// [][]byte{{240, 159, 152, 128}, {102, 111, 111}}, +// }, +// { +// "ChineseCharacterBig5", +// []byte{167, 233, 10}, // 折\n +// "big5", +// [][]byte{{230, 138, 152}}, +// }, +// } + +// for _, tc := range cases { +// t.Run(tc.name, func(t *testing.T) { +// t.Parallel() +// operator, receivedEntries, tempDir := newTestScenario(t, func(cfg *Config) { +// cfg.Encoding = helper.EncodingConfig{Encoding: tc.encoding} +// }) + +// // Popualte the file +// temp := openTemp(t, tempDir) +// _, err := temp.Write(tc.contents) +// require.NoError(t, err) + +// require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) +// defer func() { +// require.NoError(t, operator.Stop()) +// }() + +// for _, expected := range tc.expected { +// select { +// case entry := <-receivedEntries: +// require.Equal(t, expected, []byte(entry.Body.(string))) +// case <-time.After(500 * time.Millisecond): +// require.FailNow(t, "Timed out waiting for entry to be read") +// } +// } +// }) +// } +// } diff --git a/pkg/stanza/operator/input/file/finder.go b/pkg/stanza/internal/fileconsumer/finder.go similarity index 92% rename from pkg/stanza/operator/input/file/finder.go rename to pkg/stanza/internal/fileconsumer/finder.go index bdfb5d42aa25..f44279268797 100644 --- a/pkg/stanza/operator/input/file/finder.go +++ b/pkg/stanza/internal/fileconsumer/finder.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file" +package fileconsumer // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" import ( "github.com/bmatcuk/doublestar/v3" diff --git a/pkg/stanza/operator/input/file/finder_test.go b/pkg/stanza/internal/fileconsumer/finder_test.go similarity index 99% rename from pkg/stanza/operator/input/file/finder_test.go rename to pkg/stanza/internal/fileconsumer/finder_test.go index e772dfb86f5d..0f2c515f4940 100644 --- a/pkg/stanza/operator/input/file/finder_test.go +++ b/pkg/stanza/internal/fileconsumer/finder_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package file +package fileconsumer import ( "io/ioutil" diff --git a/pkg/stanza/operator/input/file/fingerprint.go b/pkg/stanza/internal/fileconsumer/fingerprint.go similarity index 85% rename from pkg/stanza/operator/input/file/fingerprint.go rename to pkg/stanza/internal/fileconsumer/fingerprint.go index 2cd43e80da36..fc430103ff93 100644 --- a/pkg/stanza/operator/input/file/fingerprint.go +++ b/pkg/stanza/internal/fileconsumer/fingerprint.go @@ -12,17 +12,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file" +package fileconsumer // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" import ( "bytes" + "errors" "fmt" "io" "os" ) -const defaultFingerprintSize = 1000 // bytes -const minFingerprintSize = 16 // bytes +const DefaultFingerprintSize = 1000 // bytes +const MinFingerprintSize = 16 // bytes // Fingerprint is used to identify a file // A file's fingerprint is the first N bytes of the file, @@ -36,8 +37,8 @@ func (f *Input) NewFingerprint(file *os.File) (*Fingerprint, error) { buf := make([]byte, f.fingerprintSize) n, err := file.ReadAt(buf, 0) - if err != nil && err != io.EOF { - return nil, fmt.Errorf("reading fingerprint bytes: %s", err) + if err != nil && !errors.Is(err, io.EOF) { + return nil, fmt.Errorf("reading fingerprint bytes: %w", err) } fp := &Fingerprint{ diff --git a/pkg/stanza/operator/input/file/fingerprint_test.go b/pkg/stanza/internal/fileconsumer/fingerprint_test.go similarity index 85% rename from pkg/stanza/operator/input/file/fingerprint_test.go rename to pkg/stanza/internal/fileconsumer/fingerprint_test.go index dbcdda2725ee..3184c0eeffaf 100644 --- a/pkg/stanza/operator/input/file/fingerprint_test.go +++ b/pkg/stanza/internal/fileconsumer/fingerprint_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package file +package fileconsumer import ( "fmt" @@ -31,7 +31,7 @@ func TestNewFingerprintDoesNotModifyOffset(t *testing.T) { fileContents := fmt.Sprintf("%s%s%s\n", fingerprint, next, extra) - f, _, tempDir := newTestFileOperator(t, nil, nil) + f, _, tempDir := newTestScenario(t, nil) f.fingerprintSize = len(fingerprint) // Create a new file @@ -71,39 +71,39 @@ func TestNewFingerprint(t *testing.T) { }{ { name: "defaultExactFileSize", - fingerprintSize: defaultFingerprintSize, - fileSize: defaultFingerprintSize, - expectedLen: defaultFingerprintSize, + fingerprintSize: DefaultFingerprintSize, + fileSize: DefaultFingerprintSize, + expectedLen: DefaultFingerprintSize, }, { name: "defaultWithFileHalfOfFingerprint", - fingerprintSize: defaultFingerprintSize, - fileSize: defaultFingerprintSize / 2, - expectedLen: defaultFingerprintSize / 2, + fingerprintSize: DefaultFingerprintSize, + fileSize: DefaultFingerprintSize / 2, + expectedLen: DefaultFingerprintSize / 2, }, { name: "defaultWithFileTwiceFingerprint", - fingerprintSize: defaultFingerprintSize, - fileSize: defaultFingerprintSize * 2, - expectedLen: defaultFingerprintSize, + fingerprintSize: DefaultFingerprintSize, + fileSize: DefaultFingerprintSize * 2, + expectedLen: DefaultFingerprintSize, }, { name: "minFingerprintExactFileSize", - fingerprintSize: minFingerprintSize, - fileSize: minFingerprintSize, - expectedLen: minFingerprintSize, + fingerprintSize: MinFingerprintSize, + fileSize: MinFingerprintSize, + expectedLen: MinFingerprintSize, }, { name: "minFingerprintWithSmallerFileSize", - fingerprintSize: minFingerprintSize, - fileSize: minFingerprintSize / 2, - expectedLen: minFingerprintSize / 2, + fingerprintSize: MinFingerprintSize, + fileSize: MinFingerprintSize / 2, + expectedLen: MinFingerprintSize / 2, }, { name: "minFingerprintWithLargerFileSize", - fingerprintSize: minFingerprintSize, - fileSize: defaultFingerprintSize, - expectedLen: minFingerprintSize, + fingerprintSize: MinFingerprintSize, + fileSize: DefaultFingerprintSize, + expectedLen: MinFingerprintSize, }, { name: "largeFingerprintSmallFile", @@ -122,12 +122,12 @@ func TestNewFingerprint(t *testing.T) { for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { t.Parallel() - f, _, tempDir := newTestFileOperator(t, nil, nil) + f, _, tempDir := newTestScenario(t, nil) f.fingerprintSize = tc.fingerprintSize // Create a new file temp := openTemp(t, tempDir) - writeString(t, temp, stringWithLength(tc.fileSize)) + writeString(t, temp, string(tokenWithLength(tc.fileSize))) // Validate that the file is actually the expected size after writing info, err := temp.Stat() @@ -148,9 +148,9 @@ func TestFingerprintCopy(t *testing.T) { "", "hello", "asdfsfaddsfas", - stringWithLength(minFingerprintSize), - stringWithLength(defaultFingerprintSize), - stringWithLength(1234), + string(tokenWithLength(MinFingerprintSize)), + string(tokenWithLength(DefaultFingerprintSize)), + string(tokenWithLength(1234)), } for _, tc := range cases { @@ -225,7 +225,7 @@ func TestFingerprintStartsWith(t *testing.T) { func TestFingerprintStartsWith_FromFile(t *testing.T) { r := rand.New(rand.NewSource(112358)) - operator, _, tempDir := newTestFileOperator(t, nil, nil) + operator, _, tempDir := newTestScenario(t, nil) operator.fingerprintSize *= 10 fileLength := 12 * operator.fingerprintSize diff --git a/pkg/stanza/operator/input/file/positional_scanner.go b/pkg/stanza/internal/fileconsumer/positional_scanner.go similarity index 91% rename from pkg/stanza/operator/input/file/positional_scanner.go rename to pkg/stanza/internal/fileconsumer/positional_scanner.go index f9c45176e224..d334b2cf322a 100644 --- a/pkg/stanza/operator/input/file/positional_scanner.go +++ b/pkg/stanza/internal/fileconsumer/positional_scanner.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file" +package fileconsumer // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" import ( "bufio" diff --git a/pkg/stanza/operator/input/file/reader.go b/pkg/stanza/internal/fileconsumer/reader.go similarity index 57% rename from pkg/stanza/operator/input/file/reader.go rename to pkg/stanza/internal/fileconsumer/reader.go index 04008838f3cd..07af55a0f83f 100644 --- a/pkg/stanza/operator/input/file/reader.go +++ b/pkg/stanza/internal/fileconsumer/reader.go @@ -12,26 +12,23 @@ // See the License for the specific language governing permissions and // limitations under the License. -package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file" +package fileconsumer // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" import ( "bufio" "context" + "errors" "fmt" "os" "path/filepath" "go.uber.org/zap" - "golang.org/x/text/encoding" - "golang.org/x/text/transform" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/errors" + stanzaerrors "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/errors" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" ) -// File attributes contains information about file paths -type fileAttributes struct { +type FileAttributes struct { Name string Path string ResolvedName string @@ -40,7 +37,7 @@ type fileAttributes struct { // resolveFileAttributes resolves file attributes // and sets it to empty string in case of error -func (f *Input) resolveFileAttributes(path string) *fileAttributes { +func (f *Input) resolveFileAttributes(path string) *FileAttributes { resolved, err := filepath.EvalSymlinks(path) if err != nil { f.Error(err) @@ -51,7 +48,7 @@ func (f *Input) resolveFileAttributes(path string) *fileAttributes { f.Error(err) } - return &fileAttributes{ + return &FileAttributes{ Path: path, Name: filepath.Base(path), ResolvedPath: abs, @@ -67,10 +64,7 @@ type Reader struct { generation int fileInput *Input file *os.File - fileAttributes *fileAttributes - - decoder *encoding.Decoder - decodeBuffer []byte + fileAttributes *FileAttributes splitter *helper.Splitter @@ -78,14 +72,12 @@ type Reader struct { } // NewReader creates a new file reader -func (f *Input) NewReader(path string, file *os.File, fp *Fingerprint, splitter *helper.Splitter) (*Reader, error) { +func (f *Input) NewReader(path string, file *os.File, fp *Fingerprint, splitter *helper.Splitter, emit EmitFunc) (*Reader, error) { r := &Reader{ + SugaredLogger: f.SugaredLogger.With("path", path), Fingerprint: fp, file: file, fileInput: f, - SugaredLogger: f.SugaredLogger.With("path", path), - decoder: f.encoding.Encoding.NewDecoder(), - decodeBuffer: make([]byte, 1<<12), fileAttributes: f.resolveFileAttributes(path), splitter: splitter, } @@ -94,7 +86,7 @@ func (f *Input) NewReader(path string, file *os.File, fp *Fingerprint, splitter // Copy creates a deep copy of a Reader func (r *Reader) Copy(file *os.File) (*Reader, error) { - reader, err := r.fileInput.NewReader(r.fileAttributes.Path, file, r.Fingerprint.Copy(), r.splitter) + reader, err := r.fileInput.NewReader(r.fileAttributes.Path, file, r.Fingerprint.Copy(), r.splitter, r.fileInput.emit) if err != nil { return nil, err } @@ -107,7 +99,7 @@ func (r *Reader) InitializeOffset(startAtBeginning bool) error { if !startAtBeginning { info, err := r.file.Stat() if err != nil { - return fmt.Errorf("stat: %s", err) + return fmt.Errorf("stat: %w", err) } r.Offset = info.Size() } @@ -139,9 +131,7 @@ func (r *Reader) ReadToEnd(ctx context.Context) { break } - if err := r.emit(ctx, scanner.Bytes()); err != nil { - r.Error("Failed to emit entry", zap.Error(err)) - } + r.fileInput.emit(ctx, r.fileAttributes, scanner.Bytes()) r.Offset = scanner.Pos() } } @@ -155,82 +145,31 @@ func (r *Reader) Close() { } } -// Emit creates an entry with the decoded message and sends it to the next -// operator in the pipeline -func (r *Reader) emit(ctx context.Context, msgBuf []byte) error { - // Skip the entry if it's empty - if len(msgBuf) == 0 { - return nil - } - var e *entry.Entry - var err error - if r.fileInput.encoding.Encoding == encoding.Nop { - e, err = r.fileInput.NewEntry(msgBuf) - if err != nil { - return fmt.Errorf("create entry: %s", err) - } - } else { - msg, err := r.decode(msgBuf) - if err != nil { - return fmt.Errorf("decode: %s", err) - } - e, err = r.fileInput.NewEntry(msg) - if err != nil { - return fmt.Errorf("create entry: %s", err) - } - } - - if err := e.Set(r.fileInput.FilePathField, r.fileAttributes.Path); err != nil { - return err - } - if err := e.Set(r.fileInput.FileNameField, r.fileAttributes.Name); err != nil { - return err - } - - if err := e.Set(r.fileInput.FilePathResolvedField, r.fileAttributes.ResolvedPath); err != nil { - return err - } - - if err := e.Set(r.fileInput.FileNameResolvedField, r.fileAttributes.ResolvedName); err != nil { - return err - } - - r.fileInput.Write(ctx, e) - return nil -} - -// decode converts the bytes in msgBuf to utf-8 from the configured encoding -func (r *Reader) decode(msgBuf []byte) (string, error) { - for { - r.decoder.Reset() - nDst, _, err := r.decoder.Transform(r.decodeBuffer, msgBuf, true) - if err != nil && err == transform.ErrShortDst { - r.decodeBuffer = make([]byte, len(r.decodeBuffer)*2) - continue - } else if err != nil { - return "", fmt.Errorf("transform encoding: %s", err) - } - return string(r.decodeBuffer[:nDst]), nil - } -} - func getScannerError(scanner *PositionalScanner) error { err := scanner.Err() - if err == bufio.ErrTooLong { - return errors.NewError("log entry too large", "increase max_log_size or ensure that multiline regex patterns terminate") + if errors.Is(err, bufio.ErrTooLong) { + return stanzaerrors.NewError("log entry too large", "increase max_log_size or ensure that multiline regex patterns terminate") } else if err != nil { - return errors.Wrap(err, "scanner error") + return stanzaerrors.Wrap(err, "scanner error") } return nil } // Read from the file and update the fingerprint if necessary func (r *Reader) Read(dst []byte) (int, error) { - if len(r.Fingerprint.FirstBytes) == r.fileInput.fingerprintSize { + // Skip if fingerprint is already built + // or if fingerprint is behind Offset + if len(r.Fingerprint.FirstBytes) == r.fileInput.fingerprintSize || int(r.Offset) > len(r.Fingerprint.FirstBytes) { return r.file.Read(dst) } n, err := r.file.Read(dst) appendCount := min0(n, r.fileInput.fingerprintSize-int(r.Offset)) + // return for n == 0 or r.Offset >= r.fileInput.fingerprintSize + if appendCount == 0 { + return n, err + } + + // for appendCount==0, the following code would add `0` to fingerprint r.Fingerprint.FirstBytes = append(r.Fingerprint.FirstBytes[:r.Offset], dst[:appendCount]...) return n, err } diff --git a/pkg/stanza/operator/input/file/roller.go b/pkg/stanza/internal/fileconsumer/roller.go similarity index 84% rename from pkg/stanza/operator/input/file/roller.go rename to pkg/stanza/internal/fileconsumer/roller.go index 86da9177d105..a21d855be307 100644 --- a/pkg/stanza/operator/input/file/roller.go +++ b/pkg/stanza/internal/fileconsumer/roller.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file" +package fileconsumer // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" import "context" diff --git a/pkg/stanza/operator/input/file/roller_other.go b/pkg/stanza/internal/fileconsumer/roller_other.go similarity index 92% rename from pkg/stanza/operator/input/file/roller_other.go rename to pkg/stanza/internal/fileconsumer/roller_other.go index df820ed9d74d..46b4672c547d 100644 --- a/pkg/stanza/operator/input/file/roller_other.go +++ b/pkg/stanza/internal/fileconsumer/roller_other.go @@ -15,7 +15,7 @@ //go:build !windows // +build !windows -package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file" +package fileconsumer // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" import ( "context" diff --git a/pkg/stanza/operator/input/file/roller_windows.go b/pkg/stanza/internal/fileconsumer/roller_windows.go similarity index 88% rename from pkg/stanza/operator/input/file/roller_windows.go rename to pkg/stanza/internal/fileconsumer/roller_windows.go index f03f145446c5..80fe9f423bb9 100644 --- a/pkg/stanza/operator/input/file/roller_windows.go +++ b/pkg/stanza/internal/fileconsumer/roller_windows.go @@ -15,7 +15,7 @@ //go:build windows // +build windows -package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file" +package fileconsumer // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" import "context" diff --git a/pkg/stanza/internal/fileconsumer/rotation_test.go b/pkg/stanza/internal/fileconsumer/rotation_test.go new file mode 100644 index 000000000000..ba32c8dd2e78 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/rotation_test.go @@ -0,0 +1,515 @@ +// 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 fileconsumer + +import ( + "context" + "fmt" + "io" + "os" + "path/filepath" + "runtime" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +const windowsOS = "windows" + +func TestMultiFileRotate(t *testing.T) { + if runtime.GOOS == windowsOS { + // Windows has very poor support for moving active files, so rotation is less commonly used + // This may possibly be handled better in Go 1.16: https://github.com/golang/go/issues/35358 + t.Skip() + } + t.Parallel() + + getMessage := func(f, k, m int) string { return fmt.Sprintf("file %d-%d, message %d", f, k, m) } + + operator, emitCalls, tempDir := newTestScenario(t, nil) + + numFiles := 3 + numMessages := 3 + numRotations := 3 + + expected := make([][]byte, 0, numFiles*numMessages*numRotations) + for i := 0; i < numFiles; i++ { + for j := 0; j < numMessages; j++ { + for k := 0; k < numRotations; k++ { + expected = append(expected, []byte(getMessage(i, k, j))) + } + } + } + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + temps := make([]*os.File, 0, numFiles) + for i := 0; i < numFiles; i++ { + temps = append(temps, openTemp(t, tempDir)) + } + + var wg sync.WaitGroup + for i, temp := range temps { + wg.Add(1) + go func(tf *os.File, f int) { + defer wg.Done() + for k := 0; k < numRotations; k++ { + for j := 0; j < numMessages; j++ { + writeString(t, tf, getMessage(f, k, j)+"\n") + } + + require.NoError(t, tf.Close()) + require.NoError(t, os.Rename(tf.Name(), fmt.Sprintf("%s.%d", tf.Name(), k))) + tf = reopenTemp(t, tf.Name()) + } + }(temp, i) + } + + waitForTokens(t, emitCalls, expected) + wg.Wait() +} + +func TestMultiFileRotateSlow(t *testing.T) { + if runtime.GOOS == windowsOS { + // Windows has very poor support for moving active files, so rotation is less commonly used + // This may possibly be handled better in Go 1.16: https://github.com/golang/go/issues/35358 + t.Skip() + } + + t.Parallel() + + operator, emitCalls, tempDir := newTestScenario(t, nil) + + getMessage := func(f, k, m int) string { return fmt.Sprintf("file %d-%d, message %d", f, k, m) } + fileName := func(f, k int) string { return filepath.Join(tempDir, fmt.Sprintf("file%d.rot%d.log", f, k)) } + baseFileName := func(f int) string { return filepath.Join(tempDir, fmt.Sprintf("file%d.log", f)) } + + numFiles := 3 + numMessages := 30 + numRotations := 3 + + expected := make([][]byte, 0, numFiles*numMessages*numRotations) + for i := 0; i < numFiles; i++ { + for j := 0; j < numMessages; j++ { + for k := 0; k < numRotations; k++ { + expected = append(expected, []byte(getMessage(i, k, j))) + } + } + } + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + var wg sync.WaitGroup + for fileNum := 0; fileNum < numFiles; fileNum++ { + wg.Add(1) + go func(fn int) { + defer wg.Done() + + for rotationNum := 0; rotationNum < numRotations; rotationNum++ { + file := openFile(t, baseFileName(fn)) + for messageNum := 0; messageNum < numMessages; messageNum++ { + writeString(t, file, getMessage(fn, rotationNum, messageNum)+"\n") + time.Sleep(5 * time.Millisecond) + } + + require.NoError(t, file.Close()) + require.NoError(t, os.Rename(baseFileName(fn), fileName(fn, rotationNum))) + } + }(fileNum) + } + + waitForTokens(t, emitCalls, expected) + wg.Wait() +} + +func TestMultiCopyTruncateSlow(t *testing.T) { + operator, emitCalls, tempDir := newTestScenario(t, nil) + + getMessage := func(f, k, m int) string { return fmt.Sprintf("file %d-%d, message %d", f, k, m) } + fileName := func(f, k int) string { return filepath.Join(tempDir, fmt.Sprintf("file%d.rot%d.log", f, k)) } + baseFileName := func(f int) string { return filepath.Join(tempDir, fmt.Sprintf("file%d.log", f)) } + + numFiles := 3 + numMessages := 30 + numRotations := 3 + + expected := make([][]byte, 0, numFiles*numMessages*numRotations) + for i := 0; i < numFiles; i++ { + for j := 0; j < numMessages; j++ { + for k := 0; k < numRotations; k++ { + expected = append(expected, []byte(getMessage(i, k, j))) + } + } + } + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + var wg sync.WaitGroup + for fileNum := 0; fileNum < numFiles; fileNum++ { + wg.Add(1) + go func(fn int) { + defer wg.Done() + + for rotationNum := 0; rotationNum < numRotations; rotationNum++ { + file := openFile(t, baseFileName(fn)) + for messageNum := 0; messageNum < numMessages; messageNum++ { + writeString(t, file, getMessage(fn, rotationNum, messageNum)+"\n") + time.Sleep(5 * time.Millisecond) + } + + _, err := file.Seek(0, 0) + require.NoError(t, err) + dst := openFile(t, fileName(fn, rotationNum)) + _, err = io.Copy(dst, file) + require.NoError(t, err) + require.NoError(t, dst.Close()) + require.NoError(t, file.Truncate(0)) + _, err = file.Seek(0, 0) + require.NoError(t, err) + file.Close() + } + }(fileNum) + } + + waitForTokens(t, emitCalls, expected) + wg.Wait() +} + +type rotationTest struct { + name string + totalLines int + maxLinesPerFile int + maxBackupFiles int + writeInterval time.Duration + pollInterval time.Duration + ephemeralLines bool +} + +/* + When log files are rotated at extreme speeds, it is possible to miss some log entries. + This can happen when an individual log entry is written and deleted within the duration + of a single poll interval. For example, consider the following scenario: + - A log file may have up to 9 backups (10 total log files) + - Each log file may contain up to 10 entries + - Log entries are written at an interval of 10Β΅s + - Log files are polled at an interval of 100ms + In this scenario, a log entry that is written may only exist on disk for about 1ms. + A polling interval of 100ms will most likely never produce a chance to read the log file. + + In production settings, this consideration is not very likely to be a problem, but it is + easy to encounter the issue in tests, and difficult to deterministically simulate edge cases. + However, the above understanding does allow for some consistent expectations. + 1) Cases that do not require deletion of old log entries should always pass. + 2) Cases where the polling interval is sufficiently rapid should always pass. + 3) When neither 1 nor 2 is true, there may be missing entries, but still no duplicates. + + The following method is provided largely as documentation of how this is expected to behave. + In practice, timing is largely dependent on the responsiveness of system calls. +*/ +func (rt rotationTest) expectEphemeralLines() bool { + // primary + backups + maxLinesInAllFiles := rt.maxLinesPerFile + rt.maxLinesPerFile*rt.maxBackupFiles + + // Will the test write enough lines to result in deletion of oldest backups? + maxBackupsExceeded := rt.totalLines > maxLinesInAllFiles + + // last line written in primary file will exist for l*b more writes + minTimeToLive := time.Duration(int(rt.writeInterval) * rt.maxLinesPerFile * rt.maxBackupFiles) + + // can a line be written and then rotated to deletion before ever observed? + return maxBackupsExceeded && rt.pollInterval > minTimeToLive +} + +func (rt rotationTest) run(tc rotationTest, copyTruncate, sequential bool) func(t *testing.T) { + return func(t *testing.T) { + emitCalls := make(chan *emitParams, tc.totalLines) + operator, tempDir := newTestScenarioWithChan(t, + func(cfg *Config) { + cfg.PollInterval = helper.NewDuration(tc.pollInterval) + }, + emitCalls, + ) + logger := getRotatingLogger(t, tempDir, tc.maxLinesPerFile, tc.maxBackupFiles, copyTruncate, sequential) + + expected := make([][]byte, 0, tc.totalLines) + baseStr := string(tokenWithLength(46)) // + ' 123' + for i := 0; i < tc.totalLines; i++ { + expected = append(expected, []byte(fmt.Sprintf("%s %3d", baseStr, i))) + } + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + + for _, message := range expected { + logger.Println(string(message)) + time.Sleep(tc.writeInterval) + } + + received := make([][]byte, 0, tc.totalLines) + LOOP: + for { + select { + case call := <-emitCalls: + received = append(received, call.token) + case <-time.After(200 * time.Millisecond): + break LOOP + } + } + + if tc.ephemeralLines { + if !tc.expectEphemeralLines() { + // This is helpful for test development, and ensures the sample computation is used + t.Logf("Potentially unstable ephemerality expectation for test: %s", tc.name) + } + require.Subset(t, expected, received) + } else { + require.ElementsMatch(t, expected, received) + } + } +} + +func TestRotation(t *testing.T) { + cases := []rotationTest{ + { + name: "NoRotation", + totalLines: 10, + maxLinesPerFile: 10, + maxBackupFiles: 1, + writeInterval: time.Millisecond, + pollInterval: 10 * time.Millisecond, + }, + { + name: "NoDeletion", + totalLines: 20, + maxLinesPerFile: 10, + maxBackupFiles: 1, + writeInterval: time.Millisecond, + pollInterval: 10 * time.Millisecond, + }, + { + name: "Deletion", + totalLines: 30, + maxLinesPerFile: 10, + maxBackupFiles: 1, + writeInterval: time.Millisecond, + pollInterval: 10 * time.Millisecond, + ephemeralLines: true, + }, + { + name: "Deletion/ExceedFingerprint", + totalLines: 300, + maxLinesPerFile: 100, + maxBackupFiles: 1, + writeInterval: time.Millisecond, + pollInterval: 10 * time.Millisecond, + ephemeralLines: true, + }, + } + + for _, tc := range cases { + if runtime.GOOS != windowsOS { + // Windows has very poor support for moving active files, so rotation is less commonly used + // This may possibly be handled better in Go 1.16: https://github.com/golang/go/issues/35358 + t.Run(fmt.Sprintf("%s/MoveCreateTimestamped", tc.name), tc.run(tc, false, false)) + t.Run(fmt.Sprintf("%s/MoveCreateSequential", tc.name), tc.run(tc, false, true)) + } + t.Run(fmt.Sprintf("%s/CopyTruncateTimestamped", tc.name), tc.run(tc, true, false)) + t.Run(fmt.Sprintf("%s/CopyTruncateSequential", tc.name), tc.run(tc, true, true)) + } +} + +func TestMoveFile(t *testing.T) { + if runtime.GOOS == windowsOS { + t.Skip("Moving files while open is unsupported on Windows") + } + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + operator.persister = testutil.NewMockPersister("test") + + temp1 := openTemp(t, tempDir) + writeString(t, temp1, "testlog1\n") + temp1.Close() + + operator.poll(context.Background()) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForToken(t, emitCalls, []byte("testlog1")) + + // Wait until all goroutines are finished before renaming + operator.wg.Wait() + err := os.Rename(temp1.Name(), fmt.Sprintf("%s.2", temp1.Name())) + require.NoError(t, err) + + operator.poll(context.Background()) + expectNoTokens(t, emitCalls) +} + +func TestTrackMovedAwayFiles(t *testing.T) { + if runtime.GOOS == windowsOS { + t.Skip("Moving files while open is unsupported on Windows") + } + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + operator.persister = testutil.NewMockPersister("test") + + temp1 := openTemp(t, tempDir) + writeString(t, temp1, "testlog1\n") + temp1.Close() + + operator.poll(context.Background()) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForToken(t, emitCalls, []byte("testlog1")) + + // Wait until all goroutines are finished before renaming + operator.wg.Wait() + + newDir := fmt.Sprintf("%s%s", tempDir[:len(tempDir)-1], "_new/") + err := os.Mkdir(newDir, 0777) + require.NoError(t, err) + newFileName := fmt.Sprintf("%s%s", newDir, "newfile.log") + + err = os.Rename(temp1.Name(), newFileName) + require.NoError(t, err) + + movedFile, err := os.OpenFile(newFileName, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) + require.NoError(t, err) + writeString(t, movedFile, "testlog2\n") + operator.poll(context.Background()) + + waitForToken(t, emitCalls, []byte("testlog2")) +} + +// TruncateThenWrite tests that, after a file has been truncated, +// any new writes are picked up +func TestTruncateThenWrite(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + operator.persister = testutil.NewMockPersister("test") + + temp1 := openTemp(t, tempDir) + writeString(t, temp1, "testlog1\ntestlog2\n") + + operator.poll(context.Background()) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForToken(t, emitCalls, []byte("testlog1")) + waitForToken(t, emitCalls, []byte("testlog2")) + + require.NoError(t, temp1.Truncate(0)) + _, err := temp1.Seek(0, 0) + require.NoError(t, err) + + writeString(t, temp1, "testlog3\n") + operator.poll(context.Background()) + waitForToken(t, emitCalls, []byte("testlog3")) + expectNoTokens(t, emitCalls) +} + +// CopyTruncateWriteBoth tests that when a file is copied +// with unread logs on the end, then the original is truncated, +// we get the unread logs on the copy as well as any new logs +// written to the truncated file +func TestCopyTruncateWriteBoth(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + operator.persister = testutil.NewMockPersister("test") + + temp1 := openTemp(t, tempDir) + writeString(t, temp1, "testlog1\ntestlog2\n") + + operator.poll(context.Background()) + defer func() { + require.NoError(t, operator.Stop()) + }() + + waitForToken(t, emitCalls, []byte("testlog1")) + waitForToken(t, emitCalls, []byte("testlog2")) + operator.wg.Wait() // wait for all goroutines to finish + + // Copy the first file to a new file, and add another log + temp2 := openTemp(t, tempDir) + _, err := io.Copy(temp2, temp1) + require.NoError(t, err) + + // Truncate original file + require.NoError(t, temp1.Truncate(0)) + _, err = temp1.Seek(0, 0) + require.NoError(t, err) + + // Write to original and new file + writeString(t, temp2, "testlog3\n") + writeString(t, temp1, "testlog4\n") + + // Expect both messages to come through + operator.poll(context.Background()) + waitForTokens(t, emitCalls, [][]byte{[]byte("testlog3"), []byte("testlog4")}) +} + +func TestFileMovedWhileOff_BigFiles(t *testing.T) { + t.Parallel() + operator, emitCalls, tempDir := newTestScenario(t, nil) + persister := testutil.NewMockPersister("test") + + log1 := tokenWithLength(1000) + log2 := tokenWithLength(1000) + + temp := openTemp(t, tempDir) + writeString(t, temp, string(log1)+"\n") + require.NoError(t, temp.Close()) + + // Start the operator + require.NoError(t, operator.Start(persister)) + defer func() { + require.NoError(t, operator.Stop()) + }() + waitForToken(t, emitCalls, log1) + + // Stop the operator, then rename and write a new log + require.NoError(t, operator.Stop()) + + err := os.Rename(temp.Name(), fmt.Sprintf("%s2", temp.Name())) + require.NoError(t, err) + + temp = reopenTemp(t, temp.Name()) + require.NoError(t, err) + writeString(t, temp, string(log2)+"\n") + + // Expect the message written to the new log to come through + require.NoError(t, operator.Start(persister)) + waitForToken(t, emitCalls, log2) +} diff --git a/pkg/stanza/internal/fileconsumer/testdata/default.yaml b/pkg/stanza/internal/fileconsumer/testdata/default.yaml new file mode 100644 index 000000000000..1643b3fa03be --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/default.yaml @@ -0,0 +1 @@ +type: file_input diff --git a/pkg/stanza/internal/fileconsumer/testdata/encoding_lower.yaml b/pkg/stanza/internal/fileconsumer/testdata/encoding_lower.yaml new file mode 100644 index 000000000000..aa4ed6efdc4b --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/encoding_lower.yaml @@ -0,0 +1,2 @@ +type: file_input +encoding: "utf-16le" diff --git a/pkg/stanza/internal/fileconsumer/testdata/encoding_upper.yaml b/pkg/stanza/internal/fileconsumer/testdata/encoding_upper.yaml new file mode 100644 index 000000000000..ce63e44d54d9 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/encoding_upper.yaml @@ -0,0 +1,2 @@ +type: file_input +encoding: "UTF-16lE" diff --git a/pkg/stanza/internal/fileconsumer/testdata/exclude_glob.yaml b/pkg/stanza/internal/fileconsumer/testdata/exclude_glob.yaml new file mode 100644 index 000000000000..1f5524d2be6b --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/exclude_glob.yaml @@ -0,0 +1,5 @@ +type: file_input +include: + - "*.log" +exclude: + - "not*.log" diff --git a/pkg/stanza/internal/fileconsumer/testdata/exclude_glob_double_asterisk.yaml b/pkg/stanza/internal/fileconsumer/testdata/exclude_glob_double_asterisk.yaml new file mode 100644 index 000000000000..392ea571805f --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/exclude_glob_double_asterisk.yaml @@ -0,0 +1,5 @@ +type: file_input +include: + - "*.log" +exclude: + - "not**.log" diff --git a/pkg/stanza/internal/fileconsumer/testdata/exclude_glob_double_asterisk_nested.yaml b/pkg/stanza/internal/fileconsumer/testdata/exclude_glob_double_asterisk_nested.yaml new file mode 100644 index 000000000000..1528eaeb5d6d --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/exclude_glob_double_asterisk_nested.yaml @@ -0,0 +1,5 @@ +type: file_input +include: + - "*.log" +exclude: + - "directory/**/not*.log" diff --git a/pkg/stanza/internal/fileconsumer/testdata/exclude_glob_double_asterisk_prefix.yaml b/pkg/stanza/internal/fileconsumer/testdata/exclude_glob_double_asterisk_prefix.yaml new file mode 100644 index 000000000000..eb400730344d --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/exclude_glob_double_asterisk_prefix.yaml @@ -0,0 +1,5 @@ +type: file_input +include: + - "*.log" +exclude: + - "**/directory/**/not*.log" diff --git a/pkg/stanza/internal/fileconsumer/testdata/exclude_inline.yaml b/pkg/stanza/internal/fileconsumer/testdata/exclude_inline.yaml new file mode 100644 index 000000000000..3555dec5c9eb --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/exclude_inline.yaml @@ -0,0 +1,3 @@ +type: file_input +include: [ "*.log" ] +exclude: [ "a.log", "b.log" ] diff --git a/pkg/stanza/internal/fileconsumer/testdata/exclude_invalid.yaml b/pkg/stanza/internal/fileconsumer/testdata/exclude_invalid.yaml new file mode 100644 index 000000000000..21245bc27c47 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/exclude_invalid.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - "*.log" +exclude: "aRandomString" diff --git a/pkg/stanza/internal/fileconsumer/testdata/exclude_multi.yaml b/pkg/stanza/internal/fileconsumer/testdata/exclude_multi.yaml new file mode 100644 index 000000000000..37ca7d021c5f --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/exclude_multi.yaml @@ -0,0 +1,7 @@ +type: file_input +include: + - "*.log" +exclude: + - one.log + - two.log + - three.log diff --git a/pkg/stanza/internal/fileconsumer/testdata/exclude_one.yaml b/pkg/stanza/internal/fileconsumer/testdata/exclude_one.yaml new file mode 100644 index 000000000000..48b467284846 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/exclude_one.yaml @@ -0,0 +1,5 @@ +type: file_input +include: + - "*.log" +exclude: + - one.log diff --git a/pkg/stanza/internal/fileconsumer/testdata/extra_field.yaml b/pkg/stanza/internal/fileconsumer/testdata/extra_field.yaml new file mode 100644 index 000000000000..819128bcd92a --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/extra_field.yaml @@ -0,0 +1,2 @@ +type: file_input +hello: world diff --git a/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1KB.yaml b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1KB.yaml new file mode 100644 index 000000000000..61e58a70ad25 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1KB.yaml @@ -0,0 +1,2 @@ +type: file_input +fingerprint_size: 1KB diff --git a/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1KiB.yaml b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1KiB.yaml new file mode 100644 index 000000000000..6fbd0d32ebd4 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1KiB.yaml @@ -0,0 +1,2 @@ +type: file_input +fingerprint_size: 1KiB diff --git a/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1kb_lower.yaml b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1kb_lower.yaml new file mode 100644 index 000000000000..82a53759b72f --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1kb_lower.yaml @@ -0,0 +1,2 @@ +type: file_input +fingerprint_size: 1kb diff --git a/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1kib_lower.yaml b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1kib_lower.yaml new file mode 100644 index 000000000000..3b8b9c0cf09f --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_1kib_lower.yaml @@ -0,0 +1,2 @@ +type: file_input +fingerprint_size: 1kib diff --git a/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_float.yaml b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_float.yaml new file mode 100644 index 000000000000..d2f4cc5f8a84 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_float.yaml @@ -0,0 +1,2 @@ +type: file_input +fingerprint_size: 1.1kb diff --git a/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_no_units.yaml b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_no_units.yaml new file mode 100644 index 000000000000..68b3b9d45fc8 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/fingerprint_size_no_units.yaml @@ -0,0 +1,2 @@ +type: file_input +fingerprint_size: 1000 diff --git a/pkg/stanza/internal/fileconsumer/testdata/id_custom.yaml b/pkg/stanza/internal/fileconsumer/testdata/id_custom.yaml new file mode 100644 index 000000000000..13e2a3c265d1 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/id_custom.yaml @@ -0,0 +1,2 @@ +type: file_input +id: test_id diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_file_name_lower.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_file_name_lower.yaml new file mode 100644 index 000000000000..68570a3e634f --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_file_name_lower.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - one.log +include_file_name: true diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_file_name_on.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_file_name_on.yaml new file mode 100644 index 000000000000..99776e70383a --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_file_name_on.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - one.log +include_file_name: on diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_file_name_upper.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_file_name_upper.yaml new file mode 100644 index 000000000000..c8bf44cd19e1 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_file_name_upper.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - one.log +include_file_name: TRUE diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_file_name_yes.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_file_name_yes.yaml new file mode 100644 index 000000000000..c5ccdaadf773 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_file_name_yes.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - one.log +include_file_name: yes diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_file_path_lower.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_lower.yaml new file mode 100644 index 000000000000..67e20cf828b3 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_lower.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - one.log +include_file_path: true diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_file_path_no.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_no.yaml new file mode 100644 index 000000000000..ac8bb724a236 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_no.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - one.log +include_file_path: no diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_file_path_nonbool.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_nonbool.yaml new file mode 100644 index 000000000000..fadd3b41d36e --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_nonbool.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - one.log +include_file_path: asdf diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_file_path_off.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_off.yaml new file mode 100644 index 000000000000..600599e9daad --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_off.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - one.log +include_file_path: off diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_file_path_on.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_on.yaml new file mode 100644 index 000000000000..0d227c4551a9 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_on.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - one.log +include_file_path: on diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_file_path_upper.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_upper.yaml new file mode 100644 index 000000000000..45e5622b441f --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_upper.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - one.log +include_file_path: TRUE diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_file_path_yes.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_yes.yaml new file mode 100644 index 000000000000..1b74a3e8f96f --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_file_path_yes.yaml @@ -0,0 +1,4 @@ +type: file_input +include: + - one.log +include_file_path: yes diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_glob.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_glob.yaml new file mode 100644 index 000000000000..b50dffaacd4f --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_glob.yaml @@ -0,0 +1,3 @@ +type: file_input +include: + - "*.log" diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_glob_double_asterisk.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_glob_double_asterisk.yaml new file mode 100644 index 000000000000..b1b0b3b259fa --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_glob_double_asterisk.yaml @@ -0,0 +1,3 @@ +type: file_input +include: + - "**.log" diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_glob_double_asterisk_nested.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_glob_double_asterisk_nested.yaml new file mode 100644 index 000000000000..574a5a146496 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_glob_double_asterisk_nested.yaml @@ -0,0 +1,3 @@ +type: file_input +include: + - "directory/**/*.log" diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_glob_double_asterisk_prefix.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_glob_double_asterisk_prefix.yaml new file mode 100644 index 000000000000..c4592a583334 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_glob_double_asterisk_prefix.yaml @@ -0,0 +1,3 @@ +type: file_input +include: + - "**/directory/**/*.log" diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_inline.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_inline.yaml new file mode 100644 index 000000000000..29cdbd0c55f9 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_inline.yaml @@ -0,0 +1,2 @@ +type: file_input +include: [ "a.log", "b.log" ] diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_invalid.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_invalid.yaml new file mode 100644 index 000000000000..2dd2ad7c9077 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_invalid.yaml @@ -0,0 +1,2 @@ +type: file_input +include: "justwords" diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_multi.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_multi.yaml new file mode 100644 index 000000000000..f3f0676f5d0e --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_multi.yaml @@ -0,0 +1,5 @@ +type: file_input +include: + - one.log + - two.log + - three.log diff --git a/pkg/stanza/internal/fileconsumer/testdata/include_one.yaml b/pkg/stanza/internal/fileconsumer/testdata/include_one.yaml new file mode 100644 index 000000000000..fa07bbd18230 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/include_one.yaml @@ -0,0 +1,3 @@ +type: file_input +include: + - one.log diff --git a/pkg/stanza/internal/fileconsumer/testdata/max_concurrent_large.yaml b/pkg/stanza/internal/fileconsumer/testdata/max_concurrent_large.yaml new file mode 100644 index 000000000000..fd99e549a406 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/max_concurrent_large.yaml @@ -0,0 +1,2 @@ +type: file_input +max_concurrent_files: 9223372036854775807 diff --git a/pkg/stanza/internal/fileconsumer/testdata/max_log_size_invalid_unit.yaml b/pkg/stanza/internal/fileconsumer/testdata/max_log_size_invalid_unit.yaml new file mode 100644 index 000000000000..bbcc2371e941 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/max_log_size_invalid_unit.yaml @@ -0,0 +1,2 @@ +type: file_input +max_log_size: 1TOFU diff --git a/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mb_lower.yaml b/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mb_lower.yaml new file mode 100644 index 000000000000..ae2c8295d1be --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mb_lower.yaml @@ -0,0 +1,2 @@ +type: file_input +max_log_size: 1mib diff --git a/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mb_upper.yaml b/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mb_upper.yaml new file mode 100644 index 000000000000..d38d20e6324b --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mb_upper.yaml @@ -0,0 +1,2 @@ +type: file_input +max_log_size: 1MiB diff --git a/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mib_lower.yaml b/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mib_lower.yaml new file mode 100644 index 000000000000..ae2c8295d1be --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mib_lower.yaml @@ -0,0 +1,2 @@ +type: file_input +max_log_size: 1mib diff --git a/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mib_upper.yaml b/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mib_upper.yaml new file mode 100644 index 000000000000..d38d20e6324b --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/max_log_size_mib_upper.yaml @@ -0,0 +1,2 @@ +type: file_input +max_log_size: 1MiB diff --git a/pkg/stanza/internal/fileconsumer/testdata/multiline_extra_field.yaml b/pkg/stanza/internal/fileconsumer/testdata/multiline_extra_field.yaml new file mode 100644 index 000000000000..26f3313bd4bb --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/multiline_extra_field.yaml @@ -0,0 +1,3 @@ +type: file_input +multiline: + that_random_field: "this should go nowhere" diff --git a/pkg/stanza/internal/fileconsumer/testdata/multiline_line_end_special.yaml b/pkg/stanza/internal/fileconsumer/testdata/multiline_line_end_special.yaml new file mode 100644 index 000000000000..d88927310051 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/multiline_line_end_special.yaml @@ -0,0 +1,3 @@ +type: file_input +multiline: + line_end_pattern: '%' diff --git a/pkg/stanza/internal/fileconsumer/testdata/multiline_line_end_string.yaml b/pkg/stanza/internal/fileconsumer/testdata/multiline_line_end_string.yaml new file mode 100644 index 000000000000..49ef6a31ca6f --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/multiline_line_end_string.yaml @@ -0,0 +1,3 @@ +type: file_input +multiline: + line_end_pattern: 'Start' diff --git a/pkg/stanza/internal/fileconsumer/testdata/multiline_line_start_special.yaml b/pkg/stanza/internal/fileconsumer/testdata/multiline_line_start_special.yaml new file mode 100644 index 000000000000..5567239b10c5 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/multiline_line_start_special.yaml @@ -0,0 +1,3 @@ +type: file_input +multiline: + line_start_pattern: '%' diff --git a/pkg/stanza/internal/fileconsumer/testdata/multiline_line_start_string.yaml b/pkg/stanza/internal/fileconsumer/testdata/multiline_line_start_string.yaml new file mode 100644 index 000000000000..bbe40fc32ba3 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/multiline_line_start_string.yaml @@ -0,0 +1,3 @@ +type: file_input +multiline: + line_start_pattern: 'Start' diff --git a/pkg/stanza/internal/fileconsumer/testdata/poll_interval_1000ms.yaml b/pkg/stanza/internal/fileconsumer/testdata/poll_interval_1000ms.yaml new file mode 100644 index 000000000000..e5c3c380df7a --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/poll_interval_1000ms.yaml @@ -0,0 +1,2 @@ +type: file_input +poll_interval: 1000ms diff --git a/pkg/stanza/internal/fileconsumer/testdata/poll_interval_1ms.yaml b/pkg/stanza/internal/fileconsumer/testdata/poll_interval_1ms.yaml new file mode 100644 index 000000000000..e524cab56fa5 --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/poll_interval_1ms.yaml @@ -0,0 +1,2 @@ +type: file_input +poll_interval: 1ms diff --git a/pkg/stanza/internal/fileconsumer/testdata/poll_interval_1s.yaml b/pkg/stanza/internal/fileconsumer/testdata/poll_interval_1s.yaml new file mode 100644 index 000000000000..9cea5ea7c62a --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/poll_interval_1s.yaml @@ -0,0 +1,2 @@ +type: file_input +poll_interval: 1s diff --git a/pkg/stanza/internal/fileconsumer/testdata/poll_interval_no_units.yaml b/pkg/stanza/internal/fileconsumer/testdata/poll_interval_no_units.yaml new file mode 100644 index 000000000000..a722aa844bae --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/poll_interval_no_units.yaml @@ -0,0 +1,2 @@ +type: file_input +poll_interval: 1 diff --git a/pkg/stanza/internal/fileconsumer/testdata/start_at_string.yaml b/pkg/stanza/internal/fileconsumer/testdata/start_at_string.yaml new file mode 100644 index 000000000000..e47a2b8ab4ae --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/testdata/start_at_string.yaml @@ -0,0 +1,2 @@ +type: file_input +start_at: "beginning" diff --git a/pkg/stanza/internal/fileconsumer/util_test.go b/pkg/stanza/internal/fileconsumer/util_test.go new file mode 100644 index 000000000000..14d19efcfdce --- /dev/null +++ b/pkg/stanza/internal/fileconsumer/util_test.go @@ -0,0 +1,187 @@ +// 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 fileconsumer + +import ( + "context" + "fmt" + "io/ioutil" + "log" + "math/rand" + "os" + "path/filepath" + "testing" + "time" + + "github.com/observiq/nanojack" + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" +) + +func newDefaultConfig(tempDir string) *Config { + cfg := NewConfig() + cfg.PollInterval = helper.Duration{Duration: 200 * time.Millisecond} + cfg.StartAt = "beginning" + cfg.Include = []string{fmt.Sprintf("%s/*", tempDir)} + return cfg +} + +func emitOnChan(received chan []byte) EmitFunc { + return func(_ context.Context, _ *FileAttributes, token []byte) { + received <- token + } +} + +type emitParams struct { + attrs *FileAttributes + token []byte +} + +func newTestScenario(t *testing.T, cfgMod func(*Config)) (*Input, chan *emitParams, string) { + emitChan := make(chan *emitParams, 100) + input, tempDir := newTestScenarioWithChan(t, cfgMod, emitChan) + return input, emitChan, tempDir +} + +func newTestScenarioWithChan(t *testing.T, cfgMod func(*Config), emitChan chan *emitParams) (*Input, string) { + tempDir := t.TempDir() + cfg := newDefaultConfig(tempDir) + if cfgMod != nil { + cfgMod(cfg) + } + + input, err := cfg.Build(testutil.Logger(t), func(_ context.Context, attrs *FileAttributes, token []byte) { + emitChan <- &emitParams{attrs, token} + }) + require.NoError(t, err) + + return input, tempDir +} + +func openFile(tb testing.TB, path string) *os.File { + file, err := os.OpenFile(path, os.O_CREATE|os.O_RDWR, 0600) + require.NoError(tb, err) + tb.Cleanup(func() { _ = file.Close() }) + return file +} + +func openTemp(t testing.TB, tempDir string) *os.File { + return openTempWithPattern(t, tempDir, "") +} + +func reopenTemp(t testing.TB, name string) *os.File { + return openTempWithPattern(t, filepath.Dir(name), filepath.Base(name)) +} + +func openTempWithPattern(t testing.TB, tempDir, pattern string) *os.File { + file, err := ioutil.TempFile(tempDir, pattern) + require.NoError(t, err) + t.Cleanup(func() { _ = file.Close() }) + return file +} + +func getRotatingLogger(t testing.TB, tempDir string, maxLines, maxBackups int, copyTruncate, sequential bool) *log.Logger { + file, err := ioutil.TempFile(tempDir, "") + require.NoError(t, err) + require.NoError(t, file.Close()) // will be managed by rotator + + rotator := nanojack.Logger{ + Filename: file.Name(), + MaxLines: maxLines, + MaxBackups: maxBackups, + CopyTruncate: copyTruncate, + Sequential: sequential, + } + + t.Cleanup(func() { _ = rotator.Close() }) + + return log.New(&rotator, "", 0) +} + +func writeString(t testing.TB, file *os.File, s string) { + _, err := file.WriteString(s) + require.NoError(t, err) +} + +func tokenWithLength(length int) []byte { + charset := "abcdefghijklmnopqrstuvwxyz" + b := make([]byte, length) + for i := range b { + b[i] = charset[rand.Intn(len(charset))] + } + return b +} + +func waitForEmit(t *testing.T, c chan *emitParams) *emitParams { + select { + case call := <-c: + return call + case <-time.After(3 * time.Second): + require.FailNow(t, "Timed out waiting for message") + return nil + } +} + +func waitForNTokens(t *testing.T, c chan *emitParams, n int) [][]byte { + emitChan := make([][]byte, 0, n) + for i := 0; i < n; i++ { + select { + case call := <-c: + emitChan = append(emitChan, call.token) + case <-time.After(3 * time.Second): + require.FailNow(t, "Timed out waiting for message") + return nil + } + } + return emitChan +} + +func waitForToken(t *testing.T, c chan *emitParams, expected []byte) { + select { + case call := <-c: + require.Equal(t, expected, call.token) + case <-time.After(3 * time.Second): + require.FailNow(t, "Timed out waiting for token", expected) + } +} + +func waitForTokens(t *testing.T, c chan *emitParams, expected [][]byte) { + actual := make([][]byte, 0, len(expected)) +LOOP: + for { + select { + case call := <-c: + actual = append(actual, call.token) + case <-time.After(3 * time.Second): + break LOOP + } + } + + require.ElementsMatch(t, expected, actual) +} + +func expectNoTokens(t *testing.T, c chan *emitParams) { + expectNoTokensUntil(t, c, 200*time.Millisecond) +} + +func expectNoTokensUntil(t *testing.T, c chan *emitParams, d time.Duration) { + select { + case token := <-c: + require.FailNow(t, "Received unexpected message", "Message: %s", token) + case <-time.After(d): + } +} diff --git a/pkg/stanza/operator/config.go b/pkg/stanza/operator/config.go index 0adbce22e15c..ab2bb8a07025 100644 --- a/pkg/stanza/operator/config.go +++ b/pkg/stanza/operator/config.go @@ -55,7 +55,7 @@ func (c *Config) UnmarshalJSON(bytes []byte) error { builder := builderFunc() if err := json.Unmarshal(bytes, builder); err != nil { - return fmt.Errorf("unmarshal to %s: %s", typeUnmarshaller.Type, err) + return fmt.Errorf("unmarshal to %s: %w", typeUnmarshaller.Type, err) } c.Builder = builder @@ -72,7 +72,7 @@ func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error { rawConfig := map[string]interface{}{} err := unmarshal(&rawConfig) if err != nil { - return fmt.Errorf("failed to unmarshal yaml to base config: %s", err) + return fmt.Errorf("failed to unmarshal yaml to base config: %w", err) } typeInterface, ok := rawConfig["type"] @@ -92,7 +92,7 @@ func (c *Config) UnmarshalYAML(unmarshal func(interface{}) error) error { builder := builderFunc() if err = unmarshal(builder); err != nil { - return fmt.Errorf("unmarshal to %s: %s", typeString, err) + return fmt.Errorf("unmarshal to %s: %w", typeString, err) } c.Builder = builder diff --git a/pkg/stanza/operator/helper/attributer_test.go b/pkg/stanza/operator/helper/attributer_test.go index c95057e6fdb5..cad80591129f 100644 --- a/pkg/stanza/operator/helper/attributer_test.go +++ b/pkg/stanza/operator/helper/attributer_test.go @@ -15,7 +15,6 @@ package helper import ( - "os" "testing" "github.com/stretchr/testify/require" @@ -24,8 +23,7 @@ import ( ) func TestAttributer(t *testing.T) { - os.Setenv("TEST_METADATA_OPERATOR_ENV", "foo") - defer os.Unsetenv("TEST_METADATA_OPERATOR_ENV") + t.Setenv("TEST_METADATA_OPERATOR_ENV", "foo") cases := []struct { name string diff --git a/pkg/stanza/operator/helper/bytesize.go b/pkg/stanza/operator/helper/bytesize.go index affe98acf082..4aa8961b7d0a 100644 --- a/pkg/stanza/operator/helper/bytesize.go +++ b/pkg/stanza/operator/helper/bytesize.go @@ -59,7 +59,7 @@ func (h *ByteSize) unmarshalShared(unmarshal func(interface{}) error) error { var stringType string if err := unmarshal(&stringType); err != nil { - return fmt.Errorf("failed to unmarshal to int64, float64, or string: %s", err) + return fmt.Errorf("failed to unmarshal to int64, float64, or string: %w", err) } matches := byteSizeRegex.FindStringSubmatch(stringType) diff --git a/pkg/stanza/operator/helper/encoding.go b/pkg/stanza/operator/helper/encoding.go index 47993f16a325..f8a74e8d5121 100644 --- a/pkg/stanza/operator/helper/encoding.go +++ b/pkg/stanza/operator/helper/encoding.go @@ -15,6 +15,7 @@ package helper // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" import ( + "errors" "fmt" "strings" @@ -63,11 +64,11 @@ func (e *Encoding) Decode(msgBuf []byte) (string, error) { if err == nil { return string(decodeBuffer[:nDst]), nil } - if err == transform.ErrShortDst { + if errors.Is(err, transform.ErrShortDst) { decodeBuffer = make([]byte, len(decodeBuffer)*2) continue } - return "", fmt.Errorf("transform encoding: %s", err) + return "", fmt.Errorf("transform encoding: %w", err) } } diff --git a/pkg/stanza/operator/helper/expr_string_test.go b/pkg/stanza/operator/helper/expr_string_test.go index 541d1f6fb570..0ad6c6a103c0 100644 --- a/pkg/stanza/operator/helper/expr_string_test.go +++ b/pkg/stanza/operator/helper/expr_string_test.go @@ -15,7 +15,6 @@ package helper import ( - "os" "strconv" "testing" @@ -25,8 +24,7 @@ import ( ) func TestExprString(t *testing.T) { - os.Setenv("TEST_EXPR_STRING_ENV", "foo") - defer os.Unsetenv("TEST_EXPR_STRING_ENV") + t.Setenv("TEST_EXPR_STRING_ENV", "foo") exampleEntry := func() *entry.Entry { e := entry.New() diff --git a/pkg/stanza/operator/helper/identifier_test.go b/pkg/stanza/operator/helper/identifier_test.go index 7e796c25cd8c..a723a92e8614 100644 --- a/pkg/stanza/operator/helper/identifier_test.go +++ b/pkg/stanza/operator/helper/identifier_test.go @@ -15,7 +15,6 @@ package helper import ( - "os" "testing" "github.com/stretchr/testify/require" @@ -24,8 +23,7 @@ import ( ) func TestIdentifier(t *testing.T) { - os.Setenv("TEST_METADATA_OPERATOR_ENV", "foo") - defer os.Unsetenv("TEST_METADATA_OPERATOR_ENV") + t.Setenv("TEST_METADATA_OPERATOR_ENV", "foo") cases := []struct { name string diff --git a/pkg/stanza/operator/helper/multiline.go b/pkg/stanza/operator/helper/multiline.go index 8b301018aba5..f30a272ee6b5 100644 --- a/pkg/stanza/operator/helper/multiline.go +++ b/pkg/stanza/operator/helper/multiline.go @@ -166,13 +166,13 @@ func (c MultilineConfig) getSplitFunc(encodingVar encoding.Encoding, flushAtEOF case endPattern != "": re, err := regexp.Compile("(?m)" + c.LineEndPattern) if err != nil { - return nil, fmt.Errorf("compile line end regex: %s", err) + return nil, fmt.Errorf("compile line end regex: %w", err) } splitFunc = NewLineEndSplitFunc(re, flushAtEOF) case startPattern != "": re, err := regexp.Compile("(?m)" + c.LineStartPattern) if err != nil { - return nil, fmt.Errorf("compile line start regex: %s", err) + return nil, fmt.Errorf("compile line start regex: %w", err) } splitFunc = NewLineStartSplitFunc(re, flushAtEOF) default: diff --git a/pkg/stanza/operator/helper/multiline_test.go b/pkg/stanza/operator/helper/multiline_test.go index 34b78d12aafb..7ab820968a43 100644 --- a/pkg/stanza/operator/helper/multiline_test.go +++ b/pkg/stanza/operator/helper/multiline_test.go @@ -19,6 +19,7 @@ import ( "bytes" "errors" "fmt" + "io" "regexp" "testing" "time" @@ -29,27 +30,102 @@ import ( "golang.org/x/text/encoding/unicode" ) +const ( + // Those values has been experimentally figured out for windows + sleepDuration time.Duration = time.Millisecond * 80 + forcePeriod time.Duration = time.Millisecond * 40 +) + +// state is going to keep processing state of the reader +type state struct { + ReadFrom int + Processed int +} + +// reader is a reader which keeps state of readed and processed data +type reader struct { + State *state + Data []byte +} + +// newReader creates reader with empty state +func newReader(data []byte) reader { + return reader{ + State: &state{ + ReadFrom: 0, + Processed: 0, + }, + Data: data, + } +} + +// Read reads data from reader and remebers where reading has been finished +func (r reader) Read(p []byte) (n int, err error) { + // return eof if data has been fully readed + if len(r.Data)-r.State.ReadFrom == 0 { + return 0, io.EOF + } + + // iterate over data char by char and write into p + // until p is full or no more data left to read + i := 0 + for ; i < len(r.Data)-r.State.ReadFrom; i++ { + if i == len(p) { + break + } + p[i] = r.Data[r.State.ReadFrom+i] + } + + // update state + r.State.ReadFrom += i + return i, nil +} + +// Reset resets reader state (sets last readed position to last processed position) +func (r *reader) Reset() { + r.State.ReadFrom = r.State.Processed +} + +func (r *reader) SplitFunc(splitFunc bufio.SplitFunc) bufio.SplitFunc { + return func(data []byte, atEOF bool) (advance int, token []byte, err error) { + advance, token, err = splitFunc(data, atEOF) + r.State.Processed += advance + return + } +} + type tokenizerTestCase struct { - Name string - Pattern string - Raw []byte - ExpectedTokenized []string - ExpectedError error - Flusher *Flusher + Name string + Pattern string + Raw []byte + ExpectedTokenized []string + ExpectedError error + Flusher *Flusher + Sleep time.Duration + AdditionalIterations int } func (tc tokenizerTestCase) RunFunc(splitFunc bufio.SplitFunc) func(t *testing.T) { + reader := newReader(tc.Raw) + return func(t *testing.T) { - scanner := bufio.NewScanner(bytes.NewReader(tc.Raw)) - scanner.Split(splitFunc) tokenized := make([]string, 0) - for { - ok := scanner.Scan() - if !ok { - assert.Equal(t, tc.ExpectedError, scanner.Err()) - break + for i := 0; i < 1+tc.AdditionalIterations; i++ { + // sleep before next iterations + if i > 0 { + time.Sleep(tc.Sleep) + } + reader.Reset() + scanner := bufio.NewScanner(reader) + scanner.Split(reader.SplitFunc(splitFunc)) + for { + ok := scanner.Scan() + if !ok { + assert.Equal(t, tc.ExpectedError, scanner.Err()) + break + } + tokenized = append(tokenized, scanner.Text()) } - tokenized = append(tokenized, scanner.Text()) } assert.Equal(t, tc.ExpectedTokenized, tokenized) @@ -160,26 +236,37 @@ func TestLineStartSplitFunc(t *testing.T) { "LOGPART log1\nLOGPART log1", }, Flusher: &Flusher{ - // We assume than in previous iteration we had same data length - previousDataLength: len("LOGPART log1\nLOGPART log1\t \n"), - lastDataChange: time.Unix(0, 0), - forcePeriod: time.Second, + forcePeriod: forcePeriod, }, + AdditionalIterations: 1, + Sleep: sleepDuration, }, { Name: "LogsWithFlusherWithMultipleLogsInBuffer", Pattern: `^LOGSTART \d+`, Raw: []byte("LOGPART log1\nLOGSTART 123\nLOGPART log1\t \n"), ExpectedTokenized: []string{ - // We expect all logs except last one, as it will be flushed in next iteration + "LOGPART log1", + "LOGSTART 123\nLOGPART log1", + }, + Flusher: &Flusher{ + forcePeriod: forcePeriod, + }, + AdditionalIterations: 1, + Sleep: sleepDuration, + }, + { + Name: "LogsWithLongFlusherWithMultipleLogsInBuffer", + Pattern: `^LOGSTART \d+`, + Raw: []byte("LOGPART log1\nLOGSTART 123\nLOGPART log1\t \n"), + ExpectedTokenized: []string{ "LOGPART log1", }, Flusher: &Flusher{ - forcePeriod: time.Second, - lastDataChange: time.Unix(0, 0), - // Assume this is next iteration with that data - previousDataLength: len("LOGPART log1\nLOGSTART 123\nLOGPART log1\t \n"), + forcePeriod: forcePeriod * 16, }, + AdditionalIterations: 1, + Sleep: forcePeriod / 4, }, { Name: "LogsWithFlusherWithLogStartingWithWhiteChars", @@ -189,11 +276,10 @@ func TestLineStartSplitFunc(t *testing.T) { "LOGSTART 333", }, Flusher: &Flusher{ - forcePeriod: time.Second, - lastDataChange: time.Unix(0, 0), - // assume this is next iteration with this log - previousDataLength: len("\nLOGSTART 333"), + forcePeriod: forcePeriod, }, + AdditionalIterations: 1, + Sleep: sleepDuration, }, } @@ -328,25 +414,37 @@ func TestLineEndSplitFunc(t *testing.T) { "LOGPART log1\nLOGPART log1", }, Flusher: &Flusher{ - previousDataLength: len("LOGPART log1\nLOGPART log1"), - lastDataChange: time.Unix(0, 0), - forcePeriod: time.Second, + forcePeriod: forcePeriod, }, + AdditionalIterations: 1, + Sleep: sleepDuration, }, { Name: "LogsWithFlusherWithMultipleLogsInBuffer", Pattern: `^LOGEND.*$`, Raw: []byte("LOGPART log1\nLOGEND\nLOGPART log1\t \n"), ExpectedTokenized: []string{ - // We expect to get all logs except last one which will be returned eventually in next scanning + "LOGPART log1\nLOGEND", + "LOGPART log1", + }, + Flusher: &Flusher{ + forcePeriod: forcePeriod, + }, + AdditionalIterations: 1, + Sleep: sleepDuration, + }, + { + Name: "LogsWithLongFlusherWithMultipleLogsInBuffer", + Pattern: `^LOGEND.*$`, + Raw: []byte("LOGPART log1\nLOGEND\nLOGPART log1\t \n"), + ExpectedTokenized: []string{ "LOGPART log1\nLOGEND", }, Flusher: &Flusher{ - forcePeriod: time.Second, - lastDataChange: time.Unix(0, 0), - // Assume this is next iteration with that data - previousDataLength: len("LOGPART log1\nLOGEND\nLOGPART log1\t \n"), + forcePeriod: forcePeriod * 16, }, + AdditionalIterations: 1, + Sleep: forcePeriod / 4, }, { Name: "LogsWithFlusherWithLogStartingWithWhiteChars", @@ -356,10 +454,10 @@ func TestLineEndSplitFunc(t *testing.T) { "LOGEND 333", }, Flusher: &Flusher{ - forcePeriod: time.Second, - lastDataChange: time.Unix(0, 0), - previousDataLength: -1, + forcePeriod: forcePeriod, }, + AdditionalIterations: 1, + Sleep: sleepDuration, }, } @@ -456,11 +554,10 @@ func TestNewlineSplitFunc(t *testing.T) { "LOGPART log1", }, Flusher: &Flusher{ - // Assume same data length in previous iteration - previousDataLength: len("LOGPART log1"), - lastDataChange: time.Unix(0, 0), - forcePeriod: time.Second, + forcePeriod: forcePeriod, }, + AdditionalIterations: 1, + Sleep: sleepDuration, }, { Name: "DefaultFlusherSplits", diff --git a/pkg/stanza/operator/helper/operatortest/operatortest.go b/pkg/stanza/operator/helper/operatortest/operatortest.go index 7eeffe345f68..05f242e6bcfb 100644 --- a/pkg/stanza/operator/helper/operatortest/operatortest.go +++ b/pkg/stanza/operator/helper/operatortest/operatortest.go @@ -37,10 +37,10 @@ type ConfigUnmarshalTest struct { func configFromFileViaYaml(file string, config interface{}) error { bytes, err := ioutil.ReadFile(file) // #nosec - configs load based on user specified directory if err != nil { - return fmt.Errorf("could not find config file: %s", err) + return fmt.Errorf("could not find config file: %w", err) } if err := yaml.Unmarshal(bytes, config); err != nil { - return fmt.Errorf("failed to read config file as yaml: %s", err) + return fmt.Errorf("failed to read config file as yaml: %w", err) } return nil @@ -49,13 +49,13 @@ func configFromFileViaYaml(file string, config interface{}) error { func configFromFileViaMapstructure(file string, config interface{}) error { bytes, err := ioutil.ReadFile(file) // #nosec - configs load based on user specified directory if err != nil { - return fmt.Errorf("could not find config file: %s", err) + return fmt.Errorf("could not find config file: %w", err) } raw := map[string]interface{}{} if err = yaml.Unmarshal(bytes, raw); err != nil { - return fmt.Errorf("failed to read data from yaml: %s", err) + return fmt.Errorf("failed to read data from yaml: %w", err) } dc := &mapstructure.DecoderConfig{Result: config, DecodeHook: helper.JSONUnmarshalerHook()} diff --git a/pkg/stanza/operator/helper/scope_name_test.go b/pkg/stanza/operator/helper/scope_name_test.go index 856d8b81f15b..0d0e41870a39 100644 --- a/pkg/stanza/operator/helper/scope_name_test.go +++ b/pkg/stanza/operator/helper/scope_name_test.go @@ -22,7 +22,7 @@ import ( "time" "github.com/stretchr/testify/require" - yaml "gopkg.in/yaml.v2" + "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" ) @@ -157,13 +157,13 @@ func TestGoldenScopeNameParserConfig(t *testing.T) { func ScopeConfigFromFileViaYaml(file string) (*ScopeNameParser, error) { bytes, err := ioutil.ReadFile(file) if err != nil { - return nil, fmt.Errorf("could not find config file: %s", err) + return nil, fmt.Errorf("could not find config file: %w", err) } parser := NewScopeNameParser() config := &parser if err := yaml.Unmarshal(bytes, config); err != nil { - return nil, fmt.Errorf("failed to read config file as yaml: %s", err) + return nil, fmt.Errorf("failed to read config file as yaml: %w", err) } return config, nil @@ -172,13 +172,13 @@ func ScopeConfigFromFileViaYaml(file string) (*ScopeNameParser, error) { func ScopeConfigFromFileViaMapstructure(file string, result *ScopeNameParser) error { bytes, err := ioutil.ReadFile(file) if err != nil { - return fmt.Errorf("could not find config file: %s", err) + return fmt.Errorf("could not find config file: %w", err) } raw := map[string]interface{}{} if err = yaml.Unmarshal(bytes, raw); err != nil { - return fmt.Errorf("failed to read data from yaml: %s", err) + return fmt.Errorf("failed to read data from yaml: %w", err) } err = UnmarshalMapstructure(raw, result) diff --git a/pkg/stanza/operator/helper/severity_test.go b/pkg/stanza/operator/helper/severity_test.go index 8385877c1159..f86372783355 100644 --- a/pkg/stanza/operator/helper/severity_test.go +++ b/pkg/stanza/operator/helper/severity_test.go @@ -22,7 +22,7 @@ import ( "testing" "github.com/stretchr/testify/require" - yaml "gopkg.in/yaml.v2" + "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" @@ -557,12 +557,12 @@ func TestGoldenSeverityParserConfig(t *testing.T) { func severityConfigFromFileViaYaml(file string) (*Config, error) { bytes, err := ioutil.ReadFile(file) if err != nil { - return nil, fmt.Errorf("could not find config file: %s", err) + return nil, fmt.Errorf("could not find config file: %w", err) } config := defaultSeverityCfg() if err := yaml.Unmarshal(bytes, config); err != nil { - return nil, fmt.Errorf("failed to read config file as yaml: %s", err) + return nil, fmt.Errorf("failed to read config file as yaml: %w", err) } return config, nil @@ -571,13 +571,13 @@ func severityConfigFromFileViaYaml(file string) (*Config, error) { func severityConfigFromFileViaMapstructure(file string, result *Config) error { bytes, err := ioutil.ReadFile(file) if err != nil { - return fmt.Errorf("could not find config file: %s", err) + return fmt.Errorf("could not find config file: %w", err) } raw := map[string]interface{}{} if err = yaml.Unmarshal(bytes, raw); err != nil { - return fmt.Errorf("failed to read data from yaml: %s", err) + return fmt.Errorf("failed to read data from yaml: %w", err) } err = UnmarshalMapstructure(raw, result) diff --git a/pkg/stanza/operator/helper/time_test.go b/pkg/stanza/operator/helper/time_test.go index 5a0c73da0731..012a2b1015fb 100644 --- a/pkg/stanza/operator/helper/time_test.go +++ b/pkg/stanza/operator/helper/time_test.go @@ -23,7 +23,7 @@ import ( "time" "github.com/stretchr/testify/require" - yaml "gopkg.in/yaml.v2" + "gopkg.in/yaml.v2" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" ) @@ -699,12 +699,12 @@ func TestGoldenTimeParserConfig(t *testing.T) { func timeConfigFromFileViaYaml(file string) (*TimeParser, error) { bytes, err := ioutil.ReadFile(file) if err != nil { - return nil, fmt.Errorf("could not find config file: %s", err) + return nil, fmt.Errorf("could not find config file: %w", err) } config := defaultTimeCfg() if err := yaml.Unmarshal(bytes, config); err != nil { - return nil, fmt.Errorf("failed to read config file as yaml: %s", err) + return nil, fmt.Errorf("failed to read config file as yaml: %w", err) } return config, nil @@ -713,13 +713,13 @@ func timeConfigFromFileViaYaml(file string) (*TimeParser, error) { func timeConfigFromFileViaMapstructure(file string, result *TimeParser) error { bytes, err := ioutil.ReadFile(file) if err != nil { - return fmt.Errorf("could not find config file: %s", err) + return fmt.Errorf("could not find config file: %w", err) } raw := map[string]interface{}{} if err = yaml.Unmarshal(bytes, raw); err != nil { - return fmt.Errorf("failed to read data from yaml: %s", err) + return fmt.Errorf("failed to read data from yaml: %w", err) } err = UnmarshalMapstructure(raw, result) diff --git a/pkg/stanza/operator/helper/transformer.go b/pkg/stanza/operator/helper/transformer.go index e037b15ee5ea..0adcfae582f0 100644 --- a/pkg/stanza/operator/helper/transformer.go +++ b/pkg/stanza/operator/helper/transformer.go @@ -124,7 +124,7 @@ func (t *TransformerOperator) Skip(ctx context.Context, entry *entry.Entry) (boo matches, err := vm.Run(t.IfExpr, env) if err != nil { - return false, fmt.Errorf("running if expr: %s", err) + return false, fmt.Errorf("running if expr: %w", err) } return !matches.(bool), nil diff --git a/pkg/stanza/operator/input/file/benchmark_test.go b/pkg/stanza/operator/input/file/benchmark_test.go index 433dd50ae4a2..32260f8eae8e 100644 --- a/pkg/stanza/operator/input/file/benchmark_test.go +++ b/pkg/stanza/operator/input/file/benchmark_test.go @@ -21,6 +21,7 @@ import ( "github.com/stretchr/testify/require" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/testutil" ) @@ -120,7 +121,7 @@ func BenchmarkFileInput(b *testing.B) { cfg.Include = []string{ "file*.log", } - cfg.FingerprintSize = 10 * defaultFingerprintSize + cfg.FingerprintSize = 10 * fileconsumer.DefaultFingerprintSize return cfg }, }, @@ -134,7 +135,7 @@ func BenchmarkFileInput(b *testing.B) { cfg.Include = []string{ "file*.log", } - cfg.FingerprintSize = defaultFingerprintSize / 10 + cfg.FingerprintSize = fileconsumer.DefaultFingerprintSize / 10 return cfg }, }, diff --git a/pkg/stanza/operator/input/file/config.go b/pkg/stanza/operator/input/file/config.go index 91a20eeff56f..ca270d37f0e9 100644 --- a/pkg/stanza/operator/input/file/config.go +++ b/pkg/stanza/operator/input/file/config.go @@ -15,13 +15,10 @@ package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file" import ( - "fmt" - "time" - - "github.com/bmatcuk/doublestar/v3" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" ) @@ -30,45 +27,18 @@ func init() { operator.Register("file_input", func() operator.Builder { return NewConfig("") }) } -const ( - defaultMaxLogSize = 1024 * 1024 - defaultMaxConcurrentFiles = 1024 -) - // NewConfig creates a new input config with default values func NewConfig(operatorID string) *Config { return &Config{ - InputConfig: helper.NewInputConfig(operatorID, "file_input"), - PollInterval: helper.Duration{Duration: 200 * time.Millisecond}, - IncludeFileName: true, - IncludeFilePath: false, - IncludeFileNameResolved: false, - IncludeFilePathResolved: false, - Splitter: helper.NewSplitterConfig(), - StartAt: "end", - FingerprintSize: defaultFingerprintSize, - MaxLogSize: defaultMaxLogSize, - MaxConcurrentFiles: defaultMaxConcurrentFiles, - Encoding: helper.NewEncodingConfig(), + InputConfig: helper.NewInputConfig(operatorID, "file_input"), + Config: *fileconsumer.NewConfig(), } } // Config is the configuration of a file input operator type Config struct { - helper.InputConfig `mapstructure:",squash" yaml:",inline"` - Finder `mapstructure:",squash" yaml:",inline"` - - PollInterval helper.Duration `mapstructure:"poll_interval,omitempty" json:"poll_interval,omitempty" yaml:"poll_interval,omitempty"` - IncludeFileName bool `mapstructure:"include_file_name,omitempty" json:"include_file_name,omitempty" yaml:"include_file_name,omitempty"` - IncludeFilePath bool `mapstructure:"include_file_path,omitempty" json:"include_file_path,omitempty" yaml:"include_file_path,omitempty"` - IncludeFileNameResolved bool `mapstructure:"include_file_name_resolved,omitempty" json:"include_file_name_resolved,omitempty" yaml:"include_file_name_resolved,omitempty"` - IncludeFilePathResolved bool `mapstructure:"include_file_path_resolved,omitempty" json:"include_file_path_resolved,omitempty" yaml:"include_file_path_resolved,omitempty"` - StartAt string `mapstructure:"start_at,omitempty" json:"start_at,omitempty" yaml:"start_at,omitempty"` - FingerprintSize helper.ByteSize `mapstructure:"fingerprint_size,omitempty" json:"fingerprint_size,omitempty" yaml:"fingerprint_size,omitempty"` - MaxLogSize helper.ByteSize `mapstructure:"max_log_size,omitempty" json:"max_log_size,omitempty" yaml:"max_log_size,omitempty"` - MaxConcurrentFiles int `mapstructure:"max_concurrent_files,omitempty" json:"max_concurrent_files,omitempty" yaml:"max_concurrent_files,omitempty"` - Encoding helper.EncodingConfig `mapstructure:",squash,omitempty" json:",inline,omitempty" yaml:",inline,omitempty"` - Splitter helper.SplitterConfig `mapstructure:",squash,omitempty" json:",inline,omitempty" yaml:",inline,omitempty"` + helper.InputConfig `mapstructure:",squash" yaml:",inline"` + fileconsumer.Config `mapstructure:",squash" yaml:",inline"` } // Build will build a file input operator from the supplied configuration @@ -78,61 +48,6 @@ func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { return nil, err } - if len(c.Include) == 0 { - return nil, fmt.Errorf("required argument `include` is empty") - } - - // Ensure includes can be parsed as globs - for _, include := range c.Include { - _, err = doublestar.PathMatch(include, "matchstring") - if err != nil { - return nil, fmt.Errorf("parse include glob: %s", err) - } - } - - // Ensure excludes can be parsed as globs - for _, exclude := range c.Exclude { - _, err = doublestar.PathMatch(exclude, "matchstring") - if err != nil { - return nil, fmt.Errorf("parse exclude glob: %s", err) - } - } - - if c.MaxLogSize <= 0 { - return nil, fmt.Errorf("`max_log_size` must be positive") - } - - if c.MaxConcurrentFiles <= 1 { - return nil, fmt.Errorf("`max_concurrent_files` must be greater than 1") - } - - if c.FingerprintSize == 0 { - c.FingerprintSize = defaultFingerprintSize - } else if c.FingerprintSize < minFingerprintSize { - return nil, fmt.Errorf("`fingerprint_size` must be at least %d bytes", minFingerprintSize) - } - - encoding, err := c.Encoding.Build() - if err != nil { - return nil, err - } - - // Ensure that multiline is buildable - _, err = c.Splitter.Build(encoding.Encoding, false, int(c.MaxLogSize)) - if err != nil { - return nil, err - } - - var startAtBeginning bool - switch c.StartAt { - case "beginning": - startAtBeginning = true - case "end": - startAtBeginning = false - default: - return nil, fmt.Errorf("invalid start_at location '%s'", c.StartAt) - } - fileNameField := entry.NewNilField() if c.IncludeFileName { fileNameField = entry.NewAttributeField("log.file.name") @@ -153,25 +68,18 @@ func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { filePathResolvedField = entry.NewAttributeField("log.file.path_resolved") } - return &Input{ + input := &Input{ InputOperator: inputOperator, - finder: c.Finder, - PollInterval: c.PollInterval.Raw(), FilePathField: filePathField, FileNameField: fileNameField, FilePathResolvedField: filePathResolvedField, FileNameResolvedField: fileNameResolvedField, - startAtBeginning: startAtBeginning, - Splitter: c.Splitter, - queuedMatches: make([]string, 0), - encoding: encoding, - firstCheck: true, - cancel: func() {}, - knownFiles: make([]*Reader, 0, 10), - roller: newRoller(), - fingerprintSize: int(c.FingerprintSize), - MaxLogSize: int(c.MaxLogSize), - MaxConcurrentFiles: c.MaxConcurrentFiles, - SeenPaths: make(map[string]struct{}, 100), - }, nil + } + + input.fileConsumer, err = c.Config.Build(logger, input.emit) + if err != nil { + return nil, err + } + + return input, nil } diff --git a/pkg/stanza/operator/input/file/config_test.go b/pkg/stanza/operator/input/file/config_test.go index 9c1bc10cbbf2..0774d9dd6955 100644 --- a/pkg/stanza/operator/input/file/config_test.go +++ b/pkg/stanza/operator/input/file/config_test.go @@ -539,10 +539,8 @@ func TestBuild(t *testing.T) { require.NoError, func(t *testing.T, f *Input) { require.Equal(t, f.OutputOperators[0], fakeOutput) - require.Equal(t, f.finder.Include, []string{"/var/log/testpath.*"}) require.Equal(t, f.FilePathField, entry.NewNilField()) require.Equal(t, f.FileNameField, entry.NewAttributeField("log.file.name")) - require.Equal(t, f.PollInterval, 10*time.Millisecond) }, }, { diff --git a/pkg/stanza/operator/input/file/file.go b/pkg/stanza/operator/input/file/file.go index 872645bd169e..72eaadbda217 100644 --- a/pkg/stanza/operator/input/file/file.go +++ b/pkg/stanza/operator/input/file/file.go @@ -15,17 +15,12 @@ package file // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/file" import ( - "bytes" "context" - "encoding/json" - "fmt" - "os" - "sync" - "time" - "go.uber.org/zap" + "golang.org/x/text/encoding" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/entry" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/internal/fileconsumer" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/helper" ) @@ -34,333 +29,63 @@ import ( type Input struct { helper.InputOperator - finder Finder + fileConsumer *fileconsumer.Input + FilePathField entry.Field FileNameField entry.Field FilePathResolvedField entry.Field FileNameResolvedField entry.Field - PollInterval time.Duration - Splitter helper.SplitterConfig - MaxLogSize int - MaxConcurrentFiles int - SeenPaths map[string]struct{} - - persister operator.Persister - - knownFiles []*Reader - queuedMatches []string - maxBatchFiles int - roller roller - - startAtBeginning bool - - fingerprintSize int - - encoding helper.Encoding - - wg sync.WaitGroup - firstCheck bool - cancel context.CancelFunc } // Start will start the file monitoring process func (f *Input) Start(persister operator.Persister) error { - ctx, cancel := context.WithCancel(context.Background()) - f.cancel = cancel - f.firstCheck = true - - f.persister = persister - - // Load offsets from disk - if err := f.loadLastPollFiles(ctx); err != nil { - return fmt.Errorf("read known files from database: %s", err) - } - - // Start polling goroutine - f.startPoller(ctx) - - return nil + return f.fileConsumer.Start(persister) } // Stop will stop the file monitoring process func (f *Input) Stop() error { - f.cancel() - f.wg.Wait() - f.roller.cleanup() - for _, reader := range f.knownFiles { - reader.Close() - } - f.knownFiles = nil - f.cancel = nil - return nil + return f.fileConsumer.Stop() } -// startPoller kicks off a goroutine that will poll the filesystem periodically, -// checking if there are new files or new logs in the watched files -func (f *Input) startPoller(ctx context.Context) { - f.wg.Add(1) - go func() { - defer f.wg.Done() - globTicker := time.NewTicker(f.PollInterval) - defer globTicker.Stop() - - for { - select { - case <-ctx.Done(): - return - case <-globTicker.C: - } - - f.poll(ctx) - } - }() -} - -// poll checks all the watched paths for new entries -func (f *Input) poll(ctx context.Context) { - f.maxBatchFiles = f.MaxConcurrentFiles / 2 - var matches []string - if len(f.queuedMatches) > f.maxBatchFiles { - matches, f.queuedMatches = f.queuedMatches[:f.maxBatchFiles], f.queuedMatches[f.maxBatchFiles:] - } else { - if len(f.queuedMatches) > 0 { - matches, f.queuedMatches = f.queuedMatches, make([]string, 0) - } else { - // Increment the generation on all known readers - // This is done here because the next generation is about to start - for i := 0; i < len(f.knownFiles); i++ { - f.knownFiles[i].generation++ - } - - // Get the list of paths on disk - matches = f.finder.FindFiles() - if f.firstCheck && len(matches) == 0 { - f.Warnw("no files match the configured include patterns", - "include", f.finder.Include, - "exclude", f.finder.Exclude) - } else if len(matches) > f.maxBatchFiles { - matches, f.queuedMatches = matches[:f.maxBatchFiles], matches[f.maxBatchFiles:] - } - } - } - - readers := f.makeReaders(matches) - f.firstCheck = false - - var wg sync.WaitGroup - for _, reader := range readers { - wg.Add(1) - go func(r *Reader) { - defer wg.Done() - r.ReadToEnd(ctx) - }(reader) - } - wg.Wait() - - f.roller.roll(ctx, readers) - f.saveCurrent(readers) - f.syncLastPollFiles(ctx) -} - -// makeReaders takes a list of paths, then creates readers from each of those paths, -// discarding any that have a duplicate fingerprint to other files that have already -// been read this polling interval -func (f *Input) makeReaders(filesPaths []string) []*Reader { - // Open the files first to minimize the time between listing and opening - files := make([]*os.File, 0, len(filesPaths)) - for _, path := range filesPaths { - if _, ok := f.SeenPaths[path]; !ok { - if f.startAtBeginning { - f.Infow("Started watching file", "path", path) - } else { - f.Infow("Started watching file from end. To read preexisting logs, configure the argument 'start_at' to 'beginning'", "path", path) - } - f.SeenPaths[path] = struct{}{} - } - file, err := os.Open(path) // #nosec - operator must read in files defined by user - if err != nil { - f.Debugf("Failed to open file", zap.Error(err)) - continue - } - files = append(files, file) - } - - // Get fingerprints for each file - fps := make([]*Fingerprint, 0, len(files)) - for _, file := range files { - fp, err := f.NewFingerprint(file) - if err != nil { - f.Errorw("Failed creating fingerprint", zap.Error(err)) - continue - } - fps = append(fps, fp) - } - - // Exclude any empty fingerprints or duplicate fingerprints to avoid doubling up on copy-truncate files -OUTER: - for i := 0; i < len(fps); i++ { - fp := fps[i] - if len(fp.FirstBytes) == 0 { - if err := files[i].Close(); err != nil { - f.Errorf("problem closing file", "file", files[i].Name()) - } - // Empty file, don't read it until we can compare its fingerprint - fps = append(fps[:i], fps[i+1:]...) - files = append(files[:i], files[i+1:]...) - i-- - continue - } - for j := i + 1; j < len(fps); j++ { - fp2 := fps[j] - if fp.StartsWith(fp2) || fp2.StartsWith(fp) { - // Exclude - if err := files[i].Close(); err != nil { - f.Errorf("problem closing file", "file", files[i].Name()) - } - fps = append(fps[:i], fps[i+1:]...) - files = append(files[:i], files[i+1:]...) - i-- - continue OUTER - } - } - } - - readers := make([]*Reader, 0, len(fps)) - for i := 0; i < len(fps); i++ { - reader, err := f.newReader(files[i], fps[i], f.firstCheck) - if err != nil { - f.Errorw("Failed to create reader", zap.Error(err)) - continue - } - readers = append(readers, reader) - } - - return readers -} - -// saveCurrent adds the readers from this polling interval to this list of -// known files, then increments the generation of all tracked old readers -// before clearing out readers that have existed for 3 generations. -func (f *Input) saveCurrent(readers []*Reader) { - // Add readers from the current, completed poll interval to the list of known files - f.knownFiles = append(f.knownFiles, readers...) - - // Clear out old readers. They are sorted such that they are oldest first, - // so we can just find the first reader whose generation is less than our - // max, and keep every reader after that - for i := 0; i < len(f.knownFiles); i++ { - reader := f.knownFiles[i] - if reader.generation <= 3 { - f.knownFiles = f.knownFiles[i:] - break - } +func (f *Input) emit(ctx context.Context, attrs *fileconsumer.FileAttributes, token []byte) { + // Skip the entry if it's empty + if len(token) == 0 { + return } -} - -func (f *Input) newReader(file *os.File, fp *Fingerprint, firstCheck bool) (*Reader, error) { - // Check if the new path has the same fingerprint as an old path - if oldReader, ok := f.findFingerprintMatch(fp); ok { - newReader, err := oldReader.Copy(file) + var body interface{} = token + var err error + if f.fileConsumer.Encoding.Encoding != encoding.Nop { + // TODO push decode logic down to reader, so it can reuse decoder + body, err = f.fileConsumer.Encoding.Decode(token) if err != nil { - return nil, err + f.Errorf("decode: %w", err) + return } - newReader.fileAttributes = f.resolveFileAttributes(file.Name()) - return newReader, nil } - // If we don't match any previously known files, create a new reader from scratch - splitter, err := f.getMultiline() + ent, err := f.NewEntry(body) if err != nil { - return nil, err - } - newReader, err := f.NewReader(file.Name(), file, fp, splitter) - if err != nil { - return nil, err - } - startAtBeginning := !firstCheck || f.startAtBeginning - if err := newReader.InitializeOffset(startAtBeginning); err != nil { - return nil, fmt.Errorf("initialize offset: %s", err) - } - return newReader, nil -} - -func (f *Input) findFingerprintMatch(fp *Fingerprint) (*Reader, bool) { - // Iterate backwards to match newest first - for i := len(f.knownFiles) - 1; i >= 0; i-- { - oldReader := f.knownFiles[i] - if fp.StartsWith(oldReader.Fingerprint) { - return oldReader, true - } - } - return nil, false -} - -const knownFilesKey = "knownFiles" - -// syncLastPollFiles syncs the most recent set of files to the database -func (f *Input) syncLastPollFiles(ctx context.Context) { - var buf bytes.Buffer - enc := json.NewEncoder(&buf) - - // Encode the number of known files - if err := enc.Encode(len(f.knownFiles)); err != nil { - f.Errorw("Failed to encode known files", zap.Error(err)) + f.Errorf("create entry: %w", err) return } - // Encode each known file - for _, fileReader := range f.knownFiles { - if err := enc.Encode(fileReader); err != nil { - f.Errorw("Failed to encode known files", zap.Error(err)) - } - } - - if err := f.persister.Set(ctx, knownFilesKey, buf.Bytes()); err != nil { - f.Errorw("Failed to sync to database", zap.Error(err)) - } -} - -// syncLastPollFiles loads the most recent set of files to the database -func (f *Input) loadLastPollFiles(ctx context.Context) error { - encoded, err := f.persister.Get(ctx, knownFilesKey) - if err != nil { - return err + // TODO turn these into options + if err := ent.Set(f.FilePathField, attrs.Path); err != nil { + f.Errorf("set attribute: %w", err) + return } - - if encoded == nil { - f.knownFiles = make([]*Reader, 0, 10) - return nil + if err := ent.Set(f.FileNameField, attrs.Name); err != nil { + f.Errorf("set attribute: %w", err) + return } - - dec := json.NewDecoder(bytes.NewReader(encoded)) - - // Decode the number of entries - var knownFileCount int - if err := dec.Decode(&knownFileCount); err != nil { - return fmt.Errorf("decoding file count: %w", err) + if err := ent.Set(f.FilePathResolvedField, attrs.ResolvedPath); err != nil { + f.Errorf("set attribute: %w", err) + return } - - // Decode each of the known files - f.knownFiles = make([]*Reader, 0, knownFileCount) - for i := 0; i < knownFileCount; i++ { - splitter, err := f.getMultiline() - if err != nil { - return err - } - newReader, err := f.NewReader("", nil, nil, splitter) - if err != nil { - return err - } - if err = dec.Decode(newReader); err != nil { - return err - } - f.knownFiles = append(f.knownFiles, newReader) + if err := ent.Set(f.FileNameResolvedField, attrs.ResolvedName); err != nil { + f.Errorf("set attribute: %w", err) + return } - return nil -} - -// getMultiline returns helper.Splitter structure and error eventually -func (f *Input) getMultiline() (*helper.Splitter, error) { - return f.Splitter.Build(f.encoding.Encoding, false, f.MaxLogSize) + f.Write(ctx, ent) } diff --git a/pkg/stanza/operator/input/file/file_test.go b/pkg/stanza/operator/input/file/file_test.go index cc1b6b18d736..bf2db88640ce 100644 --- a/pkg/stanza/operator/input/file/file_test.go +++ b/pkg/stanza/operator/input/file/file_test.go @@ -15,7 +15,6 @@ package file import ( - "context" "fmt" "io/ioutil" "os" @@ -365,10 +364,8 @@ func TestNopEncodingDifferentLogSizes(t *testing.T) { func TestReadNewLogs(t *testing.T) { t.Parallel() operator, logReceived, tempDir := newTestFileOperator(t, nil, nil) - operator.persister = testutil.NewMockPersister("test") - // Poll once so we know this isn't a new file - operator.poll(context.Background()) + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) defer func() { require.NoError(t, operator.Stop()) }() @@ -377,9 +374,6 @@ func TestReadNewLogs(t *testing.T) { temp := openTemp(t, tempDir) writeString(t, temp, "testlog\n") - // Poll a second time after the file has been created - operator.poll(context.Background()) - // Expect the message to come through waitForMessage(t, logReceived, "testlog") } @@ -390,22 +384,22 @@ func TestReadNewLogs(t *testing.T) { func TestReadExistingAndNewLogs(t *testing.T) { t.Parallel() operator, logReceived, tempDir := newTestFileOperator(t, nil, nil) - operator.persister = testutil.NewMockPersister("test") - defer func() { - require.NoError(t, operator.Stop()) - }() // Start with a file with an entry in it, and expect that entry // to come through when we poll for the first time temp := openTemp(t, tempDir) writeString(t, temp, "testlog1\n") - operator.poll(context.Background()) + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) + defer func() { + require.NoError(t, operator.Stop()) + }() + waitForMessage(t, logReceived, "testlog1") // Write a second entry, and expect that entry to come through // as well writeString(t, temp, "testlog2\n") - operator.poll(context.Background()) waitForMessage(t, logReceived, "testlog2") } @@ -416,21 +410,21 @@ func TestStartAtEnd(t *testing.T) { operator, logReceived, tempDir := newTestFileOperator(t, func(cfg *Config) { cfg.StartAt = "end" }, nil) - operator.persister = testutil.NewMockPersister("test") + + temp := openTemp(t, tempDir) + writeString(t, temp, "testlog1\n") + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) defer func() { require.NoError(t, operator.Stop()) }() - temp := openTemp(t, tempDir) - writeString(t, temp, "testlog1\n") + time.Sleep(2 * operator.fileConsumer.PollInterval) - // Expect no entries on the first poll - operator.poll(context.Background()) expectNoMessages(t, logReceived) // Expect any new entries after the first poll writeString(t, temp, "testlog2\n") - operator.poll(context.Background()) waitForMessage(t, logReceived, "testlog2") } @@ -439,18 +433,20 @@ func TestStartAtEnd(t *testing.T) { // beginning func TestStartAtEndNewFile(t *testing.T) { t.Parallel() - operator, logReceived, tempDir := newTestFileOperator(t, nil, nil) - operator.persister = testutil.NewMockPersister("test") - operator.startAtBeginning = false + operator, logReceived, tempDir := newTestFileOperator(t, func(cfg *Config) { + cfg.StartAt = "end" + }, nil) + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) defer func() { require.NoError(t, operator.Stop()) }() - operator.poll(context.Background()) + time.Sleep(2 * operator.fileConsumer.PollInterval) + temp := openTemp(t, tempDir) writeString(t, temp, "testlog1\ntestlog2\n") - operator.poll(context.Background()) waitForMessage(t, logReceived, "testlog1") waitForMessage(t, logReceived, "testlog2") } @@ -498,26 +494,24 @@ func TestSkipEmpty(t *testing.T) { func TestSplitWrite(t *testing.T) { t.Parallel() operator, logReceived, tempDir := newTestFileOperator(t, nil, nil) - operator.persister = testutil.NewMockPersister("test") + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) defer func() { require.NoError(t, operator.Stop()) }() temp := openTemp(t, tempDir) writeString(t, temp, "testlog1") - - operator.poll(context.Background()) - writeString(t, temp, "testlog2\n") - operator.poll(context.Background()) waitForMessage(t, logReceived, "testlog1testlog2") } func TestIgnoreEmptyFiles(t *testing.T) { t.Parallel() operator, logReceived, tempDir := newTestFileOperator(t, nil, nil) - operator.persister = testutil.NewMockPersister("test") + + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) defer func() { require.NoError(t, operator.Stop()) }() @@ -529,14 +523,10 @@ func TestIgnoreEmptyFiles(t *testing.T) { writeString(t, temp, "testlog1\n") writeString(t, temp3, "testlog2\n") - operator.poll(context.Background()) - waitForMessages(t, logReceived, []string{"testlog1", "testlog2"}) writeString(t, temp2, "testlog3\n") writeString(t, temp4, "testlog4\n") - operator.poll(context.Background()) - waitForMessages(t, logReceived, []string{"testlog3", "testlog4"}) } @@ -764,165 +754,6 @@ func TestManyLogsDelivered(t *testing.T) { expectNoMessages(t, logReceived) } -func TestFileBatching(t *testing.T) { - t.Parallel() - - files := 100 - linesPerFile := 10 - maxConcurrentFiles := 20 - maxBatchFiles := maxConcurrentFiles / 2 - - expectedBatches := files / maxBatchFiles // assumes no remainder - expectedLinesPerBatch := maxBatchFiles * linesPerFile - - expectedMessages := make([]string, 0, files*linesPerFile) - actualMessages := make([]string, 0, files*linesPerFile) - - operator, logReceived, tempDir := newTestFileOperator(t, - func(cfg *Config) { - cfg.MaxConcurrentFiles = maxConcurrentFiles - }, - func(out *testutil.FakeOutput) { - out.Received = make(chan *entry.Entry, expectedLinesPerBatch*2) - }, - ) - operator.persister = testutil.NewMockPersister("test") - defer func() { - require.NoError(t, operator.Stop()) - }() - - temps := make([]*os.File, 0, files) - for i := 0; i < files; i++ { - temps = append(temps, openTemp(t, tempDir)) - } - - // Write logs to each file - for i, temp := range temps { - for j := 0; j < linesPerFile; j++ { - message := fmt.Sprintf("%s %d %d", stringWithLength(100), i, j) - _, err := temp.WriteString(message + "\n") - require.NoError(t, err) - expectedMessages = append(expectedMessages, message) - } - } - - for b := 0; b < expectedBatches; b++ { - // poll once so we can validate that files were batched - operator.poll(context.Background()) - actualMessages = append(actualMessages, waitForN(t, logReceived, expectedLinesPerBatch)...) - } - - require.ElementsMatch(t, expectedMessages, actualMessages) - - // Write more logs to each file so we can validate that all files are still known - for i, temp := range temps { - for j := 0; j < linesPerFile; j++ { - message := fmt.Sprintf("%s %d %d", stringWithLength(20), i, j) - _, err := temp.WriteString(message + "\n") - require.NoError(t, err) - expectedMessages = append(expectedMessages, message) - } - } - - for b := 0; b < expectedBatches; b++ { - // poll once so we can validate that files were batched - operator.poll(context.Background()) - actualMessages = append(actualMessages, waitForN(t, logReceived, expectedLinesPerBatch)...) - } - - require.ElementsMatch(t, expectedMessages, actualMessages) -} - -func TestFileReader_FingerprintUpdated(t *testing.T) { - t.Parallel() - - operator, logReceived, tempDir := newTestFileOperator(t, nil, nil) - defer func() { - require.NoError(t, operator.Stop()) - }() - - temp := openTemp(t, tempDir) - tempCopy := openFile(t, temp.Name()) - fp, err := operator.NewFingerprint(temp) - require.NoError(t, err) - - splitter, err := operator.getMultiline() - require.NoError(t, err) - - reader, err := operator.NewReader(temp.Name(), tempCopy, fp, splitter) - require.NoError(t, err) - defer reader.Close() - - writeString(t, temp, "testlog1\n") - reader.ReadToEnd(context.Background()) - waitForMessage(t, logReceived, "testlog1") - require.Equal(t, []byte("testlog1\n"), reader.Fingerprint.FirstBytes) -} - -// Test that a fingerprint: -// - Starts empty -// - Updates as a file is read -// - Stops updating when the max fingerprint size is reached -// - Stops exactly at max fingerprint size, regardless of content -func TestFingerprintGrowsAndStops(t *testing.T) { - t.Parallel() - - // Use a number with many factors. - // Sometimes fingerprint length will align with - // the end of a line, sometimes not. Test both. - maxFP := 360 - - // Use prime numbers to ensure variation in - // whether or not they are factors of maxFP - lineLens := []int{3, 5, 7, 11, 13, 17, 19, 23, 27} - - for _, lineLen := range lineLens { - t.Run(fmt.Sprintf("%d", lineLen), func(t *testing.T) { - t.Parallel() - operator, _, tempDir := newTestFileOperator(t, func(cfg *Config) { - cfg.FingerprintSize = helper.ByteSize(maxFP) - }, nil) - defer func() { - require.NoError(t, operator.Stop()) - }() - - temp := openTemp(t, tempDir) - tempCopy := openFile(t, temp.Name()) - fp, err := operator.NewFingerprint(temp) - require.NoError(t, err) - require.Equal(t, []byte(""), fp.FirstBytes) - - splitter, err := operator.getMultiline() - require.NoError(t, err) - - reader, err := operator.NewReader(temp.Name(), tempCopy, fp, splitter) - require.NoError(t, err) - defer reader.Close() - - // keep track of what has been written to the file - fileContent := []byte{} - - // keep track of expected fingerprint size - expectedFP := 0 - - // Write lines until file is much larger than the length of the fingerprint - for len(fileContent) < 2*maxFP { - expectedFP += lineLen - if expectedFP > maxFP { - expectedFP = maxFP - } - - line := stringWithLength(lineLen-1) + "\n" - fileContent = append(fileContent, []byte(line)...) - - writeString(t, temp, line) - reader.ReadToEnd(context.Background()) - require.Equal(t, fileContent[:expectedFP], reader.Fingerprint.FirstBytes) - } - }) - } -} - func TestEncodings(t *testing.T) { t.Parallel() cases := []struct { diff --git a/pkg/stanza/operator/input/file/rotation_test.go b/pkg/stanza/operator/input/file/rotation_test.go index e67dc4c6a94a..41420d4dfd43 100644 --- a/pkg/stanza/operator/input/file/rotation_test.go +++ b/pkg/stanza/operator/input/file/rotation_test.go @@ -15,7 +15,6 @@ package file import ( - "context" "fmt" "io" "os" @@ -354,25 +353,21 @@ func TestMoveFile(t *testing.T) { } t.Parallel() operator, logReceived, tempDir := newTestFileOperator(t, nil, nil) - operator.persister = testutil.NewMockPersister("test") temp1 := openTemp(t, tempDir) writeString(t, temp1, "testlog1\n") temp1.Close() - operator.poll(context.Background()) + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) defer func() { require.NoError(t, operator.Stop()) }() waitForMessage(t, logReceived, "testlog1") - // Wait until all goroutines are finished before renaming - operator.wg.Wait() err := os.Rename(temp1.Name(), fmt.Sprintf("%s.2", temp1.Name())) require.NoError(t, err) - operator.poll(context.Background()) expectNoMessages(t, logReceived) } @@ -382,22 +377,18 @@ func TestTrackMovedAwayFiles(t *testing.T) { } t.Parallel() operator, logReceived, tempDir := newTestFileOperator(t, nil, nil) - operator.persister = testutil.NewMockPersister("test") temp1 := openTemp(t, tempDir) writeString(t, temp1, "testlog1\n") temp1.Close() - operator.poll(context.Background()) + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) defer func() { require.NoError(t, operator.Stop()) }() waitForMessage(t, logReceived, "testlog1") - // Wait until all goroutines are finished before renaming - operator.wg.Wait() - newDir := fmt.Sprintf("%s%s", tempDir[:len(tempDir)-1], "_new/") err := os.Mkdir(newDir, 0777) require.NoError(t, err) @@ -409,7 +400,6 @@ func TestTrackMovedAwayFiles(t *testing.T) { movedFile, err := os.OpenFile(newFileName, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) require.NoError(t, err) writeString(t, movedFile, "testlog2\n") - operator.poll(context.Background()) waitForMessage(t, logReceived, "testlog2") } @@ -419,12 +409,11 @@ func TestTrackMovedAwayFiles(t *testing.T) { func TestTruncateThenWrite(t *testing.T) { t.Parallel() operator, logReceived, tempDir := newTestFileOperator(t, nil, nil) - operator.persister = testutil.NewMockPersister("test") temp1 := openTemp(t, tempDir) writeString(t, temp1, "testlog1\ntestlog2\n") - operator.poll(context.Background()) + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) defer func() { require.NoError(t, operator.Stop()) }() @@ -437,7 +426,6 @@ func TestTruncateThenWrite(t *testing.T) { require.NoError(t, err) writeString(t, temp1, "testlog3\n") - operator.poll(context.Background()) waitForMessage(t, logReceived, "testlog3") expectNoMessages(t, logReceived) } @@ -449,19 +437,17 @@ func TestTruncateThenWrite(t *testing.T) { func TestCopyTruncateWriteBoth(t *testing.T) { t.Parallel() operator, logReceived, tempDir := newTestFileOperator(t, nil, nil) - operator.persister = testutil.NewMockPersister("test") temp1 := openTemp(t, tempDir) writeString(t, temp1, "testlog1\ntestlog2\n") - operator.poll(context.Background()) + require.NoError(t, operator.Start(testutil.NewMockPersister("test"))) defer func() { require.NoError(t, operator.Stop()) }() waitForMessage(t, logReceived, "testlog1") waitForMessage(t, logReceived, "testlog2") - operator.wg.Wait() // wait for all goroutines to finish // Copy the first file to a new file, and add another log temp2 := openTemp(t, tempDir) @@ -478,7 +464,6 @@ func TestCopyTruncateWriteBoth(t *testing.T) { writeString(t, temp1, "testlog4\n") // Expect both messages to come through - operator.poll(context.Background()) waitForMessages(t, logReceived, []string{"testlog3", "testlog4"}) } diff --git a/pkg/stanza/operator/input/file/util_test.go b/pkg/stanza/operator/input/file/util_test.go index fb82a71ca359..0499fd421cc7 100644 --- a/pkg/stanza/operator/input/file/util_test.go +++ b/pkg/stanza/operator/input/file/util_test.go @@ -127,20 +127,6 @@ func waitForOne(t *testing.T, c chan *entry.Entry) *entry.Entry { } } -func waitForN(t *testing.T, c chan *entry.Entry, n int) []string { - messages := make([]string, 0, n) - for i := 0; i < n; i++ { - select { - case e := <-c: - messages = append(messages, e.Body.(string)) - case <-time.After(3 * time.Second): - require.FailNow(t, "Timed out waiting for message") - return nil - } - } - return messages -} - func waitForMessage(t *testing.T, c chan *entry.Entry, expected string) { select { case e := <-c: diff --git a/pkg/stanza/operator/input/journald/journald.go b/pkg/stanza/operator/input/journald/journald.go index d22a40f91f11..33e3175867f5 100644 --- a/pkg/stanza/operator/input/journald/journald.go +++ b/pkg/stanza/operator/input/journald/journald.go @@ -140,7 +140,7 @@ func (operator *Input) Start(persister operator.Persister) error { // Start from a cursor if there is a saved offset cursor, err := persister.Get(ctx, lastReadCursorKey) if err != nil { - return fmt.Errorf("failed to get journalctl state: %s", err) + return fmt.Errorf("failed to get journalctl state: %w", err) } operator.persister = persister @@ -149,11 +149,11 @@ func (operator *Input) Start(persister operator.Persister) error { journal := operator.newCmd(ctx, cursor) stdout, err := journal.StdoutPipe() if err != nil { - return fmt.Errorf("failed to get journalctl stdout: %s", err) + return fmt.Errorf("failed to get journalctl stdout: %w", err) } err = journal.Start() if err != nil { - return fmt.Errorf("start journalctl: %s", err) + return fmt.Errorf("start journalctl: %w", err) } // Start the reader goroutine @@ -166,7 +166,7 @@ func (operator *Input) Start(persister operator.Persister) error { for { line, err := stdoutBuf.ReadBytes('\n') if err != nil { - if err != io.EOF { + if !errors.Is(err, io.EOF) { operator.Errorw("Received error reading from journalctl stdout", zap.Error(err)) } return @@ -206,7 +206,7 @@ func (operator *Input) parseJournalEntry(line []byte) (*entry.Entry, string, err timestampInt, err := strconv.ParseInt(timestampString, 10, 64) if err != nil { - return nil, "", fmt.Errorf("parse timestamp: %s", err) + return nil, "", fmt.Errorf("parse timestamp: %w", err) } delete(body, "__REALTIME_TIMESTAMP") @@ -223,7 +223,7 @@ func (operator *Input) parseJournalEntry(line []byte) (*entry.Entry, string, err entry, err := operator.NewEntry(body) if err != nil { - return nil, "", fmt.Errorf("failed to create entry: %s", err) + return nil, "", fmt.Errorf("failed to create entry: %w", err) } entry.Timestamp = time.Unix(0, timestampInt*1000) // in microseconds diff --git a/pkg/stanza/operator/input/k8sevent/k8s_event.go b/pkg/stanza/operator/input/k8sevent/k8s_event.go index ba8fcc3ff375..69ba1e383106 100644 --- a/pkg/stanza/operator/input/k8sevent/k8s_event.go +++ b/pkg/stanza/operator/input/k8sevent/k8s_event.go @@ -24,7 +24,7 @@ import ( apiv1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" - watch "k8s.io/apimachinery/pkg/watch" + "k8s.io/apimachinery/pkg/watch" corev1 "k8s.io/client-go/kubernetes/typed/core/v1" "k8s.io/client-go/rest" @@ -126,7 +126,7 @@ func (k *Input) Start(_ operator.Persister) error { if len(k.namespaces) > 0 { testWatcher, err := k.client.Events(k.namespaces[0]).Watch(ctx, metav1.ListOptions{}) if err != nil { - return fmt.Errorf("test connection failed: list events for namespace '%s': %s", k.namespaces[0], err) + return fmt.Errorf("test connection failed: list events for namespace '%s': %w", k.namespaces[0], err) } testWatcher.Stop() } diff --git a/pkg/stanza/operator/input/stdin/stdin.go b/pkg/stanza/operator/input/stdin/stdin.go index a4723210a55c..8c193c3959fa 100644 --- a/pkg/stanza/operator/input/stdin/stdin.go +++ b/pkg/stanza/operator/input/stdin/stdin.go @@ -72,7 +72,7 @@ func (g *Input) Start(_ operator.Persister) error { stat, err := g.stdin.Stat() if err != nil { - return fmt.Errorf("failed to stat stdin: %s", err) + return fmt.Errorf("failed to stat stdin: %w", err) } if stat.Mode()&os.ModeNamedPipe == 0 { diff --git a/pkg/stanza/operator/input/syslog/syslog.go b/pkg/stanza/operator/input/syslog/syslog.go index 484ebb5c90b2..8c3b4e575d3a 100644 --- a/pkg/stanza/operator/input/syslog/syslog.go +++ b/pkg/stanza/operator/input/syslog/syslog.go @@ -54,7 +54,7 @@ func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { syslogParserCfg.OutputIDs = c.OutputIDs syslogParser, err := syslogParserCfg.Build(logger) if err != nil { - return nil, fmt.Errorf("failed to resolve syslog config: %s", err) + return nil, fmt.Errorf("failed to resolve syslog config: %w", err) } if c.TCP != nil { @@ -63,7 +63,7 @@ func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { tcpInput, err := tcpInputCfg.Build(logger) if err != nil { - return nil, fmt.Errorf("failed to resolve tcp config: %s", err) + return nil, fmt.Errorf("failed to resolve tcp config: %w", err) } tcpInput.SetOutputIDs([]string{syslogParser.ID()}) @@ -84,7 +84,7 @@ func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { udpInput, err := udpInputCfg.Build(logger) if err != nil { - return nil, fmt.Errorf("failed to resolve upd config: %s", err) + return nil, fmt.Errorf("failed to resolve upd config: %w", err) } udpInput.SetOutputIDs([]string{syslogParser.ID()}) diff --git a/pkg/stanza/operator/input/tcp/tcp.go b/pkg/stanza/operator/input/tcp/tcp.go index 3ee4f0cf45b9..ff8d1f59076e 100644 --- a/pkg/stanza/operator/input/tcp/tcp.go +++ b/pkg/stanza/operator/input/tcp/tcp.go @@ -95,7 +95,7 @@ func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { // validate the input address if _, err = net.ResolveTCPAddr("tcp", c.ListenAddress); err != nil { - return nil, fmt.Errorf("failed to resolve listen_address: %s", err) + return nil, fmt.Errorf("failed to resolve listen_address: %w", err) } encoding, err := c.Encoding.Build() diff --git a/pkg/stanza/operator/input/udp/udp.go b/pkg/stanza/operator/input/udp/udp.go index ebdc6455ba75..649bd2619b47 100644 --- a/pkg/stanza/operator/input/udp/udp.go +++ b/pkg/stanza/operator/input/udp/udp.go @@ -79,7 +79,7 @@ func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { address, err := net.ResolveUDPAddr("udp", c.ListenAddress) if err != nil { - return nil, fmt.Errorf("failed to resolve listen_address: %s", err) + return nil, fmt.Errorf("failed to resolve listen_address: %w", err) } encoding, err := c.Encoding.Build() @@ -133,7 +133,7 @@ func (u *Input) Start(persister operator.Persister) error { conn, err := net.ListenUDP("udp", u.address) if err != nil { - return fmt.Errorf("failed to open connection: %s", err) + return fmt.Errorf("failed to open connection: %w", err) } u.connection = conn diff --git a/pkg/stanza/operator/input/windows/bookmark.go b/pkg/stanza/operator/input/windows/bookmark.go index 9b3af5cc7593..ab98579f0639 100644 --- a/pkg/stanza/operator/input/windows/bookmark.go +++ b/pkg/stanza/operator/input/windows/bookmark.go @@ -35,12 +35,12 @@ func (b *Bookmark) Open(offsetXML string) error { utf16, err := syscall.UTF16PtrFromString(offsetXML) if err != nil { - return fmt.Errorf("failed to convert bookmark xml to utf16: %s", err) + return fmt.Errorf("failed to convert bookmark xml to utf16: %w", err) } handle, err := evtCreateBookmark(utf16) if err != nil { - return fmt.Errorf("failed to create bookmark handle from xml: %s", err) + return fmt.Errorf("failed to create bookmark handle from xml: %w", err) } b.handle = handle @@ -52,13 +52,13 @@ func (b *Bookmark) Update(event Event) error { if b.handle == 0 { handle, err := evtCreateBookmark(nil) if err != nil { - return fmt.Errorf("syscall to `EvtCreateBookmark` failed: %s", err) + return fmt.Errorf("syscall to `EvtCreateBookmark` failed: %w", err) } b.handle = handle } if err := evtUpdateBookmark(b.handle, event.handle); err != nil { - return fmt.Errorf("syscall to `EvtUpdateBookmark` failed: %s", err) + return fmt.Errorf("syscall to `EvtUpdateBookmark` failed: %w", err) } return nil @@ -77,7 +77,7 @@ func (b *Bookmark) Render(buffer Buffer) (string, error) { } if err != nil { - return "", fmt.Errorf("syscall to 'EvtRender' failed: %s", err) + return "", fmt.Errorf("syscall to 'EvtRender' failed: %w", err) } return buffer.ReadString(*bufferUsed) @@ -90,7 +90,7 @@ func (b *Bookmark) Close() error { } if err := evtClose(b.handle); err != nil { - return fmt.Errorf("failed to close bookmark handle: %s", err) + return fmt.Errorf("failed to close bookmark handle: %w", err) } b.handle = 0 diff --git a/pkg/stanza/operator/input/windows/buffer.go b/pkg/stanza/operator/input/windows/buffer.go index 22b3cc3b75a5..b849626ebfa2 100644 --- a/pkg/stanza/operator/input/windows/buffer.go +++ b/pkg/stanza/operator/input/windows/buffer.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build windows // +build windows package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" @@ -39,7 +40,7 @@ func (b *Buffer) ReadBytes(offset uint32) ([]byte, error) { utf16 := b.buffer[:offset] utf8, err := unicode.UTF16(unicode.LittleEndian, unicode.UseBOM).NewDecoder().Bytes(utf16) if err != nil { - return nil, fmt.Errorf("failed to convert buffer contents to utf8: %s", err) + return nil, fmt.Errorf("failed to convert buffer contents to utf8: %w", err) } return bytes.Trim(utf8, "\u0000"), nil diff --git a/pkg/stanza/operator/input/windows/event.go b/pkg/stanza/operator/input/windows/event.go index 41b657bb13cf..5da3b6e0ade1 100644 --- a/pkg/stanza/operator/input/windows/event.go +++ b/pkg/stanza/operator/input/windows/event.go @@ -39,12 +39,12 @@ func (e *Event) RenderSimple(buffer Buffer) (EventXML, error) { } if err != nil { - return EventXML{}, fmt.Errorf("syscall to 'EvtRender' failed: %s", err) + return EventXML{}, fmt.Errorf("syscall to 'EvtRender' failed: %w", err) } bytes, err := buffer.ReadBytes(*bufferUsed) if err != nil { - return EventXML{}, fmt.Errorf("failed to read bytes from buffer: %s", err) + return EventXML{}, fmt.Errorf("failed to read bytes from buffer: %w", err) } return unmarshalEventXML(bytes) @@ -64,12 +64,12 @@ func (e *Event) RenderFormatted(buffer Buffer, publisher Publisher) (EventXML, e } if err != nil { - return EventXML{}, fmt.Errorf("syscall to 'EvtFormatMessage' failed: %s", err) + return EventXML{}, fmt.Errorf("syscall to 'EvtFormatMessage' failed: %w", err) } bytes, err := buffer.ReadWideChars(bufferUsed) if err != nil { - return EventXML{}, fmt.Errorf("failed to read bytes from buffer: %s", err) + return EventXML{}, fmt.Errorf("failed to read bytes from buffer: %w", err) } return unmarshalEventXML(bytes) @@ -82,7 +82,7 @@ func (e *Event) Close() error { } if err := evtClose(e.handle); err != nil { - return fmt.Errorf("failed to close event handle: %s", err) + return fmt.Errorf("failed to close event handle: %w", err) } e.handle = 0 diff --git a/pkg/stanza/operator/input/windows/operator.go b/pkg/stanza/operator/input/windows/operator.go index 18cd4e8a7ed6..1ae50471367c 100644 --- a/pkg/stanza/operator/input/windows/operator.go +++ b/pkg/stanza/operator/input/windows/operator.go @@ -114,13 +114,13 @@ func (e *Input) Start(persister operator.Persister) error { if offsetXML != "" { if err := e.bookmark.Open(offsetXML); err != nil { - return fmt.Errorf("failed to open bookmark: %s", err) + return fmt.Errorf("failed to open bookmark: %w", err) } } e.subscription = NewSubscription() if err := e.subscription.Open(e.channel, e.startAt, e.bookmark); err != nil { - return fmt.Errorf("failed to open subscription: %s", err) + return fmt.Errorf("failed to open subscription: %w", err) } e.wg.Add(1) @@ -134,11 +134,11 @@ func (e *Input) Stop() error { e.wg.Wait() if err := e.subscription.Close(); err != nil { - return fmt.Errorf("failed to close subscription: %s", err) + return fmt.Errorf("failed to close subscription: %w", err) } if err := e.bookmark.Close(); err != nil { - return fmt.Errorf("failed to close bookmark: %s", err) + return fmt.Errorf("failed to close bookmark: %w", err) } return nil diff --git a/pkg/stanza/operator/input/windows/publisher.go b/pkg/stanza/operator/input/windows/publisher.go index 8aab8847e647..c69806ddf2fe 100644 --- a/pkg/stanza/operator/input/windows/publisher.go +++ b/pkg/stanza/operator/input/windows/publisher.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build windows // +build windows package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" @@ -34,12 +35,12 @@ func (p *Publisher) Open(provider string) error { utf16, err := syscall.UTF16PtrFromString(provider) if err != nil { - return fmt.Errorf("failed to convert provider to utf16: %s", err) + return fmt.Errorf("failed to convert provider to utf16: %w", err) } handle, err := evtOpenPublisherMetadata(0, utf16, nil, 0, 0) if err != nil { - return fmt.Errorf("failed to open publisher handle: %s", err) + return fmt.Errorf("failed to open publisher handle: %w", err) } p.handle = handle @@ -53,7 +54,7 @@ func (p *Publisher) Close() error { } if err := evtClose(p.handle); err != nil { - return fmt.Errorf("failed to close publisher: %s", err) + return fmt.Errorf("failed to close publisher: %w", err) } p.handle = 0 diff --git a/pkg/stanza/operator/input/windows/subscription.go b/pkg/stanza/operator/input/windows/subscription.go index 8f6eb145635c..20208ced3c1d 100644 --- a/pkg/stanza/operator/input/windows/subscription.go +++ b/pkg/stanza/operator/input/windows/subscription.go @@ -12,11 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. +//go:build windows // +build windows package windows // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator/input/windows" import ( + "errors" "fmt" "syscall" @@ -36,19 +38,19 @@ func (s *Subscription) Open(channel string, startAt string, bookmark Bookmark) e signalEvent, err := windows.CreateEvent(nil, 0, 0, nil) if err != nil { - return fmt.Errorf("failed to create signal handle: %s", err) + return fmt.Errorf("failed to create signal handle: %w", err) } defer windows.CloseHandle(signalEvent) channelPtr, err := syscall.UTF16PtrFromString(channel) if err != nil { - return fmt.Errorf("failed to convert channel to utf16: %s", err) + return fmt.Errorf("failed to convert channel to utf16: %w", err) } flags := s.createFlags(startAt, bookmark) subscriptionHandle, err := evtSubscribe(0, signalEvent, channelPtr, nil, bookmark.handle, 0, 0, flags) if err != nil { - return fmt.Errorf("failed to subscribe to %s channel: %s", channel, err) + return fmt.Errorf("failed to subscribe to %s channel: %w", channel, err) } s.handle = subscriptionHandle @@ -62,7 +64,7 @@ func (s *Subscription) Close() error { } if err := evtClose(s.handle); err != nil { - return fmt.Errorf("failed to close subscription handle: %s", err) + return fmt.Errorf("failed to close subscription handle: %w", err) } s.handle = 0 @@ -87,7 +89,7 @@ func (s *Subscription) Read(maxReads int) ([]Event, error) { return nil, nil } - if err != nil && err != windows.ERROR_NO_MORE_ITEMS { + if err != nil && !errors.Is(err, windows.ERROR_NO_MORE_ITEMS) { return nil, err } diff --git a/pkg/stanza/operator/parser/csv/csv.go b/pkg/stanza/operator/parser/csv/csv.go index 363f2caeef2a..bb30882f79a8 100644 --- a/pkg/stanza/operator/parser/csv/csv.go +++ b/pkg/stanza/operator/parser/csv/csv.go @@ -150,7 +150,7 @@ func generateParseFunc(headers []string, fieldDelimiter rune, lazyQuotes bool) p lines := make([][]string, 0, 1) for { line, err := reader.Read() - if err == io.EOF { + if errors.Is(err, io.EOF) { break } diff --git a/pkg/stanza/operator/parser/regex/cache.go b/pkg/stanza/operator/parser/regex/cache.go index 8536f64cee6c..918a5b21066e 100644 --- a/pkg/stanza/operator/parser/regex/cache.go +++ b/pkg/stanza/operator/parser/regex/cache.go @@ -17,8 +17,9 @@ package regex // import "github.com/open-telemetry/opentelemetry-collector-contr import ( "math" "sync" - "sync/atomic" "time" + + "go.uber.org/atomic" ) // cache allows operators to cache a value and look it up later @@ -140,7 +141,7 @@ func newStartedAtomicLimiter(max uint64, interval uint64) *atomicLimiter { } a := &atomicLimiter{ - count: 0, + count: atomic.NewUint64(0), max: max, interval: time.Second * time.Duration(interval), } @@ -153,13 +154,13 @@ func newStartedAtomicLimiter(max uint64, interval uint64) *atomicLimiter { // counter. When count is >= max, throttled will return // true. The count is reset on an interval. type atomicLimiter struct { - count uint64 + count *atomic.Uint64 max uint64 interval time.Duration start sync.Once } -var _ limiter = (&atomicLimiter{}) +var _ limiter = &atomicLimiter{count: atomic.NewUint64(0)} // init initializes the limiter func (l *atomicLimiter) init() { @@ -172,7 +173,7 @@ func (l *atomicLimiter) init() { for { time.Sleep(l.interval) if l.currentCount() > 0 { - atomic.AddUint64(&l.count, ^uint64(x)) + l.count.Add(^uint64(x)) } } }() @@ -181,10 +182,10 @@ func (l *atomicLimiter) init() { // increment increments the atomic counter func (l *atomicLimiter) increment() { - if l.count == l.max { + if l.count.Load() == l.max { return } - atomic.AddUint64(&l.count, 1) + l.count.Inc() } // Returns true if the cache is currently throttled, meaning a high @@ -197,7 +198,7 @@ func (l *atomicLimiter) throttled() bool { } func (l *atomicLimiter) currentCount() uint64 { - return atomic.LoadUint64(&l.count) + return l.count.Load() } func (l *atomicLimiter) limit() uint64 { diff --git a/pkg/stanza/operator/parser/regex/cache_test.go b/pkg/stanza/operator/parser/regex/cache_test.go index 1611c6e36f4d..9c721c1b3eb4 100644 --- a/pkg/stanza/operator/parser/regex/cache_test.go +++ b/pkg/stanza/operator/parser/regex/cache_test.go @@ -20,6 +20,7 @@ import ( "time" "github.com/stretchr/testify/require" + "go.uber.org/atomic" ) func TestNewMemoryCache(t *testing.T) { @@ -225,7 +226,7 @@ func TestThrottledLimiter(t *testing.T) { // has not been called yet, so the reset go routine is not running l := atomicLimiter{ max: max, - count: max + 1, + count: atomic.NewUint64(max + 1), interval: 1, } diff --git a/pkg/stanza/operator/parser/regex/regex.go b/pkg/stanza/operator/parser/regex/regex.go index 03541d8096a5..9bf9dd560173 100644 --- a/pkg/stanza/operator/parser/regex/regex.go +++ b/pkg/stanza/operator/parser/regex/regex.go @@ -62,7 +62,7 @@ func (c Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { r, err := regexp.Compile(c.Regex) if err != nil { - return nil, fmt.Errorf("compiling regex: %s", err) + return nil, fmt.Errorf("compiling regex: %w", err) } namedCaptureGroups := 0 diff --git a/pkg/stanza/operator/transformer/add/add.go b/pkg/stanza/operator/transformer/add/add.go index a33891013cf6..6ffed11a6268 100644 --- a/pkg/stanza/operator/transformer/add/add.go +++ b/pkg/stanza/operator/transformer/add/add.go @@ -99,7 +99,7 @@ func (p *Transformer) Transform(e *entry.Entry) error { result, err := vm.Run(p.program, env) if err != nil { - return fmt.Errorf("evaluate value_expr: %s", err) + return fmt.Errorf("evaluate value_expr: %w", err) } return e.Set(p.Field, result) } diff --git a/pkg/stanza/operator/transformer/filter/filter_test.go b/pkg/stanza/operator/transformer/filter/filter_test.go index 934e683d269c..b7c1721e7973 100644 --- a/pkg/stanza/operator/transformer/filter/filter_test.go +++ b/pkg/stanza/operator/transformer/filter/filter_test.go @@ -18,7 +18,6 @@ import ( "context" "io" "math/big" - "os" "testing" "github.com/stretchr/testify/mock" @@ -30,8 +29,7 @@ import ( ) func TestTransformer(t *testing.T) { - os.Setenv("TEST_FILTER_OPERATOR_ENV", "foo") - defer os.Unsetenv("TEST_FILTER_OPERATOR_ENV") + t.Setenv("TEST_FILTER_OPERATOR_ENV", "foo") cases := []struct { name string diff --git a/pkg/stanza/operator/transformer/flatten/config_test.go b/pkg/stanza/operator/transformer/flatten/config_test.go index 1c0c1b1759f8..a8be04dfef5f 100644 --- a/pkg/stanza/operator/transformer/flatten/config_test.go +++ b/pkg/stanza/operator/transformer/flatten/config_test.go @@ -91,12 +91,12 @@ func TestGoldenConfig(t *testing.T) { func configFromFileViaYaml(file string) (*Config, error) { bytes, err := ioutil.ReadFile(file) if err != nil { - return nil, fmt.Errorf("could not find config file: %s", err) + return nil, fmt.Errorf("could not find config file: %w", err) } config := defaultCfg() if err := yaml.Unmarshal(bytes, config); err != nil { - return nil, fmt.Errorf("failed to read config file as yaml: %s", err) + return nil, fmt.Errorf("failed to read config file as yaml: %w", err) } return config, nil @@ -105,13 +105,13 @@ func configFromFileViaYaml(file string) (*Config, error) { func configFromFileViaMapstructure(file string) (*Config, error) { bytes, err := ioutil.ReadFile(file) if err != nil { - return nil, fmt.Errorf("could not find config file: %s", err) + return nil, fmt.Errorf("could not find config file: %w", err) } raw := map[string]interface{}{} if err = yaml.Unmarshal(bytes, raw); err != nil { - return nil, fmt.Errorf("failed to read data from yaml: %s", err) + return nil, fmt.Errorf("failed to read data from yaml: %w", err) } cfg := defaultCfg() diff --git a/pkg/stanza/operator/transformer/recombine/recombine.go b/pkg/stanza/operator/transformer/recombine/recombine.go index 9c9ff573476d..e31ac78c9ca4 100644 --- a/pkg/stanza/operator/transformer/recombine/recombine.go +++ b/pkg/stanza/operator/transformer/recombine/recombine.go @@ -65,7 +65,7 @@ type Config struct { func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { transformer, err := c.TransformerConfig.Build(logger) if err != nil { - return nil, fmt.Errorf("failed to build transformer config: %s", err) + return nil, fmt.Errorf("failed to build transformer config: %w", err) } if c.IsLastEntry != "" && c.IsFirstEntry != "" { @@ -82,13 +82,13 @@ func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { matchesFirst = true prog, err = expr.Compile(c.IsFirstEntry, expr.AsBool(), expr.AllowUndefinedVariables()) if err != nil { - return nil, fmt.Errorf("failed to compile is_first_entry: %s", err) + return nil, fmt.Errorf("failed to compile is_first_entry: %w", err) } } else { matchesFirst = false prog, err = expr.Compile(c.IsLastEntry, expr.AsBool(), expr.AllowUndefinedVariables()) if err != nil { - return nil, fmt.Errorf("failed to compile is_last_entry: %s", err) + return nil, fmt.Errorf("failed to compile is_last_entry: %w", err) } } diff --git a/pkg/stanza/operator/transformer/router/router.go b/pkg/stanza/operator/transformer/router/router.go index 131e8937d8eb..c9792d36a829 100644 --- a/pkg/stanza/operator/transformer/router/router.go +++ b/pkg/stanza/operator/transformer/router/router.go @@ -169,7 +169,7 @@ func (p *Transformer) SetOutputs(operators []operator.Operator) error { for _, route := range p.routes { outputOperators, err := p.findOperators(operators, route.OutputIDs) if err != nil { - return fmt.Errorf("failed to set outputs on route: %s", err) + return fmt.Errorf("failed to set outputs on route: %w", err) } route.OutputOperators = outputOperators } diff --git a/pkg/stanza/operator/transformer/router/router_test.go b/pkg/stanza/operator/transformer/router/router_test.go index d894b6024cbb..9aef066cfe27 100644 --- a/pkg/stanza/operator/transformer/router/router_test.go +++ b/pkg/stanza/operator/transformer/router/router_test.go @@ -16,7 +16,6 @@ package router import ( "context" - "os" "testing" "github.com/stretchr/testify/mock" @@ -29,8 +28,7 @@ import ( ) func TestTransformer(t *testing.T) { - os.Setenv("TEST_ROUTER_OPERATOR_ENV", "foo") - defer os.Unsetenv("TEST_ROUTER_OPERATOR_ENV") + t.Setenv("TEST_ROUTER_OPERATOR_ENV", "foo") basicConfig := func() *Config { return &Config{ diff --git a/pkg/stanza/pipeline/directed.go b/pkg/stanza/pipeline/directed.go index 0c141b4567a4..359f50843129 100644 --- a/pkg/stanza/pipeline/directed.go +++ b/pkg/stanza/pipeline/directed.go @@ -15,6 +15,7 @@ package pipeline // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/pipeline" import ( + "errors" "fmt" "strings" "sync" @@ -25,14 +26,14 @@ import ( "gonum.org/v1/gonum/graph/simple" "gonum.org/v1/gonum/graph/topo" - "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/errors" + stanzaerrors "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/errors" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/operator" ) var _ Pipeline = (*DirectedPipeline)(nil) -var alreadyStarted = errors.NewError("pipeline already started", "") -var alreadyStopped = errors.NewError("pipeline already stopped", "") +var alreadyStarted = stanzaerrors.NewError("pipeline already started", "") +var alreadyStopped = stanzaerrors.NewError("pipeline already stopped", "") // DirectedPipeline is a pipeline backed by a directed graph type DirectedPipeline struct { @@ -119,7 +120,7 @@ func addNodes(graph *simple.DirectedGraph, operators []operator.Operator) error for _, operator := range operators { operatorNode := createOperatorNode(operator) if graph.Node(operatorNode.ID()) != nil { - return errors.NewError( + return stanzaerrors.NewError( fmt.Sprintf("operator with id '%s' already exists in pipeline", operatorNode.Operator().ID()), "ensure that each operator has a unique `type` or `id`", ) @@ -141,10 +142,12 @@ func connectNodes(graph *simple.DirectedGraph) error { } if _, err := topo.Sort(graph); err != nil { - return errors.NewError( + var topoErr topo.Unorderable + errors.As(err, &topoErr) + return stanzaerrors.NewError( "pipeline has a circular dependency", "ensure that all operators are connected in a straight, acyclic line", - "cycles", unorderableToCycles(err.(topo.Unorderable)), + "cycles", unorderableToCycles(topoErr), ) } @@ -155,7 +158,7 @@ func connectNodes(graph *simple.DirectedGraph) error { func connectNode(graph *simple.DirectedGraph, inputNode OperatorNode) error { for outputOperatorID, outputNodeID := range inputNode.OutputIDs() { if graph.Node(outputNodeID) == nil { - return errors.NewError( + return stanzaerrors.NewError( "operators cannot be connected, because the output does not exist in the pipeline", "ensure that the output operator is defined", "input_operator", inputNode.Operator().ID(), @@ -165,7 +168,7 @@ func connectNode(graph *simple.DirectedGraph, inputNode OperatorNode) error { outputNode := graph.Node(outputNodeID).(OperatorNode) if !outputNode.Operator().CanProcess() { - return errors.NewError( + return stanzaerrors.NewError( "operators cannot be connected, because the output operator can not process logs", "ensure that the output operator can process logs (like a parser or destination)", "input_operator", inputNode.Operator().ID(), @@ -174,7 +177,7 @@ func connectNode(graph *simple.DirectedGraph, inputNode OperatorNode) error { } if graph.HasEdgeFromTo(inputNode.ID(), outputNodeID) { - return errors.NewError( + return stanzaerrors.NewError( "operators cannot be connected, because a connection already exists", "ensure that only a single connection exists between the two operators", "input_operator", inputNode.Operator().ID(), @@ -197,7 +200,7 @@ func setOperatorOutputs(operators []operator.Operator) error { } if err := operator.SetOutputs(operators); err != nil { - return errors.WithDetails(err, "operator_id", operator.ID()) + return stanzaerrors.WithDetails(err, "operator_id", operator.ID()) } } return nil diff --git a/pkg/translator/jaeger/go.mod b/pkg/translator/jaeger/go.mod index e3bf06251caf..cc6f57bff36a 100644 --- a/pkg/translator/jaeger/go.mod +++ b/pkg/translator/jaeger/go.mod @@ -6,8 +6,8 @@ require ( github.com/jaegertracing/jaeger v1.35.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/pkg/translator/jaeger/go.sum b/pkg/translator/jaeger/go.sum index 24f4e49b64dd..df0bb54792e1 100644 --- a/pkg/translator/jaeger/go.sum +++ b/pkg/translator/jaeger/go.sum @@ -97,10 +97,10 @@ github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= diff --git a/pkg/translator/opencensus/go.mod b/pkg/translator/opencensus/go.mod index 46ee1f11f125..9867b975b40e 100644 --- a/pkg/translator/opencensus/go.mod +++ b/pkg/translator/opencensus/go.mod @@ -9,8 +9,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 google.golang.org/protobuf v1.28.0 ) diff --git a/pkg/translator/opencensus/go.sum b/pkg/translator/opencensus/go.sum index ff0562048cf5..189baba48257 100644 --- a/pkg/translator/opencensus/go.sum +++ b/pkg/translator/opencensus/go.sum @@ -94,10 +94,10 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= diff --git a/pkg/translator/prometheusremotewrite/go.mod b/pkg/translator/prometheusremotewrite/go.mod index cf305b805ca7..5c976ced1458 100644 --- a/pkg/translator/prometheusremotewrite/go.mod +++ b/pkg/translator/prometheusremotewrite/go.mod @@ -5,11 +5,11 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/prometheus/common v0.34.0 - github.com/prometheus/prometheus v0.36.0 + github.com/prometheus/prometheus v0.36.1 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 ) diff --git a/pkg/translator/prometheusremotewrite/go.sum b/pkg/translator/prometheusremotewrite/go.sum index 5a3f492ae368..0f1e2788fb21 100644 --- a/pkg/translator/prometheusremotewrite/go.sum +++ b/pkg/translator/prometheusremotewrite/go.sum @@ -194,8 +194,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= -github.com/prometheus/prometheus v0.36.0/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= @@ -219,12 +219,12 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= diff --git a/pkg/translator/signalfx/go.mod b/pkg/translator/signalfx/go.mod index 3fc0961eff26..463403bfee8f 100644 --- a/pkg/translator/signalfx/go.mod +++ b/pkg/translator/signalfx/go.mod @@ -6,7 +6,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 ) diff --git a/pkg/translator/signalfx/go.sum b/pkg/translator/signalfx/go.sum index ccca17a609ab..518cd365eb9e 100644 --- a/pkg/translator/signalfx/go.sum +++ b/pkg/translator/signalfx/go.sum @@ -70,8 +70,8 @@ github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8 github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= diff --git a/pkg/translator/zipkin/go.mod b/pkg/translator/zipkin/go.mod index 09ef3adef81f..4d065d65ce38 100644 --- a/pkg/translator/zipkin/go.mod +++ b/pkg/translator/zipkin/go.mod @@ -10,8 +10,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.53.0 github.com/openzipkin/zipkin-go v0.4.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 google.golang.org/protobuf v1.28.0 ) diff --git a/pkg/translator/zipkin/go.sum b/pkg/translator/zipkin/go.sum index eb58a4f4d98f..ee6598646af7 100644 --- a/pkg/translator/zipkin/go.sum +++ b/pkg/translator/zipkin/go.sum @@ -159,10 +159,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= diff --git a/pkg/translator/zipkin/zipkinv1/thrift_test.go b/pkg/translator/zipkin/zipkinv1/thrift_test.go index 3ff09916f750..cd143d7ef31e 100644 --- a/pkg/translator/zipkin/zipkinv1/thrift_test.go +++ b/pkg/translator/zipkin/zipkinv1/thrift_test.go @@ -491,10 +491,7 @@ func Test_bytesInt16ToInt64(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := bytesInt16ToInt64(tt.bytes) - if err != tt.wantErr { - t.Errorf("bytesInt16ToInt64() error = %v, wantErr %v", err, tt.wantErr) - return - } + require.ErrorIs(t, err, tt.wantErr) if got != tt.want { t.Errorf("bytesInt16ToInt64() = %v, want %v", got, tt.want) } @@ -531,10 +528,7 @@ func Test_bytesInt32ToInt64(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := bytesInt32ToInt64(tt.bytes) - if err != tt.wantErr { - t.Errorf("bytesInt32ToInt64() error = %v, wantErr %v", err, tt.wantErr) - return - } + require.ErrorIs(t, err, tt.wantErr) if got != tt.want { t.Errorf("bytesInt32ToInt64() = %v, want %v", got, tt.want) } @@ -571,10 +565,7 @@ func Test_bytesInt64ToInt64(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := bytesInt64ToInt64(tt.bytes) - if err != tt.wantErr { - t.Errorf("bytesInt64ToInt64() error = %v, wantErr %v", err, tt.wantErr) - return - } + require.ErrorIs(t, err, tt.wantErr) if got != tt.want { t.Errorf("bytesInt64ToInt64() = %v, want %v", got, tt.want) } @@ -611,10 +602,7 @@ func Test_bytesFloat64ToFloat64(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := bytesFloat64ToFloat64(tt.bytes) - if err != tt.wantErr { - t.Errorf("bytesFloat64ToFloat64() error = %v, wantErr %v", err, tt.wantErr) - return - } + require.ErrorIs(t, err, tt.wantErr) if got != tt.want { t.Errorf("bytesFloat64ToFloat64() = %v, want %v", got, tt.want) } diff --git a/processor/attributesprocessor/README.md b/processor/attributesprocessor/README.md index aae8988d6d2a..402e4b8638b5 100644 --- a/processor/attributesprocessor/README.md +++ b/processor/attributesprocessor/README.md @@ -1,6 +1,10 @@ # Attributes Processor -Supported pipeline types: traces, logs, metrics. +| Status | | +| ------------------------ | --------------------- | +| Stability | [alpha] | +| Supported pipeline types | traces, metrics, logs | +| Distributions | [core], [contrib] | The attributes processor modifies attributes of a span, log, or metric. Please refer to [config.go](./config.go) for the config spec. @@ -256,3 +260,7 @@ regexp: # cachemaxnumentries is the max number of entries of the LRU cache; ignored if cacheenabled is false. cachemaxnumentries: ``` + +[alpha]:https://github.com/open-telemetry/opentelemetry-collector#alpha +[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/processor/attributesprocessor/factory.go b/processor/attributesprocessor/factory.go index 4374fba336a7..81e9e634334f 100644 --- a/processor/attributesprocessor/factory.go +++ b/processor/attributesprocessor/factory.go @@ -65,7 +65,7 @@ func createTracesProcessor( } attrProc, err := attraction.NewAttrProc(&oCfg.Settings) if err != nil { - return nil, fmt.Errorf("error creating \"attributes\" processor: %w of processor %v", err, cfg.ID()) + return nil, fmt.Errorf("error creating \"attributes\" processor %v: %w", cfg.ID(), err) } include, err := filterspan.NewMatcher(oCfg.Include) if err != nil { @@ -95,7 +95,7 @@ func createLogProcessor( } attrProc, err := attraction.NewAttrProc(&oCfg.Settings) if err != nil { - return nil, fmt.Errorf("error creating \"attributes\" processor: %w of processor %v", err, cfg.ID()) + return nil, fmt.Errorf("error creating \"attributes\" processor %v: %w", cfg.ID(), err) } include, err := filterlog.NewMatcher(oCfg.Include) @@ -128,7 +128,7 @@ func createMetricsProcessor( attrProc, err := attraction.NewAttrProc(&oCfg.Settings) if err != nil { - return nil, fmt.Errorf("error creating \"attributes\" processor: %w of processor %v", err, cfg.ID()) + return nil, fmt.Errorf("error creating \"attributes\" processor %v: %w", cfg.ID(), err) } include, err := filtermetric.NewMatcher(filtermetric.CreateMatchPropertiesFromDefault(oCfg.Include)) diff --git a/processor/attributesprocessor/factory_test.go b/processor/attributesprocessor/factory_test.go index ca3db3cbef86..aed3e128172c 100644 --- a/processor/attributesprocessor/factory_test.go +++ b/processor/attributesprocessor/factory_test.go @@ -67,7 +67,7 @@ func TestFactoryCreateTracesProcessor_InvalidActions(t *testing.T) { } ap2, err2 := factory.CreateTracesProcessor(context.Background(), componenttest.NewNopProcessorCreateSettings(), cfg, consumertest.NewNop()) assert.Error(t, err2) - assert.Equal(t, "error creating \"attributes\" processor: error creating AttrProc due to invalid value \"array\" in field \"converted_type\" for action \"convert\" at the 0-th action of processor attributes", err2.Error()) + assert.Equal(t, "error creating \"attributes\" processor attributes: error creating AttrProc due to invalid value \"array\" in field \"converted_type\" for action \"convert\" at the 0-th action", err2.Error()) assert.Nil(t, ap2) } diff --git a/processor/attributesprocessor/go.mod b/processor/attributesprocessor/go.mod index bb7b10cbfd4e..211dd455defd 100644 --- a/processor/attributesprocessor/go.mod +++ b/processor/attributesprocessor/go.mod @@ -5,9 +5,9 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/processor/attributesprocessor/go.sum b/processor/attributesprocessor/go.sum index f386dc8536e9..77e2ef5eca98 100644 --- a/processor/attributesprocessor/go.sum +++ b/processor/attributesprocessor/go.sum @@ -197,12 +197,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/cumulativetodeltaprocessor/go.mod b/processor/cumulativetodeltaprocessor/go.mod index 4e46fa39497b..f26639f99b78 100644 --- a/processor/cumulativetodeltaprocessor/go.mod +++ b/processor/cumulativetodeltaprocessor/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/zap v1.21.0 diff --git a/processor/cumulativetodeltaprocessor/go.sum b/processor/cumulativetodeltaprocessor/go.sum index d653d5e85e47..a42fbf37653c 100644 --- a/processor/cumulativetodeltaprocessor/go.sum +++ b/processor/cumulativetodeltaprocessor/go.sum @@ -180,10 +180,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/deltatorateprocessor/go.mod b/processor/deltatorateprocessor/go.mod index 2d65cd385886..2809cd283d13 100644 --- a/processor/deltatorateprocessor/go.mod +++ b/processor/deltatorateprocessor/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/processor/deltatorateprocessor/go.sum b/processor/deltatorateprocessor/go.sum index b9e497d908c2..05c2e8ab08cf 100644 --- a/processor/deltatorateprocessor/go.sum +++ b/processor/deltatorateprocessor/go.sum @@ -186,10 +186,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/filterprocessor/README.md b/processor/filterprocessor/README.md index 184d37cf36eb..cbcfbd991656 100644 --- a/processor/filterprocessor/README.md +++ b/processor/filterprocessor/README.md @@ -1,7 +1,15 @@ # Filter Processor - Supported pipeline types: logs, metrics, spans -- The filter processor can be configured to include or exclude: +======= +| Status | | +| ------------------------ | ----------------- | +| Stability | [alpha] | +| Supported pipeline types | metrics, logs, traces | +| Distributions | [core], [contrib] | + +The filter processor can be configured to include or exclude: + - logs, based on resource attributes using the `strict` or `regexp` match types - metrics based on metric name in the case of the `strict` or `regexp` match types, @@ -241,3 +249,7 @@ processors: - Key: container.host Value: (localhost|127.0.0.1) ``` + +[alpha]:https://github.com/open-telemetry/opentelemetry-collector#alpha +[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/processor/filterprocessor/go.mod b/processor/filterprocessor/go.mod index 1b019262ab42..7f9dff62783e 100644 --- a/processor/filterprocessor/go.mod +++ b/processor/filterprocessor/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -26,7 +26,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/spf13/cast v1.5.0 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/processor/filterprocessor/go.sum b/processor/filterprocessor/go.sum index f386dc8536e9..77e2ef5eca98 100644 --- a/processor/filterprocessor/go.sum +++ b/processor/filterprocessor/go.sum @@ -197,12 +197,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/groupbyattrsprocessor/README.md b/processor/groupbyattrsprocessor/README.md index 78f980d6e2a3..bfce805ed9d8 100644 --- a/processor/groupbyattrsprocessor/README.md +++ b/processor/groupbyattrsprocessor/README.md @@ -11,7 +11,7 @@ Typical use cases: * extract resources from "flat" data formats, such as Fluentbit logs or Prometheus metrics * associate Prometheus metrics to a *Resource* that describes the relevant host, based on label present on all metrics * optimize data packaging by extracting common attributes -* [compacting](#compaction) multiple records that share the same Resource and InstrumentationLibrary attributes but are under multiple ResourceSpans/ResourceMetrics/ResourceLogs, into a single ResourceSpans/ResourceMetrics/ResourceLogs (when empty list of keys is being provided). This might happen e.g. when [groupbytrace](../groupbytraceprocessor) processor is being used or data comes in multiple requests. By compacting data, it takes less memory, is more efficiently processed, serialized and the number of export requests is reduced (e.g. in case of [jaeger](../../exporters/jaegerexporter) exporter). +* [compacting](#compaction) multiple records that share the same Resource and InstrumentationLibrary attributes but are under multiple ResourceSpans/ResourceMetrics/ResourceLogs, into a single ResourceSpans/ResourceMetrics/ResourceLogs (when empty list of keys is being provided). This might happen e.g. when [groupbytrace](../groupbytraceprocessor) processor is being used or data comes in multiple requests. By compacting data, it takes less memory, is more efficiently processed, serialized and the number of export requests is reduced (e.g. in case of [jaeger](../../exporter/jaegerexporter) exporter). It is recommended to use the `groupbyattrs` processor together with [batch](https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/batchprocessor) processor, as a consecutive step, as this will reduce the fragmentation of data (by grouping records together under matching Resource/Instrumentation Library) diff --git a/processor/groupbyattrsprocessor/go.mod b/processor/groupbyattrsprocessor/go.mod index 502ce960a75d..0ff2b549a656 100644 --- a/processor/groupbyattrsprocessor/go.mod +++ b/processor/groupbyattrsprocessor/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/processor/groupbyattrsprocessor/go.sum b/processor/groupbyattrsprocessor/go.sum index 11600adea229..cb4ade95a036 100644 --- a/processor/groupbyattrsprocessor/go.sum +++ b/processor/groupbyattrsprocessor/go.sum @@ -183,10 +183,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/groupbytraceprocessor/go.mod b/processor/groupbytraceprocessor/go.mod index dcf45dff73c3..c2148e984115 100644 --- a/processor/groupbytraceprocessor/go.mod +++ b/processor/groupbytraceprocessor/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 diff --git a/processor/groupbytraceprocessor/go.sum b/processor/groupbytraceprocessor/go.sum index 1c441c552618..b4998ff2ba68 100644 --- a/processor/groupbytraceprocessor/go.sum +++ b/processor/groupbytraceprocessor/go.sum @@ -188,10 +188,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/k8sattributesprocessor/go.mod b/processor/k8sattributesprocessor/go.mod index b368e2480ab1..d82ad9e42069 100644 --- a/processor/k8sattributesprocessor/go.mod +++ b/processor/k8sattributesprocessor/go.mod @@ -6,9 +6,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 k8s.io/api v0.24.1 k8s.io/apimachinery v0.24.1 diff --git a/processor/k8sattributesprocessor/go.sum b/processor/k8sattributesprocessor/go.sum index e9524c895f5c..236c3914ca76 100644 --- a/processor/k8sattributesprocessor/go.sum +++ b/processor/k8sattributesprocessor/go.sum @@ -389,12 +389,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/k8sattributesprocessor/options_test.go b/processor/k8sattributesprocessor/options_test.go index a6b9a198e000..5476a1775017 100644 --- a/processor/k8sattributesprocessor/options_test.go +++ b/processor/k8sattributesprocessor/options_test.go @@ -16,7 +16,6 @@ package k8sattributesprocessor import ( - "os" "reflect" "regexp" "testing" @@ -57,12 +56,10 @@ func TestWithFilterNode(t *testing.T) { assert.NoError(t, withFilterNode("testnode", "NODE_NAME")(p)) assert.Equal(t, p.filters.Node, "") - os.Setenv("NODE_NAME", "nodefromenv") + t.Setenv("NODE_NAME", "nodefromenv") p = &kubernetesprocessor{} assert.NoError(t, withFilterNode("testnode", "NODE_NAME")(p)) assert.Equal(t, p.filters.Node, "nodefromenv") - - os.Unsetenv("NODE_NAME") } func TestWithPassthrough(t *testing.T) { diff --git a/processor/k8sattributesprocessor/processor.go b/processor/k8sattributesprocessor/processor.go index 226d3d96a262..60bd2667c5d3 100644 --- a/processor/k8sattributesprocessor/processor.go +++ b/processor/k8sattributesprocessor/processor.go @@ -108,6 +108,7 @@ func (kp *kubernetesprocessor) processLogs(ctx context.Context, ld plog.Logs) (p // processResource adds Pod metadata tags to resource based on pod association configuration func (kp *kubernetesprocessor) processResource(ctx context.Context, resource pcommon.Resource) { podIdentifierKey, podIdentifierValue := extractPodID(ctx, resource.Attributes(), kp.podAssociations) + kp.logger.Debug("evaluating pod identifier", zap.String("key", podIdentifierKey), zap.Any("value", podIdentifierValue)) if podIdentifierKey != "" { resource.Attributes().InsertString(podIdentifierKey, string(podIdentifierValue)) } @@ -118,6 +119,8 @@ func (kp *kubernetesprocessor) processResource(ctx context.Context, resource pco if podIdentifierKey != "" { if pod, ok := kp.kc.GetPod(podIdentifierValue); ok { + kp.logger.Debug("getting the pod", zap.String("key", podIdentifierKey), zap.Any("pod", pod)) + for key, val := range pod.Attributes { resource.Attributes().InsertString(key, val) } diff --git a/processor/logstransformprocessor/go.mod b/processor/logstransformprocessor/go.mod index 6ba919f769c7..484f3cb14402 100644 --- a/processor/logstransformprocessor/go.mod +++ b/processor/logstransformprocessor/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/processor/logstransformprocessor/go.sum b/processor/logstransformprocessor/go.sum index dddab23cb5c5..0e05dee61887 100644 --- a/processor/logstransformprocessor/go.sum +++ b/processor/logstransformprocessor/go.sum @@ -206,10 +206,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/metricsgenerationprocessor/go.mod b/processor/metricsgenerationprocessor/go.mod index 38d99273a43c..cc5b7db65132 100644 --- a/processor/metricsgenerationprocessor/go.mod +++ b/processor/metricsgenerationprocessor/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/processor/metricsgenerationprocessor/go.sum b/processor/metricsgenerationprocessor/go.sum index b9e497d908c2..05c2e8ab08cf 100644 --- a/processor/metricsgenerationprocessor/go.sum +++ b/processor/metricsgenerationprocessor/go.sum @@ -186,10 +186,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/metricstransformprocessor/config.go b/processor/metricstransformprocessor/config.go index bde7794b45b6..eccb5042e488 100644 --- a/processor/metricstransformprocessor/config.go +++ b/processor/metricstransformprocessor/config.go @@ -197,12 +197,16 @@ type OperationAction string const ( // AddLabel adds a new label to an existing metric. + // Metric has to match the FilterConfig with all its data points if used with Update ConfigAction, + // otherwise the operation will be ignored. AddLabel OperationAction = "add_label" // UpdateLabel applies name changes to label and/or label values. UpdateLabel OperationAction = "update_label" // DeleteLabelValue deletes a label value by also removing all the points associated with this label value + // Metric has to match the FilterConfig with all its data points if used with Update ConfigAction, + // otherwise the operation will be ignored. DeleteLabelValue OperationAction = "delete_label_value" // ToggleScalarDataType changes the data type from int64 to double, or vice-versa @@ -213,10 +217,14 @@ const ( // AggregateLabels aggregates away all labels other than the ones in Operation.LabelSet // by the method indicated by Operation.AggregationType. + // Metric has to match the FilterConfig with all its data points if used with Update ConfigAction, + // otherwise the operation will be ignored. AggregateLabels OperationAction = "aggregate_labels" // AggregateLabelValues aggregates away the values in Operation.AggregatedValues // by the method indicated by Operation.AggregationType. + // Metric has to match the FilterConfig with all its data points if used with Update ConfigAction, + // otherwise the operation will be ignored. AggregateLabelValues OperationAction = "aggregate_label_values" ) diff --git a/processor/metricstransformprocessor/datapoint_aggregation.go b/processor/metricstransformprocessor/datapoint_aggregation.go index 7f2295b6b0d7..895f8bdf81d1 100644 --- a/processor/metricstransformprocessor/datapoint_aggregation.go +++ b/processor/metricstransformprocessor/datapoint_aggregation.go @@ -193,26 +193,13 @@ func (mtp *metricsTransformProcessor) computeDistVals(val1 *metricspb.Distributi }, }, }, - Count: val1.Count + val2.Count, - Sum: val1.Sum + val2.Sum, - Buckets: buckets, - SumOfSquaredDeviation: mtp.computeSumOfSquaredDeviation(val1, val2), + Count: val1.Count + val2.Count, + Sum: val1.Sum + val2.Sum, + Buckets: buckets, } return newDistVal } -// computeSumOfSquaredDeviation computes the combined SumOfSquaredDeviation from the two points -// Formula derived from https://math.stackexchange.com/questions/2971315/how-do-i-combine-standard-deviations-of-two-groups -// SSDcomb = SSD1 + n(ave(x) - ave(z))^2 + SSD2 +n(ave(y) - ave(z))^2 -func (mtp *metricsTransformProcessor) computeSumOfSquaredDeviation(val1 *metricspb.DistributionValue, val2 *metricspb.DistributionValue) float64 { - mean1 := val1.Sum / float64(val1.Count) - mean2 := val2.Sum / float64(val2.Count) - meanCombined := (val1.Sum + val2.Sum) / float64(val1.Count+val2.Count) - squaredMeanDiff1 := math.Pow(mean1-meanCombined, 2) - squaredMeanDiff2 := math.Pow(mean2-meanCombined, 2) - return val1.SumOfSquaredDeviation + (float64(val1.Count) * squaredMeanDiff1) + val2.SumOfSquaredDeviation + (float64(val2.Count) * squaredMeanDiff2) -} - // pickExemplar picks an exemplar from 2 randomly with each haing a 50% chance of getting picked func (mtp *metricsTransformProcessor) pickExemplar(e1 *metricspb.DistributionValue_Exemplar, e2 *metricspb.DistributionValue_Exemplar) *metricspb.DistributionValue_Exemplar { r := rand.Intn(2) diff --git a/processor/metricstransformprocessor/factory.go b/processor/metricstransformprocessor/factory.go index e90ef0d20c79..434ab592139f 100644 --- a/processor/metricstransformprocessor/factory.go +++ b/processor/metricstransformprocessor/factory.go @@ -196,13 +196,13 @@ func createFilter(filterConfig FilterConfig) (internalFilter, error) { if err != nil { return nil, err } - return internalFilterStrict{include: filterConfig.Include, matchLabels: matchers}, nil + return internalFilterStrict{include: filterConfig.Include, attrMatchers: matchers}, nil case RegexpMatchType: matchers, err := getMatcherMap(filterConfig.MatchLabels, func(str string) (StringMatcher, error) { return regexp.Compile(str) }) if err != nil { return nil, err } - return internalFilterRegexp{include: regexp.MustCompile(filterConfig.Include), matchLabels: matchers}, nil + return internalFilterRegexp{include: regexp.MustCompile(filterConfig.Include), attrMatchers: matchers}, nil } return nil, fmt.Errorf("invalid match type: %v", filterConfig.MatchType) diff --git a/processor/metricstransformprocessor/go.mod b/processor/metricstransformprocessor/go.mod index e6c2711684b7..078576268d99 100644 --- a/processor/metricstransformprocessor/go.mod +++ b/processor/metricstransformprocessor/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.28.0 @@ -32,7 +32,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/processor/metricstransformprocessor/go.sum b/processor/metricstransformprocessor/go.sum index 106f3711b5c3..3b5440d12e03 100644 --- a/processor/metricstransformprocessor/go.sum +++ b/processor/metricstransformprocessor/go.sum @@ -185,12 +185,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/metricstransformprocessor/metrics_transform_processor.go b/processor/metricstransformprocessor/metrics_transform_processor.go index 0b5c1275d140..12cca72c0c79 100644 --- a/processor/metricstransformprocessor/metrics_transform_processor.go +++ b/processor/metricstransformprocessor/metrics_transform_processor.go @@ -25,7 +25,9 @@ import ( agentmetricspb "github.com/census-instrumentation/opencensus-proto/gen-go/agent/metrics/v1" metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" resourcepb "github.com/census-instrumentation/opencensus-proto/gen-go/resource/v1" + "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/service/featuregate" "go.uber.org/zap" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/timestamppb" @@ -33,9 +35,28 @@ import ( internaldata "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus" ) +var otlpDataModelGateID = "processor.metricstransformprocessor.UseOTLPDataModel" + +// otlpDataModelGate is a feature gate that controls which data model the processor uses for metric transformation: +// - new OLTP data model if enabled, +// - old OpenCensus data mode if disabled. +var otlpDataModelGate = featuregate.Gate{ + ID: otlpDataModelGateID, + Enabled: true, + Description: "Controls which data model the processor uses for metric transformation internally: the new OLTP " + + "data model if the feature gate is enabled, or the old OpenCensus data model if gate is disabled. " + + "If you see any bugs in the processor introduced after 0.54.0 version, " + + "please submit an issue and disable this feature gate to bring back the old behavior", +} + +func init() { + featuregate.GetRegistry().MustRegister(otlpDataModelGate) +} + type metricsTransformProcessor struct { - transforms []internalTransform - logger *zap.Logger + transforms []internalTransform + logger *zap.Logger + otlpDataModelGateEnabled bool } type internalTransform struct { @@ -58,6 +79,11 @@ type internalOperation struct { type internalFilter interface { getMatches(toMatch metricNameMapping) []*match getSubexpNames() []string + matchMetric(pmetric.Metric) bool + extractMatchedMetric(pmetric.Metric) pmetric.Metric + expand(string, string) string + submatches(pmetric.Metric) []int + matchAttrs(pcommon.Map) bool } type match struct { @@ -77,8 +103,8 @@ func (s strictMatcher) MatchString(cmp string) bool { } type internalFilterStrict struct { - include string - matchLabels map[string]StringMatcher + include string + attrMatchers map[string]StringMatcher } func (f internalFilterStrict) getMatches(toMatch metricNameMapping) []*match { @@ -86,7 +112,7 @@ func (f internalFilterStrict) getMatches(toMatch metricNameMapping) []*match { if metrics, ok := toMatch[f.include]; ok { matches := make([]*match, 0) for _, metric := range metrics { - matchedMetric := labelMatched(f.matchLabels, metric) + matchedMetric := labelMatched(f.attrMatchers, metric) if matchedMetric != nil { matches = append(matches, &match{metric: matchedMetric}) } @@ -102,8 +128,8 @@ func (f internalFilterStrict) getSubexpNames() []string { } type internalFilterRegexp struct { - include *regexp.Regexp - matchLabels map[string]StringMatcher + include *regexp.Regexp + attrMatchers map[string]StringMatcher } func (f internalFilterRegexp) getMatches(toMatch metricNameMapping) []*match { @@ -111,7 +137,7 @@ func (f internalFilterRegexp) getMatches(toMatch metricNameMapping) []*match { for name, metrics := range toMatch { if submatches := f.include.FindStringSubmatchIndex(name); submatches != nil { for _, metric := range metrics { - matchedMetric := labelMatched(f.matchLabels, metric) + matchedMetric := labelMatched(f.attrMatchers, metric) if matchedMetric != nil { matches = append(matches, &match{metric: matchedMetric, pattern: f.include, submatches: submatches}) } @@ -125,8 +151,8 @@ func (f internalFilterRegexp) getSubexpNames() []string { return f.include.SubexpNames() } -func labelMatched(matchLabels map[string]StringMatcher, metric *metricspb.Metric) *metricspb.Metric { - if len(matchLabels) == 0 { +func labelMatched(attrMatchers map[string]StringMatcher, metric *metricspb.Metric) *metricspb.Metric { + if len(attrMatchers) == 0 { return metric } @@ -137,7 +163,7 @@ func labelMatched(matchLabels map[string]StringMatcher, metric *metricspb.Metric var timeSeriesWithMatchedLabel []*metricspb.TimeSeries labelIndexValueMap := make(map[int]StringMatcher) - for key, value := range matchLabels { + for key, value := range attrMatchers { keyFound := false for idx, label := range metric.MetricDescriptor.LabelKeys { @@ -204,13 +230,23 @@ func (mnm metricNameMapping) remove(name string, metrics ...*metricspb.Metric) { func newMetricsTransformProcessor(logger *zap.Logger, internalTransforms []internalTransform) *metricsTransformProcessor { return &metricsTransformProcessor{ - transforms: internalTransforms, - logger: logger, + transforms: internalTransforms, + logger: logger, + otlpDataModelGateEnabled: featuregate.GetRegistry().IsEnabled(otlpDataModelGateID), } } // processMetrics implements the ProcessMetricsFunc type. func (mtp *metricsTransformProcessor) processMetrics(_ context.Context, md pmetric.Metrics) (pmetric.Metrics, error) { + if mtp.otlpDataModelGateEnabled { + return mtp.processOTLPMetrics(md) + } + return mtp.processOCMetrics(md) +} + +// processOCMetrics process metrics using OpenCensus data model internally. +// Used only if "processor.metricstransformprocessor.UseOTLPDataModel" feature gate set to false. Will be removed soon. +func (mtp *metricsTransformProcessor) processOCMetrics(md pmetric.Metrics) (pmetric.Metrics, error) { rms := md.ResourceMetrics() groupedMds := make([]*agentmetricspb.ExportMetricsServiceRequest, 0) @@ -365,7 +401,7 @@ func (mtp *metricsTransformProcessor) combine(matchedMetrics []*match, transform for i := 1; i < len(match.submatches)/2; i++ { submatch := match.metric.MetricDescriptor.Name[match.submatches[2*i]:match.submatches[2*i+1]] submatch = replaceCaseOfSubmatch(transform.SubmatchCase, submatch) - ts.LabelValues = append(ts.LabelValues, &metricspb.LabelValue{Value: submatch, HasValue: (submatch != "")}) + ts.LabelValues = append(ts.LabelValues, &metricspb.LabelValue{Value: submatch, HasValue: submatch != ""}) } allTimeseries = append(allTimeseries, match.metric.Timeseries...) diff --git a/processor/metricstransformprocessor/metrics_transform_processor_group_test.go b/processor/metricstransformprocessor/metrics_transform_processor_group_test.go index 0048eda1021f..0d9a9e37c001 100644 --- a/processor/metricstransformprocessor/metrics_transform_processor_group_test.go +++ b/processor/metricstransformprocessor/metrics_transform_processor_group_test.go @@ -67,32 +67,39 @@ var ( ) func TestMetricsGrouping(t *testing.T) { - for _, test := range groupingTests { - t.Run(test.name, func(t *testing.T) { - next := new(consumertest.MetricsSink) - p := newMetricsTransformProcessor(zap.NewExample(), test.transforms) + for _, useOTLP := range []bool{false, true} { + for _, test := range groupingTests { + t.Run(test.name, func(t *testing.T) { + next := new(consumertest.MetricsSink) - mtp, err := processorhelper.NewMetricsProcessor(&Config{ - ProcessorSettings: config.NewProcessorSettings(config.NewComponentID(typeStr)), - }, next, p.processMetrics, processorhelper.WithCapabilities(consumerCapabilities)) - require.NoError(t, err) + p := &metricsTransformProcessor{ + transforms: test.transforms, + logger: zap.NewExample(), + otlpDataModelGateEnabled: useOTLP, + } - caps := mtp.Capabilities() - assert.Equal(t, true, caps.MutatesData) + mtp, err := processorhelper.NewMetricsProcessor(&Config{ + ProcessorSettings: config.NewProcessorSettings(config.NewComponentID(typeStr)), + }, next, p.processMetrics, processorhelper.WithCapabilities(consumerCapabilities)) + require.NoError(t, err) - input, err := golden.ReadMetrics(filepath.Join("testdata", "operation_group", test.name+"_in.json")) - require.NoError(t, err) - expected, err := golden.ReadMetrics(filepath.Join("testdata", "operation_group", test.name+"_out.json")) - require.NoError(t, err) + caps := mtp.Capabilities() + assert.Equal(t, true, caps.MutatesData) - cErr := mtp.ConsumeMetrics(context.Background(), input) - assert.NoError(t, cErr) + input, err := golden.ReadMetrics(filepath.Join("testdata", "operation_group", test.name+"_in.json")) + require.NoError(t, err) + expected, err := golden.ReadMetrics(filepath.Join("testdata", "operation_group", test.name+"_out.json")) + require.NoError(t, err) - got := next.AllMetrics() - require.Equal(t, 1, len(got)) - require.NoError(t, scrapertest.CompareMetrics(expected, got[0], scrapertest.IgnoreMetricValues())) + cErr := mtp.ConsumeMetrics(context.Background(), input) + assert.NoError(t, cErr) - assert.NoError(t, mtp.Shutdown(context.Background())) - }) + got := next.AllMetrics() + require.Equal(t, 1, len(got)) + require.NoError(t, scrapertest.CompareMetrics(expected, got[0], scrapertest.IgnoreMetricValues())) + + assert.NoError(t, mtp.Shutdown(context.Background())) + }) + } } } diff --git a/processor/metricstransformprocessor/metrics_transform_processor_otlp.go b/processor/metricstransformprocessor/metrics_transform_processor_otlp.go new file mode 100644 index 000000000000..3af5fdd6c994 --- /dev/null +++ b/processor/metricstransformprocessor/metrics_transform_processor_otlp.go @@ -0,0 +1,543 @@ +// Copyright 2020 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 metricstransformprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor" + +import ( + "fmt" + "strconv" + + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +// extractAndRemoveMatchedMetrics extracts matched metrics from ms metric slice and returns a new slice. +// Extracted metrics can have reduced number of data point if not all of them match the filter. +// All matched metrics, including metrics with only a subset of matched data points, +// are removed from the original ms metric slice. +func extractAndRemoveMatchedMetrics(f internalFilter, ms pmetric.MetricSlice) pmetric.MetricSlice { + extractedMetrics := pmetric.NewMetricSlice() + ms.RemoveIf(func(metric pmetric.Metric) bool { + if extractedMetric := f.extractMatchedMetric(metric); extractedMetric != (pmetric.Metric{}) { + extractedMetric.MoveTo(extractedMetrics.AppendEmpty()) + return true + } + return false + }) + return extractedMetrics +} + +// matchMetrics returns a slice of metrics matching the filter f. Original metrics slice is not affected. +func matchMetrics(f internalFilter, metrics pmetric.MetricSlice) []pmetric.Metric { + mm := make([]pmetric.Metric, 0, metrics.Len()) + for i := 0; i < metrics.Len(); i++ { + if f.matchMetric(metrics.At(i)) { + mm = append(mm, metrics.At(i)) + } + } + return mm +} + +// extractMatchedMetric returns a metric matching the filter. +// If provided metric matches the filter with all its data points, the original metric returned as is. +// If only part of data points match the filter, a new metric is returned with data points matching the filter. +// Otherwise, an invalid metric is returned. +func (f internalFilterStrict) extractMatchedMetric(metric pmetric.Metric) pmetric.Metric { + if metric.Name() == f.include { + return extractMetricWithMatchingAttrs(metric, f) + } + return pmetric.Metric{} +} + +func (f internalFilterStrict) matchMetric(metric pmetric.Metric) bool { + if metric.Name() == f.include { + return matchAnyDps(metric, f) + } + return false +} + +func (f internalFilterStrict) submatches(_ pmetric.Metric) []int { + return nil +} + +func (f internalFilterStrict) expand(_, _ string) string { + return "" +} + +func (f internalFilterStrict) matchAttrs(attrs pcommon.Map) bool { + return matchAttrs(f.attrMatchers, attrs) +} + +// extractMatchedMetric returns a metric matching the filter. +// If provided metric matches the filter with all its data points, the original metric returned as is. +// If only part of data points match the filter, a new metric is returned with data points matching the filter. +// Otherwise, an invalid metric is returned. +func (f internalFilterRegexp) extractMatchedMetric(metric pmetric.Metric) pmetric.Metric { + if submatches := f.include.FindStringSubmatchIndex(metric.Name()); submatches != nil { + return extractMetricWithMatchingAttrs(metric, f) + } + return pmetric.Metric{} +} + +func (f internalFilterRegexp) matchMetric(metric pmetric.Metric) bool { + if submatches := f.include.FindStringSubmatchIndex(metric.Name()); submatches != nil { + return matchAnyDps(metric, f) + } + return false +} + +func (f internalFilterRegexp) submatches(metric pmetric.Metric) []int { + return f.include.FindStringSubmatchIndex(metric.Name()) +} + +func (f internalFilterRegexp) expand(metricTempate, metricName string) string { + if submatches := f.include.FindStringSubmatchIndex(metricName); submatches != nil { + return string(f.include.ExpandString([]byte{}, metricTempate, metricName, submatches)) + } + return "" +} + +func (f internalFilterRegexp) matchAttrs(attrs pcommon.Map) bool { + return matchAttrs(f.attrMatchers, attrs) +} + +// matchAnyDps checks whether any metric data points match the filter, returns true if metric has no data points. +func matchAnyDps(metric pmetric.Metric, f internalFilter) bool { + match := true + rangeDataPointAttributes(metric, func(attrs pcommon.Map) bool { + if f.matchAttrs(attrs) { + match = true + return false + } + match = false + return true + }) + return match +} + +// matchAllDps checks whether all metric data points match the filter, returns true if metric has no data points. +func matchAllDps(metric pmetric.Metric, f internalFilter) bool { + match := true + rangeDataPointAttributes(metric, func(attrs pcommon.Map) bool { + if !f.matchAttrs(attrs) { + match = false + return false + } + return true + }) + return match +} + +// matchDps returns a slice of bool values representing data points matches following by the total number of matched +// data points. +// For example, for a metric with 3 data points where only first and third match the filter, the output will be: +// ([]bool{true, false, true}, 2). +func matchDps(metric pmetric.Metric, f internalFilter) (matchedDps []bool, matchedDpsCount int) { + matchedDps = []bool{} + rangeDataPointAttributes(metric, func(attrs pcommon.Map) bool { + match := f.matchAttrs(attrs) + if match { + matchedDpsCount++ + } + matchedDps = append(matchedDps, match) + return true + }) + return +} + +// extractMetricWithMatchingAttrs returns a metric with data points matching attrMatchers. +// New metric is returned if part of data points match the filter, +// original metric returned if all data points match the filter, +// and invalid metric returned if no data points match the filter. +func extractMetricWithMatchingAttrs(metric pmetric.Metric, f internalFilter) pmetric.Metric { + dpsMatches, matchedDpsCount := matchDps(metric, f) + if matchedDpsCount == len(dpsMatches) { + return metric + } + if matchedDpsCount == 0 { + return pmetric.Metric{} + } + + newMetric := pmetric.NewMetric() + newMetric.SetDataType(metric.DataType()) + newMetric.SetName(metric.Name()) + newMetric.SetDescription(metric.Description()) + newMetric.SetUnit(metric.Unit()) + + switch metric.DataType() { + case pmetric.MetricDataTypeGauge: + newMetric.Gauge().DataPoints().EnsureCapacity(matchedDpsCount) + for i := 0; i < metric.Gauge().DataPoints().Len(); i++ { + if dpsMatches[i] { + metric.Gauge().DataPoints().At(i).CopyTo(newMetric.Gauge().DataPoints().AppendEmpty()) + } + } + case pmetric.MetricDataTypeSum: + newMetric.Sum().DataPoints().EnsureCapacity(matchedDpsCount) + for i := 0; i < metric.Sum().DataPoints().Len(); i++ { + if dpsMatches[i] { + metric.Sum().DataPoints().At(i).CopyTo(newMetric.Sum().DataPoints().AppendEmpty()) + } + } + newMetric.Sum().SetAggregationTemporality(metric.Sum().AggregationTemporality()) + newMetric.Sum().SetIsMonotonic(metric.Sum().IsMonotonic()) + case pmetric.MetricDataTypeHistogram: + newMetric.Histogram().DataPoints().EnsureCapacity(matchedDpsCount) + for i := 0; i < metric.Histogram().DataPoints().Len(); i++ { + if dpsMatches[i] { + metric.Histogram().DataPoints().At(i).CopyTo(newMetric.Histogram().DataPoints().AppendEmpty()) + } + } + newMetric.Histogram().SetAggregationTemporality(metric.Histogram().AggregationTemporality()) + case pmetric.MetricDataTypeExponentialHistogram: + newMetric.ExponentialHistogram().DataPoints().EnsureCapacity(matchedDpsCount) + for i := 0; i < metric.ExponentialHistogram().DataPoints().Len(); i++ { + if dpsMatches[i] { + metric.ExponentialHistogram().DataPoints().At(i).CopyTo(newMetric.ExponentialHistogram().DataPoints().AppendEmpty()) + } + } + newMetric.ExponentialHistogram().SetAggregationTemporality(metric.ExponentialHistogram().AggregationTemporality()) + case pmetric.MetricDataTypeSummary: + newMetric.Summary().DataPoints().EnsureCapacity(matchedDpsCount) + for i := 0; i < metric.Summary().DataPoints().Len(); i++ { + if dpsMatches[i] { + metric.Summary().DataPoints().At(i).CopyTo(newMetric.Summary().DataPoints().AppendEmpty()) + } + } + } + + return newMetric +} + +func matchAttrs(attrMatchers map[string]StringMatcher, attrs pcommon.Map) bool { + for k, v := range attrMatchers { + attrVal, ok := attrs.Get(k) + // attribute values doesn't match, drop datapoint + if ok && !v.MatchString(attrVal.StringVal()) { + return false + } + + // if a label-key is not found then return nil only if the given label-value is non-empty. If a given label-value is empty + // and the key is not found then move forward. In this approach we can make sure certain key is not present which is a valid use case. + if !ok && !v.MatchString("") { + return false + } + } + return true +} + +// processOTLPMetrics process metrics using OTLP data model. +func (mtp *metricsTransformProcessor) processOTLPMetrics(md pmetric.Metrics) (pmetric.Metrics, error) { + rms := md.ResourceMetrics() + groupedRMs := pmetric.NewResourceMetricsSlice() + + rms.RemoveIf(func(rm pmetric.ResourceMetrics) bool { + rm.ScopeMetrics().RemoveIf(func(sm pmetric.ScopeMetrics) bool { + metrics := sm.Metrics() + + for _, transform := range mtp.transforms { + if transform.Action == Group { + extractedMetrics := extractAndRemoveMatchedMetrics(transform.MetricIncludeFilter, metrics) + groupMatchedMetrics(rm.Resource(), sm.Scope(), extractedMetrics, + transform).CopyTo(groupedRMs.AppendEmpty()) + } + + matchedMetrics := matchMetrics(transform.MetricIncludeFilter, metrics) + if len(matchedMetrics) == 0 { + continue + } + + if transform.Action == Combine { + + if err := canBeCombined(matchedMetrics); err != nil { + // TODO: report via trace / metric instead + mtp.logger.Warn(err.Error()) + continue + } + + extractedMetrics := extractAndRemoveMatchedMetrics(transform.MetricIncludeFilter, metrics) + combinedMetric := metrics.AppendEmpty() + combine(transform, extractedMetrics).MoveTo(combinedMetric) + + // set matchedMetrics to the combined metric so that any additional operations are performed on + // the combined metric + matchedMetrics = []pmetric.Metric{combinedMetric} + } + + for _, metric := range matchedMetrics { + if transform.Action == Insert { + matchedMetric := transform.MetricIncludeFilter.extractMatchedMetric(metric) + newMetric := metrics.AppendEmpty() + matchedMetric.CopyTo(newMetric) + metric = newMetric + } + transformMetric(metric, transform) + } + } + + return metrics.Len() == 0 + }) + + return rm.ScopeMetrics().Len() == 0 + }) + + groupedRMs.MoveAndAppendTo(rms) + + return md, nil +} + +// groupMatchedMetrics groups matched metrics by moving them from matchedMetrics into a new pmetric.ResourceMetrics. +func groupMatchedMetrics(resource pcommon.Resource, scope pcommon.InstrumentationScope, metrics pmetric.MetricSlice, + transform internalTransform) pmetric.ResourceMetrics { + rm := pmetric.NewResourceMetrics() + resource.CopyTo(rm.Resource()) + + for k, v := range transform.GroupResourceLabels { + rm.Resource().Attributes().UpsertString(k, v) + } + + sm := rm.ScopeMetrics().AppendEmpty() + scope.CopyTo(sm.Scope()) + metrics.MoveAndAppendTo(sm.Metrics()) + return rm +} + +// canBeCombined returns true if all the provided metrics share the same type, unit, and labels +func canBeCombined(metrics []pmetric.Metric) error { + if len(metrics) <= 1 { + return nil + } + + var firstMetric pmetric.Metric + for _, metric := range metrics { + if metric.DataType() == pmetric.MetricDataTypeSummary { + return fmt.Errorf("Summary metrics cannot be combined: %v ", metric.Name()) + } + + if firstMetric == (pmetric.Metric{}) { + firstMetric = metric + continue + } + + if firstMetric.DataType() != metric.DataType() { + return fmt.Errorf("metrics cannot be combined as they are of different types: %v (%v) and %v (%v)", + firstMetric.Name(), firstMetric.DataType(), metric.Name(), metric.DataType()) + } + if firstMetric.Unit() != metric.Unit() { + return fmt.Errorf("metrics cannot be combined as they have different units: %v (%v) and %v (%v)", + firstMetric.Name(), firstMetric.Unit(), metric.Name(), metric.Unit()) + } + + firstMetricAttrKeys := metricAttributeKeys(firstMetric) + metricAttrKeys := metricAttributeKeys(metric) + if len(firstMetricAttrKeys) != len(metricAttrKeys) { + return fmt.Errorf("metrics cannot be combined as they have different attributes: %v (%v) and %v (%v)", + firstMetric.Name(), firstMetricAttrKeys, metric.Name(), metricAttrKeys) + } + + for attr := range metricAttrKeys { + if _, ok := firstMetricAttrKeys[attr]; !ok { + return fmt.Errorf("metrics cannot be combined as they have different attributes: %v (%v) and %v (%v)", + firstMetric.Name(), firstMetricAttrKeys, metric.Name(), metricAttrKeys) + } + } + + switch firstMetric.DataType() { + case pmetric.MetricDataTypeSum: + if firstMetric.Sum().AggregationTemporality() != metric.Sum().AggregationTemporality() { + return fmt.Errorf( + "metrics cannot be combined as they have different aggregation temporalities: %v (%v) and %v (%v)", + firstMetric.Name(), firstMetric.Sum().AggregationTemporality(), metric.Name(), metric.Sum().AggregationTemporality()) + } + if firstMetric.Sum().IsMonotonic() != metric.Sum().IsMonotonic() { + return fmt.Errorf( + "metrics cannot be combined as they have different monotonicity: %v (%v) and %v (%v)", + firstMetric.Name(), firstMetric.Sum().IsMonotonic(), metric.Name(), metric.Sum().IsMonotonic()) + } + case pmetric.MetricDataTypeHistogram: + if firstMetric.Histogram().AggregationTemporality() != metric.Histogram().AggregationTemporality() { + return fmt.Errorf( + "metrics cannot be combined as they have different aggregation temporalities: %v (%v) and %v (%v)", + firstMetric.Name(), firstMetric.Histogram().AggregationTemporality(), metric.Name(), + metric.Histogram().AggregationTemporality()) + + } + case pmetric.MetricDataTypeExponentialHistogram: + if firstMetric.ExponentialHistogram().AggregationTemporality() != metric.ExponentialHistogram().AggregationTemporality() { + return fmt.Errorf( + "metrics cannot be combined as they have different aggregation temporalities: %v (%v) and %v (%v)", + firstMetric.Name(), firstMetric.ExponentialHistogram().AggregationTemporality(), metric.Name(), + metric.ExponentialHistogram().AggregationTemporality()) + + } + } + } + + return nil +} + +func metricAttributeKeys(metric pmetric.Metric) map[string]struct{} { + attrKeys := map[string]struct{}{} + rangeDataPointAttributes(metric, func(attrs pcommon.Map) bool { + attrs.Range(func(k string, _ pcommon.Value) bool { + attrKeys[k] = struct{}{} + return true + }) + return true + }) + return attrKeys +} + +// combine combines the metrics based on the supplied filter. +// canBeCombined must be called before. +func combine(transform internalTransform, metrics pmetric.MetricSlice) pmetric.Metric { + firstMetric := metrics.At(0) + + // create combined metric with relevant name & descriptor + combinedMetric := pmetric.NewMetric() + copyMetricDetails(firstMetric, combinedMetric) + combinedMetric.SetName(transform.NewName) + + // append attribute keys based on the transform filter's named capturing groups + subexprNames := transform.MetricIncludeFilter.getSubexpNames() + reAttrKeys := make([]string, len(subexprNames)) + for i := 1; i < len(subexprNames); i++ { + // if the subexpression is not named, use regexp notation, e.g. $1 + name := subexprNames[i] + if name == "" { + name = "$" + strconv.Itoa(i) + } + reAttrKeys[i] = name + } + + for i := 0; i < metrics.Len(); i++ { + metric := metrics.At(i) + + // append attr values based on regex submatches + submatches := transform.MetricIncludeFilter.submatches(metric) + if len(submatches) > 0 { + rangeDataPointAttributes(metric, func(m pcommon.Map) bool { + for i := 1; i < len(submatches)/2; i++ { + submatch := metric.Name()[submatches[2*i]:submatches[2*i+1]] + submatch = replaceCaseOfSubmatch(transform.SubmatchCase, submatch) + if submatch != "" { + m.UpsertString(reAttrKeys[i], submatch) + } + } + return true + }) + } + } + + groupMetrics(metrics, transform.AggregationType, combinedMetric) + + return combinedMetric +} + +func copyMetricDetails(from, to pmetric.Metric) { + to.SetName(from.Name()) + to.SetDataType(from.DataType()) + to.SetUnit(from.Unit()) + switch from.DataType() { + case pmetric.MetricDataTypeSum: + to.Sum().SetAggregationTemporality(from.Sum().AggregationTemporality()) + to.Sum().SetIsMonotonic(from.Sum().IsMonotonic()) + case pmetric.MetricDataTypeHistogram: + to.Histogram().SetAggregationTemporality(from.Histogram().AggregationTemporality()) + case pmetric.MetricDataTypeExponentialHistogram: + to.ExponentialHistogram().SetAggregationTemporality(from.Histogram().AggregationTemporality()) + } +} + +// rangeDataPointAttributes calls f sequentially on attributes of every metric data point. +// The iteration terminates if f returns false. +func rangeDataPointAttributes(metric pmetric.Metric, f func(pcommon.Map) bool) { + switch metric.DataType() { + case pmetric.MetricDataTypeGauge: + for i := 0; i < metric.Gauge().DataPoints().Len(); i++ { + dp := metric.Gauge().DataPoints().At(i) + if !f(dp.Attributes()) { + return + } + } + case pmetric.MetricDataTypeSum: + for i := 0; i < metric.Sum().DataPoints().Len(); i++ { + dp := metric.Sum().DataPoints().At(i) + if !f(dp.Attributes()) { + return + } + } + case pmetric.MetricDataTypeHistogram: + for i := 0; i < metric.Histogram().DataPoints().Len(); i++ { + dp := metric.Histogram().DataPoints().At(i) + if !f(dp.Attributes()) { + return + } + } + case pmetric.MetricDataTypeExponentialHistogram: + for i := 0; i < metric.ExponentialHistogram().DataPoints().Len(); i++ { + dp := metric.ExponentialHistogram().DataPoints().At(i) + if !f(dp.Attributes()) { + return + } + } + case pmetric.MetricDataTypeSummary: + for i := 0; i < metric.Summary().DataPoints().Len(); i++ { + dp := metric.Summary().DataPoints().At(i) + if !f(dp.Attributes()) { + return + } + } + } +} + +// transformMetric updates the metric content based on operations indicated in transform. +func transformMetric(metric pmetric.Metric, transform internalTransform) { + canChangeMetric := transform.Action != Update || matchAllDps(metric, transform.MetricIncludeFilter) + + if transform.NewName != "" && canChangeMetric { + if newName := transform.MetricIncludeFilter.expand(transform.NewName, metric.Name()); newName != "" { + metric.SetName(newName) + } else { + metric.SetName(transform.NewName) + } + } + + for _, op := range transform.Operations { + switch op.configOperation.Action { + case UpdateLabel: + updateLabelOp(metric, op, transform.MetricIncludeFilter) + case AggregateLabels: + if canChangeMetric { + aggregateLabelsOp(metric, op) + } + case AggregateLabelValues: + if canChangeMetric { + aggregateLabelValuesOp(metric, op) + } + case ToggleScalarDataType: + toggleScalarDataTypeOp(metric, transform.MetricIncludeFilter) + case ScaleValue: + scaleValueOp(metric, op, transform.MetricIncludeFilter) + case AddLabel: + if canChangeMetric { + addLabelOp(metric, op) + } + case DeleteLabelValue: + if canChangeMetric { + deleteLabelValueOp(metric, op) + } + } + } +} diff --git a/processor/metricstransformprocessor/metrics_transform_processor_test.go b/processor/metricstransformprocessor/metrics_transform_processor_test.go index 20cb1cb2b62d..de4a3af837f0 100644 --- a/processor/metricstransformprocessor/metrics_transform_processor_test.go +++ b/processor/metricstransformprocessor/metrics_transform_processor_test.go @@ -17,7 +17,8 @@ package metricstransformprocessor import ( "context" - "math" + "sort" + "strings" "testing" metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" @@ -34,111 +35,53 @@ import ( ) func TestMetricsTransformProcessor(t *testing.T) { - for _, test := range standardTests { - t.Run(test.name, func(t *testing.T) { - next := new(consumertest.MetricsSink) - - p := newMetricsTransformProcessor(zap.NewExample(), test.transforms) - - mtp, err := processorhelper.NewMetricsProcessor( - &Config{ - ProcessorSettings: config.NewProcessorSettings(config.NewComponentID(typeStr)), - }, - next, - p.processMetrics, - processorhelper.WithCapabilities(consumerCapabilities)) - require.NoError(t, err) - - caps := mtp.Capabilities() - assert.Equal(t, true, caps.MutatesData) - ctx := context.Background() - - // process - cErr := mtp.ConsumeMetrics(context.Background(), internaldata.OCToMetrics(nil, nil, test.in)) - assert.NoError(t, cErr) - - // get and check results - got := next.AllMetrics() - require.Equal(t, 1, len(got)) - _, _, actualOutMetrics := internaldata.ResourceMetricsToOC(got[0].ResourceMetrics().At(0)) - require.Equal(t, len(test.out), len(actualOutMetrics)) - - for idx, out := range test.out { - actualOut := actualOutMetrics[idx] - if diff := cmp.Diff(actualOut, out, protocmp.Transform()); diff != "" { - t.Errorf("Unexpected difference:\n%v", diff) + for _, useOTLP := range []bool{false, true} { + for _, test := range standardTests { + t.Run(test.name, func(t *testing.T) { + next := new(consumertest.MetricsSink) + + p := &metricsTransformProcessor{ + transforms: test.transforms, + logger: zap.NewExample(), + otlpDataModelGateEnabled: useOTLP, } - } - assert.NoError(t, mtp.Shutdown(ctx)) - }) - } -} - -func TestComputeDistVals(t *testing.T) { - ssdTests := []struct { - name string - pointGroup1 []float64 - pointGroup2 []float64 - }{ - { - name: "similar point groups", - pointGroup1: []float64{1, 2, 3, 7, 4}, - pointGroup2: []float64{1, 2, 3, 3, 1}, - }, - { - name: "different size point groups", - pointGroup1: []float64{1, 2, 3, 7, 4}, - pointGroup2: []float64{1}, - }, - { - name: "point groups with an outlier", - pointGroup1: []float64{1, 2, 3, 7, 1000}, - pointGroup2: []float64{1, 2, 5}, - }, - } - - for _, test := range ssdTests { - t.Run(test.name, func(t *testing.T) { - p := newMetricsTransformProcessor(nil, nil) - - pointGroup1 := test.pointGroup1 - pointGroup2 := test.pointGroup2 - sum1, sumOfSquaredDeviation1 := calculateSumOfSquaredDeviation(pointGroup1) - sum2, sumOfSquaredDeviation2 := calculateSumOfSquaredDeviation(pointGroup2) - _, sumOfSquaredDeviation := calculateSumOfSquaredDeviation(append(pointGroup1, pointGroup2...)) - - val1 := &metricspb.DistributionValue{ - Count: int64(len(pointGroup1)), - Sum: sum1, - SumOfSquaredDeviation: sumOfSquaredDeviation1, - } - - val2 := &metricspb.DistributionValue{ - Count: int64(len(pointGroup2)), - Sum: sum2, - SumOfSquaredDeviation: sumOfSquaredDeviation2, - } - - outVal := p.computeSumOfSquaredDeviation(val1, val2) - - assert.Equal(t, sumOfSquaredDeviation, outVal) - }) - } -} + mtp, err := processorhelper.NewMetricsProcessor( + &Config{ + ProcessorSettings: config.NewProcessorSettings(config.NewComponentID(typeStr)), + }, + next, + p.processMetrics, + processorhelper.WithCapabilities(consumerCapabilities)) + require.NoError(t, err) + + caps := mtp.Capabilities() + assert.Equal(t, true, caps.MutatesData) + ctx := context.Background() + + // process + cErr := mtp.ConsumeMetrics(context.Background(), internaldata.OCToMetrics(nil, nil, test.in)) + assert.NoError(t, cErr) + + // get and check results + got := next.AllMetrics() + require.Equal(t, 1, len(got)) + _, _, actualOutMetrics := internaldata.ResourceMetricsToOC(got[0].ResourceMetrics().At(0)) + require.Equal(t, len(test.out), len(actualOutMetrics)) + + for idx, out := range test.out { + actualOut := actualOutMetrics[idx] + sortTimeseries(actualOut.Timeseries) + sortTimeseries(out.Timeseries) + if diff := cmp.Diff(actualOut, out, protocmp.Transform()); diff != "" { + t.Errorf("Unexpected difference:\n%v", diff) + } + } -// calculateSumOfSquaredDeviation returns the sum and the sumOfSquaredDeviation for this slice -func calculateSumOfSquaredDeviation(slice []float64) (sum float64, sumOfSquaredDeviation float64) { - sum = 0 - for _, e := range slice { - sum += e - } - ave := sum / float64(len(slice)) - sumOfSquaredDeviation = 0 - for _, e := range slice { - sumOfSquaredDeviation += math.Pow((e - ave), 2) + assert.NoError(t, mtp.Shutdown(ctx)) + }) + } } - return } func TestExemplars(t *testing.T) { @@ -149,6 +92,12 @@ func TestExemplars(t *testing.T) { assert.True(t, picked == exe1 || picked == exe2) } +func sortTimeseries(ts []*metricspb.TimeSeries) { + sort.Slice(ts, func(i, j int) bool { + return strings.Compare(ts[i].String(), ts[j].String()) < 0 + }) +} + func BenchmarkMetricsTransformProcessorRenameMetrics(b *testing.B) { const metricCount = 1000 diff --git a/processor/metricstransformprocessor/metrics_transform_processor_testcases_test.go b/processor/metricstransformprocessor/metrics_transform_processor_testcases_test.go index cfc8f94ebe69..922c7616834d 100644 --- a/processor/metricstransformprocessor/metrics_transform_processor_testcases_test.go +++ b/processor/metricstransformprocessor/metrics_transform_processor_testcases_test.go @@ -195,6 +195,81 @@ var ( build(), }, }, + { + name: "metric_label_update_label_and_label_value", + transforms: []internalTransform{ + { + MetricIncludeFilter: internalFilterStrict{include: "metric1"}, + Action: Update, + Operations: []internalOperation{ + { + configOperation: Operation{ + Action: UpdateLabel, + Label: "label1", + NewLabel: "new/label1", + }, + valueActionsMapping: map[string]string{"label1-value1": "new/label1-value1"}, + }, + }, + }, + }, + in: []*metricspb.Metric{ + metricBuilder().setName("metric1"). + setDataType(metricspb.MetricDescriptor_CUMULATIVE_INT64). + setLabels([]string{"label1"}). + addTimeseries(1, []string{"label1-value1"}). + addInt64Point(0, 3, 2).build(), + }, + out: []*metricspb.Metric{ + metricBuilder().setName("metric1"). + setDataType(metricspb.MetricDescriptor_CUMULATIVE_INT64). + setLabels([]string{"new/label1"}). + addTimeseries(1, []string{"new/label1-value1"}). + addInt64Point(0, 3, 2).build(), + }, + }, + { + name: "metric_label_update_with_regexp_filter", + transforms: []internalTransform{ + { + MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("^matched.*$")}, + Action: Update, + Operations: []internalOperation{ + { + configOperation: Operation{ + Action: UpdateLabel, + Label: "label1", + }, + valueActionsMapping: map[string]string{"label1-value1": "new/label1-value1"}, + }, + }, + }, + }, + in: []*metricspb.Metric{ + metricBuilder().setName("matched-metric1"). + setDataType(metricspb.MetricDescriptor_CUMULATIVE_INT64). + setLabels([]string{"label1", "label2"}). + addTimeseries(1, []string{"label1-value1", "label2-value1"}). + addInt64Point(0, 3, 2).build(), + metricBuilder().setName("unmatched-metric2"). + setDataType(metricspb.MetricDescriptor_CUMULATIVE_INT64). + setLabels([]string{"label1", "label2"}). + addTimeseries(1, []string{"label1-value1", "label2-value1"}). + addInt64Point(0, 3, 2).build(), + }, + out: []*metricspb.Metric{ + metricBuilder().setName("matched-metric1"). + setDataType(metricspb.MetricDescriptor_CUMULATIVE_INT64). + setLabels([]string{"label1", "label2"}). + addTimeseries(1, []string{"new/label1-value1", "label2-value1"}). + addInt64Point(0, 3, 2).build(), + metricBuilder().setName("unmatched-metric2"). + setDataType(metricspb.MetricDescriptor_CUMULATIVE_INT64). + setLabels([]string{"label1", "label2"}). + addTimeseries(1, []string{"label1-value1", "label2-value1"}). + addInt64Point(0, 3, 2).build(), + }, + }, { name: "metric_label_aggregation_sum_int_update", transforms: []internalTransform{ @@ -486,6 +561,57 @@ var ( build(), }, }, + { + name: "metric_label_aggregation_insert_sum_with_several_attrs_match", + transforms: []internalTransform{ + { + MetricIncludeFilter: internalFilterStrict{include: "metric1", + attrMatchers: map[string]StringMatcher{"label0": strictMatcher("label0-value1")}}, + Action: Insert, + NewName: "new/metric1", + Operations: []internalOperation{ + { + configOperation: Operation{ + Action: AggregateLabels, + AggregationType: Sum, + LabelSet: []string{"label1", "label2"}, + }, + labelSetMap: map[string]bool{"label1": true, "label2": true}, + }, + }, + }, + }, + in: []*metricspb.Metric{ + metricBuilder().setName("metric1"). + setLabels([]string{"label0", "label1", "label2", "label3"}). + setDataType(metricspb.MetricDescriptor_GAUGE_INT64). + addTimeseries(2, []string{"label0-value1", "label1-value1", "label2-value1", "label3-value1"}). + addInt64Point(0, 3, 2). + addTimeseries(2, []string{"label0-value1", "label1-value1", "label2-value1", "label3-value2"}). + addInt64Point(1, 1, 2). + addTimeseries(2, []string{"label0-value2", "label1-value1", "label2-value1", "label3-value1"}). + addInt64Point(2, 1, 2). + build(), + }, + out: []*metricspb.Metric{ + metricBuilder().setName("metric1"). + setLabels([]string{"label0", "label1", "label2", "label3"}). + setDataType(metricspb.MetricDescriptor_GAUGE_INT64). + addTimeseries(2, []string{"label0-value1", "label1-value1", "label2-value1", "label3-value1"}). + addInt64Point(0, 3, 2). + addTimeseries(2, []string{"label0-value1", "label1-value1", "label2-value1", "label3-value2"}). + addInt64Point(1, 1, 2). + addTimeseries(2, []string{"label0-value2", "label1-value1", "label2-value1", "label3-value1"}). + addInt64Point(2, 1, 2). + build(), + metricBuilder().setName("new/metric1"). + setLabels([]string{"label1", "label2"}). + setDataType(metricspb.MetricDescriptor_GAUGE_INT64). + addTimeseries(2, []string{"label1-value1", "label2-value1"}). + addInt64Point(0, 4, 2). + build(), + }, + }, { name: "metric_label_values_aggregation_sum_int_update", transforms: []internalTransform{ @@ -570,6 +696,44 @@ var ( build(), }, }, + { + name: "metric_label_aggregation_ignored_for_partial_metric_match", + transforms: []internalTransform{ + { + MetricIncludeFilter: internalFilterStrict{include: "metric1", + attrMatchers: map[string]StringMatcher{"label1": strictMatcher("label1-value1")}}, + Action: Update, + Operations: []internalOperation{ + { + configOperation: Operation{ + Action: AggregateLabels, + AggregationType: Sum, + LabelSet: []string{"label1"}, + }, + labelSetMap: map[string]bool{"label1": true}, + }, + }, + }, + }, + in: []*metricspb.Metric{ + metricBuilder().setName("metric1"). + setLabels([]string{"label1", "label2"}). + setDataType(metricspb.MetricDescriptor_GAUGE_INT64). + addTimeseries(1, []string{"label1-value1", "label2-value1"}). + addTimeseries(1, []string{"label1-value2", "label2-value2"}). + addInt64Point(0, 3, 2).addInt64Point(1, 1, 2). + build(), + }, + out: []*metricspb.Metric{ + metricBuilder().setName("metric1"). + setLabels([]string{"label1", "label2"}). + setDataType(metricspb.MetricDescriptor_GAUGE_INT64). + addTimeseries(1, []string{"label1-value1", "label2-value1"}). + addTimeseries(1, []string{"label1-value2", "label2-value2"}). + addInt64Point(0, 3, 2).addInt64Point(1, 1, 2). + build(), + }, + }, { name: "metric_label_values_aggregation_not_sum_distribution_update", transforms: []internalTransform{ @@ -653,9 +817,10 @@ var ( name: "metric_name_insert_with_match_label_strict", transforms: []internalTransform{ { - MetricIncludeFilter: internalFilterStrict{include: "metric1", matchLabels: map[string]StringMatcher{"label1": strictMatcher("value1")}}, - Action: Insert, - NewName: "new/metric1", + MetricIncludeFilter: internalFilterStrict{include: "metric1", + attrMatchers: map[string]StringMatcher{"label1": strictMatcher("value1")}}, + Action: Insert, + NewName: "new/metric1", }, }, in: []*metricspb.Metric{ @@ -682,9 +847,10 @@ var ( name: "metric_name_insert_with_match_label_regexp", transforms: []internalTransform{ { - MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), matchLabels: map[string]StringMatcher{"label1": regexp.MustCompile(`(.|\s)*\S(.|\s)*`)}}, - Action: Insert, - NewName: "new/metric1", + MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), + attrMatchers: map[string]StringMatcher{"label1": regexp.MustCompile(`(.|\s)*\S(.|\s)*`)}}, + Action: Insert, + NewName: "new/metric1", }, }, in: []*metricspb.Metric{ @@ -711,9 +877,10 @@ var ( name: "metric_name_insert_with_match_label_regexp_two_datapoints_positive", transforms: []internalTransform{ { - MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), matchLabels: map[string]StringMatcher{"label1": regexp.MustCompile("value3")}}, - Action: Insert, - NewName: "new/metric1", + MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), + attrMatchers: map[string]StringMatcher{"label1": regexp.MustCompile("value3")}}, + Action: Insert, + NewName: "new/metric1", }, }, in: []*metricspb.Metric{ @@ -744,9 +911,10 @@ var ( name: "metric_name_insert_with_match_label_regexp_two_datapoints_negative", transforms: []internalTransform{ { - MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), matchLabels: map[string]StringMatcher{"label1": regexp.MustCompile("value3")}}, - Action: Insert, - NewName: "new/metric1", + MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), + attrMatchers: map[string]StringMatcher{"label1": regexp.MustCompile("value3")}}, + Action: Insert, + NewName: "new/metric1", }, }, in: []*metricspb.Metric{ @@ -772,9 +940,10 @@ var ( name: "metric_name_insert_with_match_label_regexp_with_full_value", transforms: []internalTransform{ { - MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), matchLabels: map[string]StringMatcher{"label1": regexp.MustCompile("value1")}}, - Action: Insert, - NewName: "new/metric1", + MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), + attrMatchers: map[string]StringMatcher{"label1": regexp.MustCompile("value1")}}, + Action: Insert, + NewName: "new/metric1", }, }, in: []*metricspb.Metric{ @@ -801,9 +970,10 @@ var ( name: "metric_name_insert_with_match_label_strict_negative", transforms: []internalTransform{ { - MetricIncludeFilter: internalFilterStrict{include: "metric1", matchLabels: map[string]StringMatcher{"label1": strictMatcher("wrong_value")}}, - Action: Insert, - NewName: "new/metric1", + MetricIncludeFilter: internalFilterStrict{include: "metric1", + attrMatchers: map[string]StringMatcher{"label1": strictMatcher("wrong_value")}}, + Action: Insert, + NewName: "new/metric1", }, }, in: []*metricspb.Metric{ @@ -825,9 +995,10 @@ var ( name: "metric_name_insert_with_match_label_regexp_negative", transforms: []internalTransform{ { - MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), matchLabels: map[string]StringMatcher{"label1": regexp.MustCompile(".*wrong_ending")}}, - Action: Insert, - NewName: "new/metric1", + MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), + attrMatchers: map[string]StringMatcher{"label1": regexp.MustCompile(".*wrong_ending")}}, + Action: Insert, + NewName: "new/metric1", }, }, in: []*metricspb.Metric{ @@ -849,9 +1020,10 @@ var ( name: "metric_name_insert_with_match_label_strict_missing_key", transforms: []internalTransform{ { - MetricIncludeFilter: internalFilterStrict{include: "metric1", matchLabels: map[string]StringMatcher{"missing_key": strictMatcher("value1")}}, - Action: Insert, - NewName: "new/metric1", + MetricIncludeFilter: internalFilterStrict{include: "metric1", + attrMatchers: map[string]StringMatcher{"missing_key": strictMatcher("value1")}}, + Action: Insert, + NewName: "new/metric1", }, }, in: []*metricspb.Metric{ @@ -873,9 +1045,10 @@ var ( name: "metric_name_insert_with_match_label_regexp_missing_key", transforms: []internalTransform{ { - MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), matchLabels: map[string]StringMatcher{"missing_key": regexp.MustCompile("value1")}}, - Action: Insert, - NewName: "new/metric1", + MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), + attrMatchers: map[string]StringMatcher{"missing_key": regexp.MustCompile("value1")}}, + Action: Insert, + NewName: "new/metric1", }, }, in: []*metricspb.Metric{ @@ -897,9 +1070,11 @@ var ( name: "metric_name_insert_with_match_label_regexp_missing_and_present_key", transforms: []internalTransform{ { - MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), matchLabels: map[string]StringMatcher{"label1": regexp.MustCompile("value1"), "missing_key": regexp.MustCompile("value2")}}, - Action: Insert, - NewName: "new/metric1", + MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), + attrMatchers: map[string]StringMatcher{"label1": regexp.MustCompile("value1"), + "missing_key": regexp.MustCompile("value2")}}, + Action: Insert, + NewName: "new/metric1", }, }, in: []*metricspb.Metric{ @@ -921,9 +1096,11 @@ var ( name: "metric_name_insert_with_match_label_regexp_missing_key_with_empty_expression", transforms: []internalTransform{ { - MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), matchLabels: map[string]StringMatcher{"label1": regexp.MustCompile("value1"), "missing_key": regexp.MustCompile("^$")}}, - Action: Insert, - NewName: "new/metric1", + MetricIncludeFilter: internalFilterRegexp{include: regexp.MustCompile("metric1"), + attrMatchers: map[string]StringMatcher{"label1": regexp.MustCompile("value1"), + "missing_key": regexp.MustCompile("^$")}}, + Action: Insert, + NewName: "new/metric1", }, }, in: []*metricspb.Metric{ @@ -1367,7 +1544,7 @@ var ( addTimeseries(1, nil).addInt64Point(0, 1, 1). build(), metricBuilder().setName("metric2"). - setDataType(metricspb.MetricDescriptor_GAUGE_DOUBLE). + setDataType(metricspb.MetricDescriptor_CUMULATIVE_DOUBLE). addTimeseries(1, nil).addDoublePoint(0, 2, 1). build(), metricBuilder().setName("metric3"). @@ -1381,7 +1558,7 @@ var ( addTimeseries(1, nil).addInt64Point(0, 1, 1). build(), metricBuilder().setName("metric2"). - setDataType(metricspb.MetricDescriptor_GAUGE_DOUBLE). + setDataType(metricspb.MetricDescriptor_CUMULATIVE_DOUBLE). addTimeseries(1, nil).addDoublePoint(0, 2, 1). build(), metricBuilder().setName("metric3"). @@ -1705,6 +1882,38 @@ var ( build(), }, }, + { + name: "metric_experimental_scale_with_attr_filtering", + transforms: []internalTransform{ + { + MetricIncludeFilter: internalFilterStrict{include: "metric1", + attrMatchers: map[string]StringMatcher{"label1": strictMatcher("value1")}}, + Action: Update, + Operations: []internalOperation{ + { + configOperation: Operation{ + Action: ScaleValue, + Scale: 100, + }, + }, + }, + }, + }, + in: []*metricspb.Metric{ + metricBuilder().setName("metric1").setDataType(metricspb.MetricDescriptor_CUMULATIVE_INT64). + setLabels([]string{"label1"}). + addTimeseries(1, []string{"value1"}).addInt64Point(0, 1, 1). + addTimeseries(1, []string{"value2"}).addInt64Point(1, 3, 1). + build(), + }, + out: []*metricspb.Metric{ + metricBuilder().setName("metric1").setDataType(metricspb.MetricDescriptor_CUMULATIVE_INT64). + setLabels([]string{"label1"}). + addTimeseries(1, []string{"value1"}).addInt64Point(0, 100, 1). + addTimeseries(1, []string{"value2"}).addInt64Point(1, 3, 1). + build(), + }, + }, // Add Label to a metric { name: "update existing metric by adding a new label when there are no labels", diff --git a/processor/metricstransformprocessor/operation_add_label.go b/processor/metricstransformprocessor/operation_add_label.go index fa8158c7be05..0bab08e92e15 100644 --- a/processor/metricstransformprocessor/operation_add_label.go +++ b/processor/metricstransformprocessor/operation_add_label.go @@ -14,7 +14,11 @@ package metricstransformprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor" -import metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" +import ( + metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" +) func (mtp *metricsTransformProcessor) addLabelOp(metric *metricspb.Metric, op internalOperation) { var lb = metricspb.LabelKey{ @@ -29,3 +33,11 @@ func (mtp *metricsTransformProcessor) addLabelOp(metric *metricspb.Metric, op in ts.LabelValues = append(ts.LabelValues, lv) } } + +// addLabelOp add a new attribute to metric data points. +func addLabelOp(metric pmetric.Metric, op internalOperation) { + rangeDataPointAttributes(metric, func(attrs pcommon.Map) bool { + attrs.InsertString(op.configOperation.NewLabel, op.configOperation.NewValue) + return true + }) +} diff --git a/processor/metricstransformprocessor/operation_aggregate_label_values.go b/processor/metricstransformprocessor/operation_aggregate_label_values.go index e71947d3d5ed..a0642643c832 100644 --- a/processor/metricstransformprocessor/operation_aggregate_label_values.go +++ b/processor/metricstransformprocessor/operation_aggregate_label_values.go @@ -19,6 +19,8 @@ import ( "strconv" metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" ) // aggregateLabelValuesOp aggregates points that have the label values specified in aggregated_values @@ -96,3 +98,24 @@ func (mtp *metricsTransformProcessor) newLabelValuesAsKey(labelIdx int, timeseri } return key, newLabelValues } + +// aggregateLabelValuesOp aggregates points that have the label values specified in aggregated_values +func aggregateLabelValuesOp(metric pmetric.Metric, mtpOp internalOperation) { + rangeDataPointAttributes(metric, func(attrs pcommon.Map) bool { + val, ok := attrs.Get(mtpOp.configOperation.Label) + if !ok { + return true + } + + if _, ok := mtpOp.aggregatedValuesSet[val.StringVal()]; ok { + val.SetStringVal(mtpOp.configOperation.NewValue) + } + return true + }) + + newMetric := pmetric.NewMetric() + copyMetricDetails(metric, newMetric) + ag := groupDataPoints(metric, aggGroups{}) + mergeDataPoints(newMetric, mtpOp.configOperation.AggregationType, ag) + newMetric.MoveTo(metric) +} diff --git a/processor/metricstransformprocessor/operation_aggregate_labels.go b/processor/metricstransformprocessor/operation_aggregate_labels.go index 812c362aa024..66aa89fd37eb 100644 --- a/processor/metricstransformprocessor/operation_aggregate_labels.go +++ b/processor/metricstransformprocessor/operation_aggregate_labels.go @@ -15,10 +15,14 @@ package metricstransformprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor" import ( + "encoding/json" "fmt" + "math" "strconv" metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" ) // aggregateLabelsOp aggregates points that have the labels excluded in label_set @@ -78,3 +82,244 @@ func (mtp *metricsTransformProcessor) selectedLabelsAsKey(labelIdxs []int, times } return key, newLabelValues } + +type aggGroups struct { + gauge map[string]pmetric.NumberDataPointSlice + sum map[string]pmetric.NumberDataPointSlice + histogram map[string]pmetric.HistogramDataPointSlice + expHistogram map[string]pmetric.ExponentialHistogramDataPointSlice +} + +// aggregateLabelsOp aggregates points that have the labels excluded in label_set +func aggregateLabelsOp(metric pmetric.Metric, mtpOp internalOperation) { + filterAttrs(metric, mtpOp.labelSetMap) + newMetric := pmetric.NewMetric() + copyMetricDetails(metric, newMetric) + ag := groupDataPoints(metric, aggGroups{}) + mergeDataPoints(newMetric, mtpOp.configOperation.AggregationType, ag) + newMetric.MoveTo(metric) +} + +// groupMetrics groups all the provided timeseries that will be aggregated together based on all the label values. +// Returns a map of grouped timeseries and the corresponding selected labels +// canBeCombined must be callled before. +func groupMetrics(metrics pmetric.MetricSlice, aggType AggregationType, to pmetric.Metric) { + var ag aggGroups + for i := 0; i < metrics.Len(); i++ { + ag = groupDataPoints(metrics.At(i), ag) + } + mergeDataPoints(to, aggType, ag) +} + +func groupDataPoints(metric pmetric.Metric, ag aggGroups) aggGroups { + switch metric.DataType() { + case pmetric.MetricDataTypeGauge: + if ag.gauge == nil { + ag.gauge = map[string]pmetric.NumberDataPointSlice{} + } + groupNumberDataPoints(metric.Gauge().DataPoints(), ag.gauge) + case pmetric.MetricDataTypeSum: + if ag.sum == nil { + ag.sum = map[string]pmetric.NumberDataPointSlice{} + } + groupNumberDataPoints(metric.Sum().DataPoints(), ag.sum) + case pmetric.MetricDataTypeHistogram: + if ag.histogram == nil { + ag.histogram = map[string]pmetric.HistogramDataPointSlice{} + } + groupHistogramDataPoints(metric.Histogram().DataPoints(), ag.histogram) + case pmetric.MetricDataTypeExponentialHistogram: + if ag.expHistogram == nil { + ag.expHistogram = map[string]pmetric.ExponentialHistogramDataPointSlice{} + } + groupExponentialHistogramDataPoints(metric.ExponentialHistogram().DataPoints(), ag.expHistogram) + } + return ag +} + +func mergeDataPoints(to pmetric.Metric, aggType AggregationType, ag aggGroups) { + switch to.DataType() { + case pmetric.MetricDataTypeGauge: + mergeNumberDataPoints(ag.gauge, aggType, to.Gauge().DataPoints()) + case pmetric.MetricDataTypeSum: + mergeNumberDataPoints(ag.sum, aggType, to.Sum().DataPoints()) + case pmetric.MetricDataTypeHistogram: + mergeHistogramDataPoints(ag.histogram, to.Histogram().DataPoints()) + case pmetric.MetricDataTypeExponentialHistogram: + mergeExponentialHistogramDataPoints(ag.expHistogram, to.ExponentialHistogram().DataPoints()) + } +} + +func groupNumberDataPoints(dps pmetric.NumberDataPointSlice, dpsByAttrsAndTs map[string]pmetric.NumberDataPointSlice) { + for i := 0; i < dps.Len(); i++ { + key := dataPointHashKey(dps.At(i).Attributes(), dps.At(i).StartTimestamp(), dps.At(i).Timestamp()) + if _, ok := dpsByAttrsAndTs[key]; !ok { + dpsByAttrsAndTs[key] = pmetric.NewNumberDataPointSlice() + } + dps.At(i).MoveTo(dpsByAttrsAndTs[key].AppendEmpty()) + } +} + +func groupHistogramDataPoints(dps pmetric.HistogramDataPointSlice, + dpsByAttrsAndTs map[string]pmetric.HistogramDataPointSlice) { + for i := 0; i < dps.Len(); i++ { + dp := dps.At(i) + keyHashParts := make([]interface{}, 0, len(dp.MExplicitBounds())+3) + for _, b := range dp.MExplicitBounds() { + keyHashParts = append(keyHashParts, b) + } + keyHashParts = append(keyHashParts, dp.HasMin(), dp.HasMax(), dp.Flags()) + key := dataPointHashKey(dps.At(i).Attributes(), dp.StartTimestamp(), dp.Timestamp(), keyHashParts...) + if _, ok := dpsByAttrsAndTs[key]; !ok { + dpsByAttrsAndTs[key] = pmetric.NewHistogramDataPointSlice() + } + dp.MoveTo(dpsByAttrsAndTs[key].AppendEmpty()) + } +} + +func groupExponentialHistogramDataPoints(dps pmetric.ExponentialHistogramDataPointSlice, + dpsByAttrsAndTs map[string]pmetric.ExponentialHistogramDataPointSlice) { + for i := 0; i < dps.Len(); i++ { + dp := dps.At(i) + keyHashParts := make([]interface{}, 0, 4) + keyHashParts = append(keyHashParts, dp.Scale(), dp.HasMin(), dp.HasMax(), dp.Flags(), dp.Negative().Offset(), + dp.Positive().Offset()) + key := dataPointHashKey(dps.At(i).Attributes(), dp.StartTimestamp(), dp.Timestamp(), keyHashParts...) + if _, ok := dpsByAttrsAndTs[key]; !ok { + dpsByAttrsAndTs[key] = pmetric.NewExponentialHistogramDataPointSlice() + } + dp.MoveTo(dpsByAttrsAndTs[key].AppendEmpty()) + } +} + +func filterAttrs(metric pmetric.Metric, filterAttrKeys map[string]bool) { + if filterAttrKeys == nil { + return + } + rangeDataPointAttributes(metric, func(attrs pcommon.Map) bool { + attrs.RemoveIf(func(k string, v pcommon.Value) bool { + return !filterAttrKeys[k] + }) + return true + }) +} + +func dataPointHashKey(atts pcommon.Map, start pcommon.Timestamp, ts pcommon.Timestamp, other ...interface{}) string { + hashParts := []interface{}{atts.AsRaw(), start.String(), ts.String()} + jsonStr, _ := json.Marshal(append(hashParts, other...)) + return string(jsonStr) +} + +func mergeNumberDataPoints(dpsMap map[string]pmetric.NumberDataPointSlice, agg AggregationType, to pmetric.NumberDataPointSlice) { + for _, dps := range dpsMap { + dp := to.AppendEmpty() + dps.At(0).MoveTo(dp) + switch dp.ValueType() { + case pmetric.NumberDataPointValueTypeDouble: + for i := 1; i < dps.Len(); i++ { + switch agg { + case Sum, Mean: + dp.SetDoubleVal(dp.DoubleVal() + doubleVal(dps.At(i))) + case Max: + dp.SetDoubleVal(math.Max(dp.DoubleVal(), doubleVal(dps.At(i)))) + case Min: + dp.SetDoubleVal(math.Min(dp.DoubleVal(), doubleVal(dps.At(i)))) + } + } + if agg == Mean { + dp.SetDoubleVal(dp.DoubleVal() / float64(dps.Len())) + } + case pmetric.NumberDataPointValueTypeInt: + for i := 1; i < dps.Len(); i++ { + switch agg { + case Sum, Mean: + dp.SetIntVal(dp.IntVal() + dps.At(i).IntVal()) + case Max: + if dp.IntVal() < intVal(dps.At(i)) { + dp.SetIntVal(intVal(dps.At(i))) + } + case Min: + if dp.IntVal() > intVal(dps.At(i)) { + dp.SetIntVal(intVal(dps.At(i))) + } + } + } + if agg == Mean { + dp.SetIntVal(dp.IntVal() / int64(dps.Len())) + } + } + } +} + +func doubleVal(dp pmetric.NumberDataPoint) float64 { + switch dp.ValueType() { + case pmetric.NumberDataPointValueTypeDouble: + return dp.DoubleVal() + case pmetric.NumberDataPointValueTypeInt: + return float64(dp.IntVal()) + } + return 0 +} + +func intVal(dp pmetric.NumberDataPoint) int64 { + switch dp.ValueType() { + case pmetric.NumberDataPointValueTypeDouble: + return int64(dp.DoubleVal()) + case pmetric.NumberDataPointValueTypeInt: + return dp.IntVal() + } + return 0 +} + +func mergeHistogramDataPoints(dpsMap map[string]pmetric.HistogramDataPointSlice, to pmetric.HistogramDataPointSlice) { + for _, dps := range dpsMap { + dp := to.AppendEmpty() + dps.At(0).MoveTo(dp) + for i := 1; i < dps.Len(); i++ { + if dps.At(i).Count() == 0 { + continue + } + dp.SetCount(dp.Count() + dps.At(i).Count()) + dp.SetSum(dp.Sum() + dps.At(i).Sum()) + if dp.HasMin() && dp.Min() > dps.At(i).Min() { + dp.SetMin(dps.At(i).Min()) + } + if dp.HasMax() && dp.Max() < dps.At(i).Max() { + dp.SetMax(dps.At(i).Max()) + } + dps.At(i).Exemplars().MoveAndAppendTo(dp.Exemplars()) + for b, bc := range dps.At(i).MBucketCounts() { + dp.MBucketCounts()[b] = dp.MBucketCounts()[b] + bc + } + dps.At(i).Exemplars().MoveAndAppendTo(dp.Exemplars()) + } + } +} + +func mergeExponentialHistogramDataPoints(dpsMap map[string]pmetric.ExponentialHistogramDataPointSlice, + to pmetric.ExponentialHistogramDataPointSlice) { + for _, dps := range dpsMap { + dp := to.AppendEmpty() + dps.At(0).MoveTo(dp) + for i := 1; i < dps.Len(); i++ { + if dps.At(i).Count() == 0 { + continue + } + dp.SetCount(dp.Count() + dps.At(i).Count()) + dp.SetSum(dp.Sum() + dps.At(i).Sum()) + if dp.HasMin() && dp.Min() > dps.At(i).Min() { + dp.SetMin(dps.At(i).Min()) + } + if dp.HasMax() && dp.Max() < dps.At(i).Max() { + dp.SetMax(dps.At(i).Max()) + } + for b, bc := range dps.At(i).Negative().MBucketCounts() { + dps.At(i).Negative().MBucketCounts()[b] = dps.At(i).Negative().MBucketCounts()[b] + bc + } + for b, bc := range dps.At(i).Positive().MBucketCounts() { + dps.At(i).Positive().MBucketCounts()[b] = dps.At(i).Positive().MBucketCounts()[b] + bc + } + dps.At(i).Exemplars().MoveAndAppendTo(dp.Exemplars()) + } + } +} diff --git a/processor/metricstransformprocessor/operation_delete_label_value.go b/processor/metricstransformprocessor/operation_delete_label_value.go index 423cdec2482d..fe176b817d31 100644 --- a/processor/metricstransformprocessor/operation_delete_label_value.go +++ b/processor/metricstransformprocessor/operation_delete_label_value.go @@ -16,6 +16,8 @@ package metricstransformprocessor // import "github.com/open-telemetry/opentelem import ( metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" ) // deleteLabelValueOp deletes a label value and all data associated with it @@ -36,3 +38,37 @@ func (mtp *metricsTransformProcessor) deleteLabelValueOp(metric *metricspb.Metri metric.Timeseries = newTimeseries } } + +// deleteLabelValueOp deletes a label value and all data associated with it +func deleteLabelValueOp(metric pmetric.Metric, mtpOp internalOperation) { + op := mtpOp.configOperation + switch metric.DataType() { + case pmetric.MetricDataTypeGauge: + metric.Gauge().DataPoints().RemoveIf(func(dp pmetric.NumberDataPoint) bool { + return hasAttr(dp.Attributes(), op.Label, op.LabelValue) + }) + case pmetric.MetricDataTypeSum: + metric.Sum().DataPoints().RemoveIf(func(dp pmetric.NumberDataPoint) bool { + return hasAttr(dp.Attributes(), op.Label, op.LabelValue) + }) + case pmetric.MetricDataTypeHistogram: + metric.Histogram().DataPoints().RemoveIf(func(dp pmetric.HistogramDataPoint) bool { + return hasAttr(dp.Attributes(), op.Label, op.LabelValue) + }) + case pmetric.MetricDataTypeExponentialHistogram: + metric.ExponentialHistogram().DataPoints().RemoveIf(func(dp pmetric.ExponentialHistogramDataPoint) bool { + return hasAttr(dp.Attributes(), op.Label, op.LabelValue) + }) + case pmetric.MetricDataTypeSummary: + metric.Summary().DataPoints().RemoveIf(func(dp pmetric.SummaryDataPoint) bool { + return hasAttr(dp.Attributes(), op.Label, op.LabelValue) + }) + } +} + +func hasAttr(attrs pcommon.Map, k, v string) bool { + if val, ok := attrs.Get(k); ok { + return val.StringVal() == v + } + return false +} diff --git a/processor/metricstransformprocessor/operation_scale_value.go b/processor/metricstransformprocessor/operation_scale_value.go index a51138893eac..cd7d00877794 100644 --- a/processor/metricstransformprocessor/operation_scale_value.go +++ b/processor/metricstransformprocessor/operation_scale_value.go @@ -14,7 +14,10 @@ package metricstransformprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor" -import metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" +import ( + metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" + "go.opentelemetry.io/collector/pdata/pmetric" +) func (mtp *metricsTransformProcessor) scaleValueOp(metric *metricspb.Metric, op internalOperation) { for _, ts := range metric.Timeseries { @@ -28,3 +31,29 @@ func (mtp *metricsTransformProcessor) scaleValueOp(metric *metricspb.Metric, op } } } + +// scaleValueOp scales a numeric metric value. Applicable to sum and gauge metrics only. +func scaleValueOp(metric pmetric.Metric, op internalOperation, f internalFilter) { + var dps pmetric.NumberDataPointSlice + switch metric.DataType() { + case pmetric.MetricDataTypeGauge: + dps = metric.Gauge().DataPoints() + case pmetric.MetricDataTypeSum: + dps = metric.Sum().DataPoints() + default: + return + } + + for i := 0; i < dps.Len(); i++ { + dp := dps.At(i) + if !f.matchAttrs(dp.Attributes()) { + continue + } + switch dp.ValueType() { + case pmetric.NumberDataPointValueTypeInt: + dp.SetIntVal(int64(float64(dp.IntVal()) * op.configOperation.Scale)) + case pmetric.NumberDataPointValueTypeDouble: + dp.SetDoubleVal(dp.DoubleVal() * op.configOperation.Scale) + } + } +} diff --git a/processor/metricstransformprocessor/operation_toggle_scalar_datatype.go b/processor/metricstransformprocessor/operation_toggle_scalar_datatype.go index 0027f526acbf..1714b040a5b3 100644 --- a/processor/metricstransformprocessor/operation_toggle_scalar_datatype.go +++ b/processor/metricstransformprocessor/operation_toggle_scalar_datatype.go @@ -14,7 +14,10 @@ package metricstransformprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/metricstransformprocessor" -import metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" +import ( + metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" + "go.opentelemetry.io/collector/pdata/pmetric" +) func (mtp *metricsTransformProcessor) ToggleScalarDataType(metric *metricspb.Metric) { for _, ts := range metric.Timeseries { @@ -39,3 +42,31 @@ func (mtp *metricsTransformProcessor) ToggleScalarDataType(metric *metricspb.Met metric.MetricDescriptor.Type = metricspb.MetricDescriptor_CUMULATIVE_INT64 } } + +// toggleScalarDataTypeOp translates the numeric value type to the opposite type, int -> double and double -> int. +// Applicable to sum and gauge metrics only. +func toggleScalarDataTypeOp(metric pmetric.Metric, f internalFilter) { + var dps pmetric.NumberDataPointSlice + switch metric.DataType() { + case pmetric.MetricDataTypeGauge: + dps = metric.Gauge().DataPoints() + case pmetric.MetricDataTypeSum: + dps = metric.Sum().DataPoints() + default: + return + } + + for i := 0; i < dps.Len(); i++ { + dp := dps.At(i) + if !f.matchAttrs(dp.Attributes()) { + continue + } + + switch dp.ValueType() { + case pmetric.NumberDataPointValueTypeInt: + dp.SetDoubleVal(float64(dp.IntVal())) + case pmetric.NumberDataPointValueTypeDouble: + dp.SetIntVal(int64(dp.DoubleVal())) + } + } +} diff --git a/processor/metricstransformprocessor/operation_update_label.go b/processor/metricstransformprocessor/operation_update_label.go index ccf28de870bc..aadcf96ff374 100644 --- a/processor/metricstransformprocessor/operation_update_label.go +++ b/processor/metricstransformprocessor/operation_update_label.go @@ -16,6 +16,8 @@ package metricstransformprocessor // import "github.com/open-telemetry/opentelem import ( metricspb "github.com/census-instrumentation/opencensus-proto/gen-go/metrics/v1" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" ) // updateLabelOp updates labels and label values in metric based on given operation @@ -39,3 +41,30 @@ func (mtp *metricsTransformProcessor) updateLabelOp(metric *metricspb.Metric, mt } } } + +// updateLabelOp updates labels and label values in metric based on given operation +func updateLabelOp(metric pmetric.Metric, mtpOp internalOperation, f internalFilter) { + op := mtpOp.configOperation + rangeDataPointAttributes(metric, func(attrs pcommon.Map) bool { + if !f.matchAttrs(attrs) { + return true + } + + attrKey := op.Label + attrVal, ok := attrs.Get(attrKey) + if !ok { + return true + } + + if op.NewLabel != "" { + attrs.Upsert(op.NewLabel, attrVal) + attrs.Remove(attrKey) + attrKey = op.NewLabel + } + + if newValue, ok := mtpOp.valueActionsMapping[attrVal.StringVal()]; ok { + attrs.UpsertString(attrKey, newValue) + } + return true + }) +} diff --git a/processor/probabilisticsamplerprocessor/go.mod b/processor/probabilisticsamplerprocessor/go.mod index cfa4773f63c9..353c4b5ef99e 100644 --- a/processor/probabilisticsamplerprocessor/go.mod +++ b/processor/probabilisticsamplerprocessor/go.mod @@ -5,9 +5,9 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/processor/probabilisticsamplerprocessor/go.sum b/processor/probabilisticsamplerprocessor/go.sum index 5de3610bbf46..dcb497b10828 100644 --- a/processor/probabilisticsamplerprocessor/go.sum +++ b/processor/probabilisticsamplerprocessor/go.sum @@ -179,12 +179,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/redactionprocessor/go.mod b/processor/redactionprocessor/go.mod index 01d9153dc631..3885b4e52208 100644 --- a/processor/redactionprocessor/go.mod +++ b/processor/redactionprocessor/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/processor/redactionprocessor/go.sum b/processor/redactionprocessor/go.sum index 189695451fbc..52d2d419cbc7 100644 --- a/processor/redactionprocessor/go.sum +++ b/processor/redactionprocessor/go.sum @@ -187,10 +187,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/resourcedetectionprocessor/go.mod b/processor/resourcedetectionprocessor/go.mod index b3663b91d18a..f32449f633f1 100644 --- a/processor/resourcedetectionprocessor/go.mod +++ b/processor/resourcedetectionprocessor/go.mod @@ -5,16 +5,16 @@ go 1.17 require ( cloud.google.com/go/compute v1.6.1 github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v0.32.1 - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/census-instrumentation/opencensus-proto v0.3.0 github.com/hashicorp/consul/api v1.12.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 k8s.io/apimachinery v0.24.1 @@ -30,7 +30,7 @@ require ( github.com/armon/go-metrics v0.3.10 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/emicklei/go-restful v2.9.5+incompatible // indirect diff --git a/processor/resourcedetectionprocessor/go.sum b/processor/resourcedetectionprocessor/go.sum index b79159468b56..27ca86f20596 100644 --- a/processor/resourcedetectionprocessor/go.sum +++ b/processor/resourcedetectionprocessor/go.sum @@ -88,8 +88,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -132,8 +132,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -525,12 +525,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go index f3eb5cd98986..08eda53fb7f2 100644 --- a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go +++ b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs.go @@ -17,6 +17,7 @@ package ecs // import "github.com/open-telemetry/opentelemetry-collector-contrib import ( "bytes" "context" + "errors" "fmt" "strings" @@ -44,7 +45,8 @@ func NewDetector(params component.ProcessorCreateSettings, _ internal.DetectorCo provider, err := ecsutil.NewDetectedTaskMetadataProvider(params.TelemetrySettings) if err != nil { // Allow metadata provider to be created in incompatible environments and just have a noop Detect() - if _, ok := err.(endpoints.ErrNoTaskMetadataEndpointDetected); ok { + var errNTMED endpoints.ErrNoTaskMetadataEndpointDetected + if errors.As(err, &errNTMED) { return &Detector{provider: nil}, nil } return nil, fmt.Errorf("unable to create task metadata provider: %w", err) diff --git a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go index 0c6329641cec..d254a3fb1562 100644 --- a/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go +++ b/processor/resourcedetectionprocessor/internal/aws/ecs/ecs_test.go @@ -16,7 +16,6 @@ package ecs import ( "context" - "os" "testing" "github.com/stretchr/testify/assert" @@ -60,8 +59,7 @@ func (md *mockMetaDataProvider) FetchContainerMetadata() (*ecsutil.ContainerMeta } func Test_ecsNewDetector(t *testing.T) { - os.Clearenv() - os.Setenv(endpoints.TaskMetadataEndpointV4EnvVar, "endpoint") + t.Setenv(endpoints.TaskMetadataEndpointV4EnvVar, "endpoint") d, err := NewDetector(componenttest.NewNopProcessorCreateSettings(), nil) assert.NoError(t, err) @@ -69,7 +67,6 @@ func Test_ecsNewDetector(t *testing.T) { } func Test_detectorReturnsIfNoEnvVars(t *testing.T) { - os.Clearenv() d, _ := NewDetector(componenttest.NewNopProcessorCreateSettings(), nil) res, _, err := d.Detect(context.TODO()) @@ -102,8 +99,7 @@ func Test_ecsFiltersInvalidContainers(t *testing.T) { } func Test_ecsDetectV4(t *testing.T) { - os.Clearenv() - os.Setenv(endpoints.TaskMetadataEndpointV4EnvVar, "endpoint") + t.Setenv(endpoints.TaskMetadataEndpointV4EnvVar, "endpoint") want := pcommon.NewResource() attr := want.Attributes() @@ -138,8 +134,7 @@ func Test_ecsDetectV4(t *testing.T) { } func Test_ecsDetectV3(t *testing.T) { - os.Clearenv() - os.Setenv(endpoints.TaskMetadataEndpointV3EnvVar, "endpoint") + t.Setenv(endpoints.TaskMetadataEndpointV3EnvVar, "endpoint") want := pcommon.NewResource() attr := want.Attributes() diff --git a/processor/resourcedetectionprocessor/internal/aws/eks/detector_test.go b/processor/resourcedetectionprocessor/internal/aws/eks/detector_test.go index 798258f802a5..afe246ea245b 100644 --- a/processor/resourcedetectionprocessor/internal/aws/eks/detector_test.go +++ b/processor/resourcedetectionprocessor/internal/aws/eks/detector_test.go @@ -16,7 +16,6 @@ package eks import ( "context" - "os" "testing" "github.com/stretchr/testify/assert" @@ -48,7 +47,7 @@ func TestEKS(t *testing.T) { detectorUtils := new(MockDetectorUtils) ctx := context.Background() - require.NoError(t, os.Setenv("KUBERNETES_SERVICE_HOST", "localhost")) + t.Setenv("KUBERNETES_SERVICE_HOST", "localhost") detectorUtils.On("getConfigMap", authConfigmapNS, authConfigmapName).Return(map[string]string{"cluster.name": "my-cluster"}, nil) // Call EKS Resource detector to detect resources eksResourceDetector := &detector{utils: detectorUtils, err: nil} @@ -64,7 +63,6 @@ func TestEKS(t *testing.T) { // Tests EKS resource detector not running in EKS environment by verifying resource is not running on k8s func TestNotEKS(t *testing.T) { eksResourceDetector := detector{logger: zap.NewNop()} - require.NoError(t, os.Unsetenv("KUBERNETES_SERVICE_HOST")) r, _, err := eksResourceDetector.Detect(context.Background()) require.NoError(t, err) assert.Equal(t, 0, r.Attributes().Len(), "Resource object should be empty") diff --git a/processor/resourcedetectionprocessor/internal/azure/aks/aks_test.go b/processor/resourcedetectionprocessor/internal/azure/aks/aks_test.go index c7e99725cb22..389baec2e48f 100644 --- a/processor/resourcedetectionprocessor/internal/azure/aks/aks_test.go +++ b/processor/resourcedetectionprocessor/internal/azure/aks/aks_test.go @@ -36,8 +36,7 @@ func TestNewDetector(t *testing.T) { } func TestDetector_Detect_K8s_Azure(t *testing.T) { - os.Clearenv() - setK8sEnv(t) + t.Setenv("KUBERNETES_SERVICE_HOST", "localhost") detector := &Detector{provider: mockProvider()} res, schemaURL, err := detector.Detect(context.Background()) require.NoError(t, err) @@ -49,8 +48,7 @@ func TestDetector_Detect_K8s_Azure(t *testing.T) { } func TestDetector_Detect_K8s_NonAzure(t *testing.T) { - os.Clearenv() - setK8sEnv(t) + t.Setenv("KUBERNETES_SERVICE_HOST", "localhost") mp := &azure.MockProvider{} mp.On("Metadata").Return(nil, errors.New("")) detector := &Detector{provider: mp} @@ -74,8 +72,3 @@ func mockProvider() *azure.MockProvider { mp.On("Metadata").Return(&azure.ComputeMetadata{}, nil) return mp } - -func setK8sEnv(t *testing.T) { - err := os.Setenv("KUBERNETES_SERVICE_HOST", "localhost") - require.NoError(t, err) -} diff --git a/processor/resourcedetectionprocessor/internal/env/env.go b/processor/resourcedetectionprocessor/internal/env/env.go index 6fd99cdccf77..e52bc8fbd62a 100644 --- a/processor/resourcedetectionprocessor/internal/env/env.go +++ b/processor/resourcedetectionprocessor/internal/env/env.go @@ -95,7 +95,7 @@ func initializeAttributeMap(am pcommon.Map, s string) error { var err error if value, err = url.QueryUnescape(value); err != nil { - return fmt.Errorf("invalid resource format in attribute: %q, err: %s", s[match[0]:match[1]], err) + return fmt.Errorf("invalid resource format in attribute: %q, err: %w", s[match[0]:match[1]], err) } am.InsertString(key, value) diff --git a/processor/resourcedetectionprocessor/internal/env/env_test.go b/processor/resourcedetectionprocessor/internal/env/env_test.go index e9d2642a50df..a75c38e71adc 100644 --- a/processor/resourcedetectionprocessor/internal/env/env_test.go +++ b/processor/resourcedetectionprocessor/internal/env/env_test.go @@ -16,7 +16,6 @@ package env import ( "context" - "os" "testing" "github.com/stretchr/testify/assert" @@ -34,7 +33,7 @@ func TestNewDetector(t *testing.T) { } func TestDetectTrue(t *testing.T) { - os.Setenv(envVar, "key=value") + t.Setenv(envVar, "key=value") detector := &Detector{} res, schemaURL, err := detector.Detect(context.Background()) @@ -44,7 +43,7 @@ func TestDetectTrue(t *testing.T) { } func TestDetectFalse(t *testing.T) { - os.Setenv(envVar, "") + t.Setenv(envVar, "") detector := &Detector{} res, schemaURL, err := detector.Detect(context.Background()) @@ -54,8 +53,8 @@ func TestDetectFalse(t *testing.T) { } func TestDetectDeprecatedEnv(t *testing.T) { - os.Setenv(envVar, "") - os.Setenv(deprecatedEnvVar, "key=value") + t.Setenv(envVar, "") + t.Setenv(deprecatedEnvVar, "key=value") detector := &Detector{} res, schemaURL, err := detector.Detect(context.Background()) @@ -65,7 +64,7 @@ func TestDetectDeprecatedEnv(t *testing.T) { } func TestDetectError(t *testing.T) { - os.Setenv(envVar, "key=value,key") + t.Setenv(envVar, "key=value,key") detector := &Detector{} res, schemaURL, err := detector.Detect(context.Background()) diff --git a/processor/resourcedetectionprocessor/internal/gcp/gcp_test.go b/processor/resourcedetectionprocessor/internal/gcp/gcp_test.go index 9c4f34f78f78..044b82130209 100644 --- a/processor/resourcedetectionprocessor/internal/gcp/gcp_test.go +++ b/processor/resourcedetectionprocessor/internal/gcp/gcp_test.go @@ -17,7 +17,6 @@ package gcp // import "github.com/open-telemetry/opentelemetry-collector-contrib import ( "context" "fmt" - "os" "testing" "github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp" @@ -31,8 +30,7 @@ import ( func TestDetect(t *testing.T) { // Set this before all tests to ensure metadata.onGCE() returns true - err := os.Setenv("GCE_METADATA_HOST", "169.254.169.254") - assert.NoError(t, err) + t.Setenv("GCE_METADATA_HOST", "169.254.169.254") for _, tc := range []struct { desc string diff --git a/processor/resourceprocessor/README.md b/processor/resourceprocessor/README.md index faa95acf7a55..a7c333a29d7b 100644 --- a/processor/resourceprocessor/README.md +++ b/processor/resourceprocessor/README.md @@ -1,6 +1,10 @@ # Resource Processor -Supported pipeline types: metrics, traces, logs +| Status | | +| ------------------------ | --------------------- | +| Stability | [beta] | +| Supported pipeline types | traces, metrics, logs | +| Distributions | [core], [contrib] | The resource processor can be used to apply changes on resource attributes. Please refer to [config.go](./config.go) for the config spec. @@ -26,3 +30,7 @@ processors: Refer to [config.yaml](./testdata/config.yaml) for detailed examples on using the processor. + +[beta]:https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/processor/resourceprocessor/go.mod b/processor/resourceprocessor/go.mod index 0887a75e5d8c..f387144fcaaf 100644 --- a/processor/resourceprocessor/go.mod +++ b/processor/resourceprocessor/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/processor/resourceprocessor/go.sum b/processor/resourceprocessor/go.sum index 022860fde1a7..fafe52613702 100644 --- a/processor/resourceprocessor/go.sum +++ b/processor/resourceprocessor/go.sum @@ -181,10 +181,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/routingprocessor/README.md b/processor/routingprocessor/README.md index 7faf95d5f30a..6ea0a4058194 100644 --- a/processor/routingprocessor/README.md +++ b/processor/routingprocessor/README.md @@ -49,4 +49,4 @@ The full list of settings exposed for this processor are documented [here](./con - [metrics](./testdata/config_metrics.yaml) - [traces](./testdata/config_traces.yaml) -[context_docs]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/context.md +[context_docs]: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/context/README.md diff --git a/processor/routingprocessor/go.mod b/processor/routingprocessor/go.mod index 130c1a623b9e..d624f68ea087 100644 --- a/processor/routingprocessor/go.mod +++ b/processor/routingprocessor/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/jaegerexporter v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.47.0 ) @@ -39,7 +39,7 @@ require ( github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/processor/routingprocessor/go.sum b/processor/routingprocessor/go.sum index a4d0d17bfe6e..c8e88e125601 100644 --- a/processor/routingprocessor/go.sum +++ b/processor/routingprocessor/go.sum @@ -340,12 +340,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/processor/schemaprocessor/go.mod b/processor/schemaprocessor/go.mod index d3e3a0fbc3d1..170c628dc55c 100644 --- a/processor/schemaprocessor/go.mod +++ b/processor/schemaprocessor/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/processor/schemaprocessor/go.sum b/processor/schemaprocessor/go.sum index 45e4529398bf..7db647d1ed67 100644 --- a/processor/schemaprocessor/go.sum +++ b/processor/schemaprocessor/go.sum @@ -186,10 +186,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/spanmetricsprocessor/go.mod b/processor/spanmetricsprocessor/go.mod index 8647456835f3..1d7430f7370a 100644 --- a/processor/spanmetricsprocessor/go.mod +++ b/processor/spanmetricsprocessor/go.mod @@ -8,9 +8,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.47.0 ) @@ -80,10 +80,10 @@ require ( go.opentelemetry.io/otel/trace v1.7.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/text v0.3.7 // indirect - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 // indirect + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect diff --git a/processor/spanmetricsprocessor/go.sum b/processor/spanmetricsprocessor/go.sum index c48afa369766..0a066b448a77 100644 --- a/processor/spanmetricsprocessor/go.sum +++ b/processor/spanmetricsprocessor/go.sum @@ -44,7 +44,7 @@ github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8 github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aws/aws-sdk-go v1.38.68/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= 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.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= @@ -99,7 +99,7 @@ github.com/dennwc/varint v1.0.0 h1:kGNFFSSw8ToIy3obO/kKr8U9GZYUAxQEVuix4zfDWzE= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/digitalocean/godo v1.80.0 h1:ZULJ/fWDM97YtO7Fa+K6hzJLd7+smCu4N+0n+B/xtj4= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -449,7 +449,7 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -519,12 +519,12 @@ go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= @@ -614,8 +614,8 @@ golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -743,7 +743,7 @@ google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjR google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -770,8 +770,8 @@ google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEc google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= diff --git a/processor/spanprocessor/README.md b/processor/spanprocessor/README.md index de2aa8986242..594faae85ee2 100644 --- a/processor/spanprocessor/README.md +++ b/processor/spanprocessor/README.md @@ -1,11 +1,15 @@ # Span Processor -Supported pipeline types: traces +| Status | | +| ------------------------ | ----------------- | +| Stability | [alpha] | +| Supported pipeline types | traces | +| Distributions | [core], [contrib] | The span processor modifies the span name based on its attributes or extract span attributes from the span name. It also allows to change span status. Please refer to [config.go](./config.go) for the config spec. -It optionally supports the ability to [include/exclude spans](../README.md#includeexclude-spans). +It optionally supports the ability to [include/exclude spans](../attributesprocessor/README.md#includeexclude-filtering). The following actions are supported: @@ -122,3 +126,7 @@ span/set_status: Refer to [config.yaml](./testdata/config.yaml) for detailed examples on using the processor. + +[alpha]:https://github.com/open-telemetry/opentelemetry-collector#alpha +[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol diff --git a/processor/spanprocessor/go.mod b/processor/spanprocessor/go.mod index 6b412b660d89..768c5ebdc9f5 100644 --- a/processor/spanprocessor/go.mod +++ b/processor/spanprocessor/go.mod @@ -5,9 +5,9 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/processor/spanprocessor/go.sum b/processor/spanprocessor/go.sum index 917104e0dcf5..660880fb4b55 100644 --- a/processor/spanprocessor/go.sum +++ b/processor/spanprocessor/go.sum @@ -182,12 +182,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/tailsamplingprocessor/README.md b/processor/tailsamplingprocessor/README.md index 8092e758e9eb..ff0a47543a6b 100644 --- a/processor/tailsamplingprocessor/README.md +++ b/processor/tailsamplingprocessor/README.md @@ -23,6 +23,7 @@ Multiple policies exist today and it is straight forward to add more. These incl - `status_code`: Sample based upon the status code (`OK`, `ERROR` or `UNSET`) - `string_attribute`: Sample based on string attributes value matches, both exact and regex value matches are supported - `rate_limiting`: Sample based on rate +- `span_count`: Sample based on the minimum number of spans within a batch. If all traces within the batch have less number of spans than the threshold, the batch will not be sampled. - `and`: Sample based on multiple policies, creates an AND policy - `composite`: Sample based on a combination of above samplers, with ordering and rate allocation per sampler. Rate allocation allocates certain percentages of spans per policy order. For example if we have set max_total_spans_per_second as 100 then we can set rate_allocation as follows @@ -89,6 +90,11 @@ processors: type: string_attribute, string_attribute: {key: http.url, values: [\/health, \/metrics], enabled_regex_matching: true, invert_match: true} }, + { + name: test-policy-10, + type: span_count, + span_count: {min_spans: 2} + }, { name: and-policy-1, type: and, diff --git a/processor/tailsamplingprocessor/composite_helper.go b/processor/tailsamplingprocessor/composite_helper.go index adf2b0660bad..7d2c5fa82bf0 100644 --- a/processor/tailsamplingprocessor/composite_helper.go +++ b/processor/tailsamplingprocessor/composite_helper.go @@ -79,6 +79,9 @@ func getSubPolicyEvaluator(logger *zap.Logger, cfg *SubPolicyCfg) (sampling.Poli return sampling.NewRateLimiting(logger, rlfCfg.SpansPerSecond), nil case And: return getNewAndPolicy(logger, cfg.AndCfg) + case SpanCount: + scCfg := cfg.SpanCountCfg + return sampling.NewSpanCount(logger, scCfg.MinSpans), nil default: return nil, fmt.Errorf("unknown sampling policy type %s", cfg.Type) } diff --git a/processor/tailsamplingprocessor/config.go b/processor/tailsamplingprocessor/config.go index 1f0bafd7d60d..3026e50548d2 100644 --- a/processor/tailsamplingprocessor/config.go +++ b/processor/tailsamplingprocessor/config.go @@ -44,6 +44,8 @@ const ( Composite PolicyType = "composite" // And allows defining a And policy, combining the other policies in one And PolicyType = "and" + // Span Count sample traces that are have more spans per Trace than a given threshold. + SpanCount PolicyType = "span_count" ) // SubPolicyCfg holds the common configuration to all policies under composite policy. @@ -66,6 +68,8 @@ type SubPolicyCfg struct { RateLimitingCfg RateLimitingCfg `mapstructure:"rate_limiting"` // Configs for and policy evaluator. AndCfg AndCfg `mapstructure:"and"` + // Configs for span counter filter sampling policy evaluator. + SpanCountCfg SpanCountCfg `mapstructure:"span_count"` } type AndSubPolicyCfg struct { @@ -85,6 +89,8 @@ type AndSubPolicyCfg struct { LatencyCfg LatencyCfg `mapstructure:"latency"` // Configs for status code filter sampling policy evaluator. StatusCodeCfg StatusCodeCfg `mapstructure:"status_code"` + // Configs for span counter filter sampling policy evaluator. + SpanCountCfg SpanCountCfg `mapstructure:"span_count"` } type AndCfg struct { @@ -128,6 +134,8 @@ type PolicyCfg struct { CompositeCfg CompositeCfg `mapstructure:"composite"` // Configs for defining and policy AndCfg AndCfg `mapstructure:"and"` + // Configs for span count filter sampling policy evaluator. + SpanCountCfg SpanCountCfg `mapstructure:"span_count"` } // LatencyCfg holds the configurable settings to create a latency filter sampling policy @@ -193,6 +201,13 @@ type RateLimitingCfg struct { SpansPerSecond int64 `mapstructure:"spans_per_second"` } +// SpanCountCfg holds the configurable settings to create a Span Count filter sampling policy +// sampling policy evaluator +type SpanCountCfg struct { + // Minimum number of spans in a Trace + MinSpans int32 `mapstructure:"min_spans"` +} + // Config holds the configuration for tail-based sampling. type Config struct { config.ProcessorSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct diff --git a/processor/tailsamplingprocessor/config_test.go b/processor/tailsamplingprocessor/config_test.go index 2e2272348634..70fffc9082d2 100644 --- a/processor/tailsamplingprocessor/config_test.go +++ b/processor/tailsamplingprocessor/config_test.go @@ -78,6 +78,11 @@ func TestLoadConfig(t *testing.T) { Type: RateLimiting, RateLimitingCfg: RateLimitingCfg{SpansPerSecond: 35}, }, + { + Name: "test-policy-8", + Type: SpanCount, + SpanCountCfg: SpanCountCfg{MinSpans: 2}, + }, { Name: "and-policy-1", Type: And, diff --git a/processor/tailsamplingprocessor/go.mod b/processor/tailsamplingprocessor/go.mod index e9da61866731..236d556165e0 100644 --- a/processor/tailsamplingprocessor/go.mod +++ b/processor/tailsamplingprocessor/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/goleak v1.1.12 go.uber.org/zap v1.21.0 diff --git a/processor/tailsamplingprocessor/go.sum b/processor/tailsamplingprocessor/go.sum index c823e49aa229..f92a40157991 100644 --- a/processor/tailsamplingprocessor/go.sum +++ b/processor/tailsamplingprocessor/go.sum @@ -184,10 +184,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/tailsamplingprocessor/internal/idbatcher/id_batcher_test.go b/processor/tailsamplingprocessor/internal/idbatcher/id_batcher_test.go index d58a2bc14af4..e87fc28ac05e 100644 --- a/processor/tailsamplingprocessor/internal/idbatcher/id_batcher_test.go +++ b/processor/tailsamplingprocessor/internal/idbatcher/id_batcher_test.go @@ -41,10 +41,7 @@ func TestBatcherNew(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { got, err := New(tt.numBatches, tt.newBatchesInitialCapacity, tt.batchChannelSize) - if err != tt.wantErr { - t.Errorf("New() error = %v, wantErr %v", err, tt.wantErr) - return - } + require.ErrorIs(t, err, tt.wantErr) if got != nil { got.Stop() } diff --git a/processor/tailsamplingprocessor/internal/sampling/span_count_sampler.go b/processor/tailsamplingprocessor/internal/sampling/span_count_sampler.go new file mode 100644 index 000000000000..cdc3d8b974c4 --- /dev/null +++ b/processor/tailsamplingprocessor/internal/sampling/span_count_sampler.go @@ -0,0 +1,52 @@ +// 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 sampling // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor/internal/sampling" + +import ( + "go.opentelemetry.io/collector/pdata/pcommon" + "go.uber.org/zap" +) + +type spanCount struct { + logger *zap.Logger + minSpans int32 +} + +var _ PolicyEvaluator = (*spanCount)(nil) + +// NewSpanCount creates a policy evaluator sampling traces with more than one span per trace +func NewSpanCount(logger *zap.Logger, minSpans int32) PolicyEvaluator { + return &spanCount{ + logger: logger, + minSpans: minSpans, + } +} + +// Evaluate looks at the trace data and returns a corresponding SamplingDecision. +func (c spanCount) Evaluate(_ pcommon.TraceID, traceData *TraceData) (Decision, error) { + c.logger.Debug("Evaluating spans counts in filter") + + traceData.Lock() + batches := traceData.ReceivedBatches + traceData.Unlock() + + for i := range batches { + trace := batches[i] + if trace.SpanCount() >= int(c.minSpans) { + return Sampled, nil + } + } + return NotSampled, nil +} diff --git a/processor/tailsamplingprocessor/internal/sampling/span_count_sampler_test.go b/processor/tailsamplingprocessor/internal/sampling/span_count_sampler_test.go new file mode 100644 index 000000000000..358df84c9372 --- /dev/null +++ b/processor/tailsamplingprocessor/internal/sampling/span_count_sampler_test.go @@ -0,0 +1,97 @@ +// 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 sampling + +import ( + "testing" + + "github.com/stretchr/testify/assert" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/ptrace" + "go.uber.org/zap" +) + +func TestEvaluate_NumberSpans(t *testing.T) { + filter := NewSpanCount(zap.NewNop(), 2) + + traceID := pcommon.NewTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}) + + cases := []struct { + Desc string + NumberSpans []int32 + Decision Decision + }{ + { + "Only one trace, less than the threshold", + []int32{ + 1, + }, + NotSampled, + }, + { + "Less spans than the threshold", + []int32{ + 1, 1, 1, + }, + NotSampled, + }, + { + "Same number of spans than the threshold", + []int32{ + 1, 2, 1, + }, + Sampled, + }, + { + "Bigger amount of spans than the threashold", + []int32{ + 1, 3, 1, + }, + Sampled, + }, + } + + for _, c := range cases { + t.Run(c.Desc, func(t *testing.T) { + decision, err := filter.Evaluate(traceID, newTraceWithMultipleSpans(c.NumberSpans)) + + assert.NoError(t, err) + assert.Equal(t, decision, c.Decision) + }) + } +} + +func newTraceWithMultipleSpans(numberSpans []int32) *TraceData { + var traceBatches []ptrace.Traces + + // For each trace, going to create the number of spans defined in the array + for i := range numberSpans { + // Creates trace + traces := ptrace.NewTraces() + rs := traces.ResourceSpans().AppendEmpty() + ils := rs.ScopeSpans().AppendEmpty() + + for r := 0; r < int(numberSpans[i]); r++ { + span := ils.Spans().AppendEmpty() + span.SetTraceID(pcommon.NewTraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16})) + span.SetSpanID(pcommon.NewSpanID([8]byte{1, 2, 3, 4, 5, 6, 7, 8})) + } + traceBatches = append(traceBatches, traces) + } + + return &TraceData{ + ReceivedBatches: traceBatches, + } +} diff --git a/processor/tailsamplingprocessor/processor.go b/processor/tailsamplingprocessor/processor.go index afaef96f6547..f724f16ceb7e 100644 --- a/processor/tailsamplingprocessor/processor.go +++ b/processor/tailsamplingprocessor/processor.go @@ -145,6 +145,9 @@ func getPolicyEvaluator(logger *zap.Logger, cfg *PolicyCfg) (sampling.PolicyEval case And: andCfg := cfg.AndCfg return getNewAndPolicy(logger, andCfg) + case SpanCount: + spCfg := cfg.SpanCountCfg + return sampling.NewSpanCount(logger, spCfg.MinSpans), nil default: return nil, fmt.Errorf("unknown sampling policy type %s", cfg.Type) } diff --git a/processor/tailsamplingprocessor/testdata/tail_sampling_config.yaml b/processor/tailsamplingprocessor/testdata/tail_sampling_config.yaml index 13b861260c68..14dc89ab9728 100644 --- a/processor/tailsamplingprocessor/testdata/tail_sampling_config.yaml +++ b/processor/tailsamplingprocessor/testdata/tail_sampling_config.yaml @@ -45,6 +45,11 @@ processors: type: rate_limiting, rate_limiting: {spans_per_second: 35} }, + { + name: test-policy-8, + type: span_count, + span_count: {min_spans: 2} + }, { name: and-policy-1, type: and, diff --git a/processor/transformprocessor/CONTRIBUTING.md b/processor/transformprocessor/CONTRIBUTING.md new file mode 100644 index 000000000000..d36cc47fbe09 --- /dev/null +++ b/processor/transformprocessor/CONTRIBUTING.md @@ -0,0 +1,22 @@ +# Contributing + +This guide is specific to the transform processor. All guidelines in [Collector Contrib's CONTRIBUTING.MD](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md) must also be followed. + +## New Functions + +All new functions must be added via a new file. Function files must start with `func_`. Functions that are usable in multiple pipelines must be placed in `internal/common`. Functions that are specific to a pipeline must be placed in `internal/`. + +New functions must update the appropriate registry. For common functions, update the registry in `internal/common/functions.go`. For pipeline-specific functions, update the registry in `internal//functions.go` + +Unit tests must be added for all new functions. Unit test files must start with `func_` and end in `_test`. Unit tests must be placed in the same directory as the function. Functions that are not specific to a pipeline should be tested independently of any specific pipeline. Functions that are specific to a pipeline should be tests against that pipeline. + +All new functions should have integration tests added to any usable pipeline's `processing_test.go` tests. The purpose of these tests is not to test the function's logic, but its ability to be used within a specific pipeline. + +## New Values + +When adding new values to the grammar you must: + +1. Update the `Value` struct with the new value. This may also mean adding new token(s) to the lexer. +2. Update `NewFunctionCall` to be able to handle calling functions with this new value. +3. Update `NewGetter` to be able to handle the new value. +4. Add new unit tests. diff --git a/processor/transformprocessor/README.md b/processor/transformprocessor/README.md index c720b959a78d..30c0337834e5 100644 --- a/processor/transformprocessor/README.md +++ b/processor/transformprocessor/README.md @@ -17,8 +17,8 @@ in the OTLP protobuf definition. e.g., `status.code`, `attributes["http.method"] - Metric data types are `None`, `Gauge`, `Sum`, `Histogram`, `ExponentialHistogram`, and `Summary` - `aggregation_temporality` is converted to and from the [protobuf's numeric definition](https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/metrics/v1/metrics.proto#L291). Interact with this field using 0, 1, or 2. - Until the grammar can handle booleans, `is_monotic` is handled via strings the strings `"true"` and `"false"`. -- Literals: Strings, ints, and floats can be referenced as literal values. Byte slices can be references as a literal value via a hex string prefaced with `0x`, such as `0x0001`. -- Function invocations: Functions can be invoked with arguments matching the function's expected arguments +- Literals: Strings, ints, floats, bools, and nil can be referenced as literal values. Byte slices can be references as a literal value via a hex string prefaced with `0x`, such as `0x0001`. +- Function invocations: Functions can be invoked with arguments matching the function's expected arguments. The literal nil cannot be used as a replacement for maps or slices in function calls. - Where clause: Telemetry to modify can be filtered by appending `where a b`, with `a` and `b` being any of the above. Supported functions: @@ -43,10 +43,10 @@ the fields specified by the list of strings. e.g., `keep_keys(attributes, "http. Metric only functions: - `convert_sum_to_gauge()` - Converts incoming metrics of type "Sum" to type "Gauge", retaining the metric's datapoints. Noop for metrics that are not of type "Sum". -**NOTE:** This function may cause a metric to break semantics for [Gauge metrics](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/datamodel.md#gauge). Use at your own risk. +**NOTE:** This function may cause a metric to break semantics for [Gauge metrics](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#gauge). Use at your own risk. - `convert_gauge_to_sum(aggregation_temporality, is_monotonic)` - `aggregation_temporality` specifies the resultant metric's aggregation temporality. `aggregation_temporality` may be `"cumulative"` or `"delta"`. `is_monotonic` specifies the resultant metric's monotonicity. `is_monotonic` is a boolean. Converts incoming metrics of type "Gauge" to type "Sum", retaining the metric's datapoints and setting its aggregation temporality and monotonicity accordingly. Noop for metrics that are not of type "Gauge". -**NOTE:** This function may cause a metric to break semantics for [Sum metrics](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/datamodel.md#sums). Use at your own risk. +**NOTE:** This function may cause a metric to break semantics for [Sum metrics](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md#sums). Use at your own risk. Supported where operations: - `==` - matches telemetry where the values are equal to each other @@ -131,5 +131,9 @@ All logs 3) Set `body` to the `http.route` attribute if it is set 4) Keep only `service.name`, `service.namespace`, `cloud.region` resource attributes +## Contributing + +See [CONTRIBUTING.md](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/transformprocessor/CONTRIBUTING.md). + [alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha [contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/processor/transformprocessor/go.mod b/processor/transformprocessor/go.mod index f6e3d64490ac..9cc383996d25 100644 --- a/processor/transformprocessor/go.mod +++ b/processor/transformprocessor/go.mod @@ -6,8 +6,8 @@ require ( github.com/alecthomas/participle/v2 v2.0.0-alpha9 github.com/gobwas/glob v0.2.3 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/processor/transformprocessor/go.sum b/processor/transformprocessor/go.sum index 3a14b02b9e82..b5e1f8f14540 100644 --- a/processor/transformprocessor/go.sum +++ b/processor/transformprocessor/go.sum @@ -193,10 +193,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/processor/transformprocessor/internal/common/expression.go b/processor/transformprocessor/internal/common/expression.go index f3583b078c97..6e1bd890dd4f 100644 --- a/processor/transformprocessor/internal/common/expression.go +++ b/processor/transformprocessor/internal/common/expression.go @@ -58,6 +58,10 @@ func (g exprGetter) Get(ctx TransformContext) interface{} { } func NewGetter(val Value, functions map[string]interface{}, pathParser PathExpressionParser) (Getter, error) { + if val.IsNil != nil && *val.IsNil { + return &literal{value: nil}, nil + } + if s := val.String; s != nil { return &literal{value: *s}, nil } @@ -67,6 +71,9 @@ func NewGetter(val Value, functions map[string]interface{}, pathParser PathExpre if i := val.Int; i != nil { return &literal{value: *i}, nil } + if b := val.Bool; b != nil { + return &literal{value: bool(*b)}, nil + } if b := val.Bytes; b != nil { return &literal{value: ([]byte)(*b)}, nil } diff --git a/processor/transformprocessor/internal/common/expression_test.go b/processor/transformprocessor/internal/common/expression_test.go index aaa9228e283c..2459c9a3db20 100644 --- a/processor/transformprocessor/internal/common/expression_test.go +++ b/processor/transformprocessor/internal/common/expression_test.go @@ -62,6 +62,20 @@ func Test_newGetter(t *testing.T) { }, want: []byte{1, 2, 3, 4, 5, 6, 7, 8}, }, + { + name: "nil literal", + val: Value{ + IsNil: (*IsNil)(testhelper.Boolp(true)), + }, + want: nil, + }, + { + name: "bool literal", + val: Value{ + Bool: (*Boolean)(testhelper.Boolp(true)), + }, + want: true, + }, { name: "path expression", val: Value{ diff --git a/processor/transformprocessor/internal/common/func_replace_all_matches.go b/processor/transformprocessor/internal/common/func_replace_all_matches.go index ff1433a69def..2bbd906edcd0 100644 --- a/processor/transformprocessor/internal/common/func_replace_all_matches.go +++ b/processor/transformprocessor/internal/common/func_replace_all_matches.go @@ -24,7 +24,7 @@ import ( func replaceAllMatches(target GetSetter, pattern string, replacement string) (ExprFunc, error) { glob, err := glob.Compile(pattern) if err != nil { - return nil, fmt.Errorf("the pattern supplied to replace_match is not a valid pattern, %v", err) + return nil, fmt.Errorf("the pattern supplied to replace_match is not a valid pattern: %w", err) } return func(ctx TransformContext) interface{} { val := target.Get(ctx) diff --git a/processor/transformprocessor/internal/common/func_replace_match.go b/processor/transformprocessor/internal/common/func_replace_match.go index 623146369709..7497e1c944ff 100644 --- a/processor/transformprocessor/internal/common/func_replace_match.go +++ b/processor/transformprocessor/internal/common/func_replace_match.go @@ -23,7 +23,7 @@ import ( func replaceMatch(target GetSetter, pattern string, replacement string) (ExprFunc, error) { glob, err := glob.Compile(pattern) if err != nil { - return nil, fmt.Errorf("the pattern supplied to replace_match is not a valid pattern, %v", err) + return nil, fmt.Errorf("the pattern supplied to replace_match is not a valid pattern: %w", err) } return func(ctx TransformContext) interface{} { val := target.Get(ctx) diff --git a/processor/transformprocessor/internal/common/functions_test.go b/processor/transformprocessor/internal/common/functions_test.go index 78fe55990749..b13cd9a4ebef 100644 --- a/processor/transformprocessor/internal/common/functions_test.go +++ b/processor/transformprocessor/internal/common/functions_test.go @@ -251,6 +251,17 @@ func Test_NewFunctionCall(t *testing.T) { }, }, }, + { + name: "getter arg with nil literal", + inv: Invocation{ + Function: "testing_getter", + Arguments: []Value{ + { + IsNil: (*IsNil)(testhelper.Boolp(true)), + }, + }, + }, + }, { name: "string arg", inv: Invocation{ diff --git a/processor/transformprocessor/internal/common/parser.go b/processor/transformprocessor/internal/common/parser.go index a162fa906a9b..5a5c910aaba1 100644 --- a/processor/transformprocessor/internal/common/parser.go +++ b/processor/transformprocessor/internal/common/parser.go @@ -56,6 +56,7 @@ type Value struct { Float *float64 `| @Float` Int *int64 `| @Int` Bool *Boolean `| @("true" | "false")` + IsNil *IsNil `| @"nil"` Path *Path `| @@ )` } @@ -101,6 +102,13 @@ func (b *Boolean) Capture(values []string) error { return nil } +type IsNil bool + +func (n *IsNil) Capture(_ []string) error { + *n = true + return nil +} + func ParseQueries(statements []string, functions map[string]interface{}, pathParser PathExpressionParser) ([]Query, error) { queries := make([]Query, 0) var errors error diff --git a/processor/transformprocessor/internal/common/parser_test.go b/processor/transformprocessor/internal/common/parser_test.go index e566afeaebe5..42ee07a0da56 100644 --- a/processor/transformprocessor/internal/common/parser_test.go +++ b/processor/transformprocessor/internal/common/parser_test.go @@ -337,6 +337,30 @@ func Test_parse(t *testing.T) { Condition: nil, }, }, + { + query: `set(attributes["test"], nil)`, + expected: &ParsedQuery{ + Invocation: Invocation{ + Function: "set", + Arguments: []Value{ + { + Path: &Path{ + Fields: []Field{ + { + Name: "attributes", + MapKey: testhelper.Strp("test"), + }, + }, + }, + }, + { + IsNil: (*IsNil)(testhelper.Boolp(true)), + }, + }, + }, + Condition: nil, + }, + }, } for _, tt := range tests { diff --git a/processor/transformprocessor/internal/logs/functions_test.go b/processor/transformprocessor/internal/logs/functions_test.go index a2c4710e5bed..8750ab9fdffd 100644 --- a/processor/transformprocessor/internal/logs/functions_test.go +++ b/processor/transformprocessor/internal/logs/functions_test.go @@ -18,146 +18,10 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/plog" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/common" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/common/testhelper" ) -func Test_newFunctionCall(t *testing.T) { - input := plog.NewLogRecord() - attrs := pcommon.NewMap() - attrs.InsertString("test", "1") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(input.Attributes()) - - tests := []struct { - name string - inv common.Invocation - want func(plog.LogRecord) - }{ - { - name: "set name", - inv: common.Invocation{ - Function: "set", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "severity_text", - }, - }, - }, - }, - { - String: testhelper.Strp("fail"), - }, - }, - }, - want: func(log plog.LogRecord) { - input.CopyTo(log) - log.SetSeverityText("fail") - }, - }, - { - name: "keep_keys one", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - }, - }, - want: func(log plog.LogRecord) { - input.CopyTo(log) - log.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "1") - attrs.CopyTo(log.Attributes()) - }, - }, - { - name: "keep_keys two", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - { - String: testhelper.Strp("test2"), - }, - }, - }, - want: func(log plog.LogRecord) { - input.CopyTo(log) - log.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "1") - attrs.InsertInt("test2", 3) - attrs.CopyTo(log.Attributes()) - }, - }, - { - name: "keep_keys none", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - }, - }, - want: func(log plog.LogRecord) { - input.CopyTo(log) - log.Attributes().Clear() - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - log := plog.NewLogRecord() - input.CopyTo(log) - - evaluate, err := common.NewFunctionCall(tt.inv, DefaultFunctions(), ParsePath) - assert.NoError(t, err) - evaluate(logTransformContext{ - log: log, - il: pcommon.NewInstrumentationScope(), - resource: pcommon.NewResource(), - }) - - expected := plog.NewLogRecord() - tt.want(expected) - assert.Equal(t, expected, log) - }) - } +func Test_DefaultFunctions(t *testing.T) { + assert.Equal(t, common.DefaultFunctions(), DefaultFunctions()) } diff --git a/processor/transformprocessor/internal/metrics/functions_test.go b/processor/transformprocessor/internal/metrics/functions_test.go index 05b41203decb..e3d107c55824 100644 --- a/processor/transformprocessor/internal/metrics/functions_test.go +++ b/processor/transformprocessor/internal/metrics/functions_test.go @@ -16,1855 +16,25 @@ package metrics import ( "testing" - "time" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/pmetric" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/common" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/common/testhelper" ) -func Test_newFunctionCall_invalid(t *testing.T) { - tests := []struct { - name string - inv common.Invocation - }{ - { - name: "invalid aggregation temporality", - inv: common.Invocation{ - Function: "convert_gauge_to_sum", - Arguments: []common.Value{ - { - String: testhelper.Strp("invalid_agg_temp"), - }, - { - Bool: (*common.Boolean)(testhelper.Boolp(true)), - }, - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - _, err := common.NewFunctionCall(tt.inv, DefaultFunctions(), ParsePath) - assert.Error(t, err) - }) - } -} -func Test_newFunctionCall_NumberDataPoint(t *testing.T) { - input := pmetric.NewNumberDataPoint() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(input.Attributes()) - - tests := []struct { - name string - inv common.Invocation - want func(pmetric.NumberDataPoint) - }{ - { - name: "set timestamp", - inv: common.Invocation{ - Function: "set", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "start_time_unix_nano", - }, - }, - }, - }, - { - Int: testhelper.Intp(int64(100_000_000)), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.SetStartTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(100))) - }, - }, - { - name: "keep_keys one", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "keep_keys two", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - { - String: testhelper.Strp("test2"), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "keep_keys none", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - }, - }, - { - name: "truncate attributes", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "h") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes with zero", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(0), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes nothing", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(100), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes exact", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(11), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate resource attributes", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "resource", - }, - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(11), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes zero", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(0), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes nothing", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(100), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit resource attributes", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "resource", - }, - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.NumberDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - dataPoint := pmetric.NewNumberDataPoint() - input.CopyTo(dataPoint) - - evaluate, err := common.NewFunctionCall(tt.inv, DefaultFunctions(), ParsePath) - assert.NoError(t, err) - evaluate(metricTransformContext{ - dataPoint: dataPoint, - il: pcommon.NewInstrumentationScope(), - resource: pcommon.NewResource(), - }) +func Test_DefaultFunctions(t *testing.T) { + expectedFunctions := common.DefaultFunctions() + expectedFunctions["convert_sum_to_gauge"] = convertSumToGauge + expectedFunctions["convert_gauge_to_sum"] = convertGaugeToSum - expected := pmetric.NewNumberDataPoint() - tt.want(expected) - assert.Equal(t, expected, dataPoint) - }) - } -} - -func Test_newFunctionCall_HistogramDataPoint(t *testing.T) { - input := pmetric.NewHistogramDataPoint() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(input.Attributes()) - - tests := []struct { - name string - inv common.Invocation - want func(pmetric.HistogramDataPoint) - }{ - { - name: "set timestamp", - inv: common.Invocation{ - Function: "set", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "start_time_unix_nano", - }, - }, - }, - }, - { - Int: testhelper.Intp(int64(100_000_000)), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.SetStartTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(100))) - }, - }, - { - name: "keep_keys one", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "keep_keys two", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - { - String: testhelper.Strp("test2"), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "keep_keys none", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - }, - }, - { - name: "truncate attributes", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "h") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes with zero", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(0), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes nothing", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(100), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes exact", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(11), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate resource attributes", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "resource", - }, - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(11), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes zero", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(0), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes nothing", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(100), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit resource attributes", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "resource", - }, - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.HistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - dataPoint := pmetric.NewHistogramDataPoint() - input.CopyTo(dataPoint) - - evaluate, err := common.NewFunctionCall(tt.inv, DefaultFunctions(), ParsePath) - assert.NoError(t, err) - evaluate(metricTransformContext{ - dataPoint: dataPoint, - il: pcommon.NewInstrumentationScope(), - resource: pcommon.NewResource(), - }) - - expected := pmetric.NewHistogramDataPoint() - tt.want(expected) - assert.Equal(t, expected, dataPoint) - }) - } -} - -func Test_newFunctionCall_ExponentialHistogramDataPoint(t *testing.T) { - input := pmetric.NewExponentialHistogramDataPoint() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(input.Attributes()) - - tests := []struct { - name string - inv common.Invocation - want func(pmetric.ExponentialHistogramDataPoint) - }{ - { - name: "set timestamp", - inv: common.Invocation{ - Function: "set", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "start_time_unix_nano", - }, - }, - }, - }, - { - Int: testhelper.Intp(int64(100_000_000)), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.SetStartTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(100))) - }, - }, - { - name: "keep_keys one", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "keep_keys two", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - { - String: testhelper.Strp("test2"), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "keep_keys none", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - }, - }, - { - name: "truncate attributes", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "h") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes with zero", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(0), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes nothing", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(100), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes exact", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(11), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate resource attributes", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "resource", - }, - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(11), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes zero", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(0), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes nothing", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(100), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit resource attributes", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "resource", - }, - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.ExponentialHistogramDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - dataPoint := pmetric.NewExponentialHistogramDataPoint() - input.CopyTo(dataPoint) - - evaluate, err := common.NewFunctionCall(tt.inv, DefaultFunctions(), ParsePath) - assert.NoError(t, err) - evaluate(metricTransformContext{ - dataPoint: dataPoint, - il: pcommon.NewInstrumentationScope(), - resource: pcommon.NewResource(), - }) - - expected := pmetric.NewExponentialHistogramDataPoint() - tt.want(expected) - assert.Equal(t, expected, dataPoint) - }) - } -} - -func Test_newFunctionCall_SummaryDataPoint(t *testing.T) { - input := pmetric.NewSummaryDataPoint() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(input.Attributes()) - - tests := []struct { - name string - inv common.Invocation - want func(pmetric.SummaryDataPoint) - }{ - { - name: "set timestamp", - inv: common.Invocation{ - Function: "set", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "start_time_unix_nano", - }, - }, - }, - }, - { - Int: testhelper.Intp(int64(100_000_000)), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.SetStartTimestamp(pcommon.NewTimestampFromTime(time.UnixMilli(100))) - }, - }, - { - name: "keep_keys one", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "keep_keys two", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - { - String: testhelper.Strp("test2"), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "keep_keys none", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - }, - }, - { - name: "truncate attributes", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "h") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes with zero", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(0), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes nothing", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(100), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate attributes exact", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(11), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "truncate resource attributes", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "resource", - }, - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(11), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes zero", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(0), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit attributes nothing", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(100), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - { - name: "limit resource attributes", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "resource", - }, - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(dataPoint pmetric.SummaryDataPoint) { - input.CopyTo(dataPoint) - dataPoint.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.CopyTo(dataPoint.Attributes()) - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - dataPoint := pmetric.NewSummaryDataPoint() - input.CopyTo(dataPoint) - - evaluate, err := common.NewFunctionCall(tt.inv, DefaultFunctions(), ParsePath) - assert.NoError(t, err) - evaluate(metricTransformContext{ - dataPoint: dataPoint, - il: pcommon.NewInstrumentationScope(), - resource: pcommon.NewResource(), - }) - - expected := pmetric.NewSummaryDataPoint() - tt.want(expected) - assert.Equal(t, expected, dataPoint) - }) - } -} - -func Test_newFunctionCall_Metric(t *testing.T) { - input := pmetric.NewMetric() - input.SetName("Starting Name") - - tests := []struct { - name string - inv common.Invocation - want func(pmetric.Metric) - }{ - { - name: "set name", - inv: common.Invocation{ - Function: "set", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "metric", - }, - { - Name: "name", - }, - }, - }, - }, - { - String: testhelper.Strp("ending name"), - }, - }, - }, - want: func(metric pmetric.Metric) { - input.CopyTo(metric) - metric.SetName("ending name") - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - metric := pmetric.NewMetric() - input.CopyTo(metric) - - evaluate, err := common.NewFunctionCall(tt.inv, DefaultFunctions(), ParsePath) - assert.NoError(t, err) - evaluate(metricTransformContext{ - metric: metric, - il: pcommon.NewInstrumentationScope(), - resource: pcommon.NewResource(), - }) - - expected := pmetric.NewMetric() - tt.want(expected) - assert.Equal(t, expected, metric) - }) - } -} - -func Test_newFunctionCall_Metric_Sum(t *testing.T) { - input := pmetric.NewMetric() - input.SetDataType(pmetric.MetricDataTypeSum) - - dp1 := input.Sum().DataPoints().AppendEmpty() - dp1.SetIntVal(10) - - dp2 := input.Sum().DataPoints().AppendEmpty() - dp2.SetDoubleVal(14.5) - - tests := []struct { - name string - inv common.Invocation - want func(pmetric.Metric) - }{ - { - name: "convert sum to gauge", - inv: common.Invocation{ - Function: "convert_sum_to_gauge", - Arguments: []common.Value{}, - }, - want: func(metric pmetric.Metric) { - input.CopyTo(metric) - - dps := input.Sum().DataPoints() - metric.SetDataType(pmetric.MetricDataTypeGauge) - dps.CopyTo(metric.Gauge().DataPoints()) - }, - }, - { - name: "convert gauge to sum (noop)", - inv: common.Invocation{ - Function: "convert_gauge_to_sum", - Arguments: []common.Value{ - { - String: testhelper.Strp("delta"), - }, - { - Bool: (*common.Boolean)(testhelper.Boolp(false)), - }, - }, - }, - want: func(metric pmetric.Metric) { - input.CopyTo(metric) - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - metric := pmetric.NewMetric() - input.CopyTo(metric) - - evaluate, err := common.NewFunctionCall(tt.inv, DefaultFunctions(), ParsePath) - assert.NoError(t, err) - evaluate(metricTransformContext{ - metric: metric, - il: pcommon.NewInstrumentationScope(), - resource: pcommon.NewResource(), - }) - - expected := pmetric.NewMetric() - tt.want(expected) - assert.Equal(t, expected, metric) - }) - } -} - -func Test_newFunctionCall_Metric_Gauge(t *testing.T) { - input := pmetric.NewMetric() - input.SetDataType(pmetric.MetricDataTypeGauge) - - dp1 := input.Gauge().DataPoints().AppendEmpty() - dp1.SetIntVal(10) - - dp2 := input.Gauge().DataPoints().AppendEmpty() - dp2.SetDoubleVal(14.5) - - tests := []struct { - name string - inv common.Invocation - want func(pmetric.Metric) - }{ - { - name: "convert gauge to sum 1", - inv: common.Invocation{ - Function: "convert_gauge_to_sum", - Arguments: []common.Value{ - { - String: testhelper.Strp("cumulative"), - }, - { - Bool: (*common.Boolean)(testhelper.Boolp(false)), - }, - }, - }, - want: func(metric pmetric.Metric) { - input.CopyTo(metric) - - dps := input.Gauge().DataPoints() - - metric.SetDataType(pmetric.MetricDataTypeSum) - metric.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) - metric.Sum().SetIsMonotonic(false) - - dps.CopyTo(metric.Sum().DataPoints()) - }, - }, - { - name: "convert gauge to sum 2", - inv: common.Invocation{ - Function: "convert_gauge_to_sum", - Arguments: []common.Value{ - { - String: testhelper.Strp("delta"), - }, - { - Bool: (*common.Boolean)(testhelper.Boolp(true)), - }, - }, - }, - want: func(metric pmetric.Metric) { - input.CopyTo(metric) - - dps := input.Gauge().DataPoints() - - metric.SetDataType(pmetric.MetricDataTypeSum) - metric.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityDelta) - metric.Sum().SetIsMonotonic(true) - - dps.CopyTo(metric.Sum().DataPoints()) - }, - }, - { - name: "convert sum to gauge (no-op)", - inv: common.Invocation{ - Function: "convert_sum_to_gauge", - Arguments: []common.Value{}, - }, - want: func(metric pmetric.Metric) { - input.CopyTo(metric) - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - metric := pmetric.NewMetric() - input.CopyTo(metric) + actual := DefaultFunctions() - evaluate, err := common.NewFunctionCall(tt.inv, DefaultFunctions(), ParsePath) - assert.NoError(t, err) - evaluate(metricTransformContext{ - metric: metric, - il: pcommon.NewInstrumentationScope(), - resource: pcommon.NewResource(), - }) + assert.NotNil(t, actual) + assert.Equal(t, len(expectedFunctions), len(actual)) - expected := pmetric.NewMetric() - tt.want(expected) - assert.Equal(t, expected, metric) - }) + for k := range actual { + if _, ok := expectedFunctions[k]; !ok { + assert.FailNowf(t, "%v is not an expected function", k) + } } } diff --git a/processor/transformprocessor/internal/metrics/metrics.go b/processor/transformprocessor/internal/metrics/metrics.go index b1df10291bdc..9875e4d2dd43 100644 --- a/processor/transformprocessor/internal/metrics/metrics.go +++ b/processor/transformprocessor/internal/metrics/metrics.go @@ -16,7 +16,6 @@ package metrics // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/metrics" import ( "fmt" - "strconv" "time" "go.opentelemetry.io/collector/pdata/pcommon" @@ -345,18 +344,16 @@ func accessMetricIsMonotonic() pathGetSetter { metric := ctx.(metricTransformContext).GetMetric() switch metric.DataType() { case pmetric.MetricDataTypeSum: - return strconv.FormatBool(metric.Sum().IsMonotonic()) + return metric.Sum().IsMonotonic() } return nil }, setter: func(ctx common.TransformContext, val interface{}) { - if newIsMonotonic, ok := val.(string); ok { + if newIsMonotonic, ok := val.(bool); ok { metric := ctx.(metricTransformContext).GetMetric() switch metric.DataType() { case pmetric.MetricDataTypeSum: - if boolVal, err := strconv.ParseBool(newIsMonotonic); err == nil { - metric.Sum().SetIsMonotonic(boolVal) - } + metric.Sum().SetIsMonotonic(newIsMonotonic) } } }, @@ -604,23 +601,23 @@ func accessCount() pathGetSetter { getter: func(ctx common.TransformContext) interface{} { switch ctx.GetItem().(type) { case pmetric.HistogramDataPoint: - return ctx.GetItem().(pmetric.HistogramDataPoint).Count() + return int64(ctx.GetItem().(pmetric.HistogramDataPoint).Count()) case pmetric.ExponentialHistogramDataPoint: - return ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Count() + return int64(ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Count()) case pmetric.SummaryDataPoint: - return ctx.GetItem().(pmetric.SummaryDataPoint).Count() + return int64(ctx.GetItem().(pmetric.SummaryDataPoint).Count()) } return nil }, setter: func(ctx common.TransformContext, val interface{}) { - if newCount, ok := val.(uint64); ok { + if newCount, ok := val.(int64); ok { switch ctx.GetItem().(type) { case pmetric.HistogramDataPoint: - ctx.GetItem().(pmetric.HistogramDataPoint).SetCount(newCount) + ctx.GetItem().(pmetric.HistogramDataPoint).SetCount(uint64(newCount)) case pmetric.ExponentialHistogramDataPoint: - ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).SetCount(newCount) + ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).SetCount(uint64(newCount)) case pmetric.SummaryDataPoint: - ctx.GetItem().(pmetric.SummaryDataPoint).SetCount(newCount) + ctx.GetItem().(pmetric.SummaryDataPoint).SetCount(uint64(newCount)) } } }, @@ -700,15 +697,15 @@ func accessScale() pathGetSetter { getter: func(ctx common.TransformContext) interface{} { switch ctx.GetItem().(type) { case pmetric.ExponentialHistogramDataPoint: - return ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Scale() + return int64(ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Scale()) } return nil }, setter: func(ctx common.TransformContext, val interface{}) { - if newScale, ok := val.(int32); ok { + if newScale, ok := val.(int64); ok { switch ctx.GetItem().(type) { case pmetric.ExponentialHistogramDataPoint: - ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).SetScale(newScale) + ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).SetScale(int32(newScale)) } } }, @@ -720,15 +717,15 @@ func accessZeroCount() pathGetSetter { getter: func(ctx common.TransformContext) interface{} { switch ctx.GetItem().(type) { case pmetric.ExponentialHistogramDataPoint: - return ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).ZeroCount() + return int64(ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).ZeroCount()) } return nil }, setter: func(ctx common.TransformContext, val interface{}) { - if newZeroCount, ok := val.(uint64); ok { + if newZeroCount, ok := val.(int64); ok { switch ctx.GetItem().(type) { case pmetric.ExponentialHistogramDataPoint: - ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).SetZeroCount(newZeroCount) + ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).SetZeroCount(uint64(newZeroCount)) } } }, @@ -760,15 +757,15 @@ func accessPositiveOffset() pathGetSetter { getter: func(ctx common.TransformContext) interface{} { switch ctx.GetItem().(type) { case pmetric.ExponentialHistogramDataPoint: - return ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Positive().Offset() + return int64(ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Positive().Offset()) } return nil }, setter: func(ctx common.TransformContext, val interface{}) { - if newPositiveOffset, ok := val.(int32); ok { + if newPositiveOffset, ok := val.(int64); ok { switch ctx.GetItem().(type) { case pmetric.ExponentialHistogramDataPoint: - ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Positive().SetOffset(newPositiveOffset) + ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Positive().SetOffset(int32(newPositiveOffset)) } } }, @@ -820,15 +817,15 @@ func accessNegativeOffset() pathGetSetter { getter: func(ctx common.TransformContext) interface{} { switch ctx.GetItem().(type) { case pmetric.ExponentialHistogramDataPoint: - return ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Negative().Offset() + return int64(ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Negative().Offset()) } return nil }, setter: func(ctx common.TransformContext, val interface{}) { - if newNegativeOffset, ok := val.(int32); ok { + if newNegativeOffset, ok := val.(int64); ok { switch ctx.GetItem().(type) { case pmetric.ExponentialHistogramDataPoint: - ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Negative().SetOffset(newNegativeOffset) + ctx.GetItem().(pmetric.ExponentialHistogramDataPoint).Negative().SetOffset(int32(newNegativeOffset)) } } }, diff --git a/processor/transformprocessor/internal/metrics/metrics_test.go b/processor/transformprocessor/internal/metrics/metrics_test.go index 1cd014e67b5f..33c08a3803ea 100644 --- a/processor/transformprocessor/internal/metrics/metrics_test.go +++ b/processor/transformprocessor/internal/metrics/metrics_test.go @@ -391,8 +391,8 @@ func Test_newPathGetSetter_HistogramDataPoint(t *testing.T) { Name: "count", }, }, - orig: uint64(2), - new: uint64(3), + orig: int64(2), + new: int64(3), modified: func(datapoint pmetric.HistogramDataPoint) { datapoint.SetCount(3) }, @@ -729,8 +729,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { Name: "count", }, }, - orig: uint64(2), - new: uint64(3), + orig: int64(2), + new: int64(3), modified: func(datapoint pmetric.ExponentialHistogramDataPoint) { datapoint.SetCount(3) }, @@ -755,8 +755,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { Name: "scale", }, }, - orig: int32(1), - new: int32(2), + orig: int64(1), + new: int64(2), modified: func(datapoint pmetric.ExponentialHistogramDataPoint) { datapoint.SetScale(2) }, @@ -768,8 +768,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { Name: "zero_count", }, }, - orig: uint64(1), - new: uint64(2), + orig: int64(1), + new: int64(2), modified: func(datapoint pmetric.ExponentialHistogramDataPoint) { datapoint.SetZeroCount(2) }, @@ -797,8 +797,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { Name: "offset", }, }, - orig: int32(1), - new: int32(2), + orig: int64(1), + new: int64(2), modified: func(datapoint pmetric.ExponentialHistogramDataPoint) { datapoint.Positive().SetOffset(2) }, @@ -842,8 +842,8 @@ func Test_newPathGetSetter_ExpoHistogramDataPoint(t *testing.T) { Name: "offset", }, }, - orig: int32(1), - new: int32(2), + orig: int64(1), + new: int64(2), modified: func(datapoint pmetric.ExponentialHistogramDataPoint) { datapoint.Negative().SetOffset(2) }, @@ -1158,8 +1158,8 @@ func Test_newPathGetSetter_SummaryDataPoint(t *testing.T) { Name: "count", }, }, - orig: uint64(2), - new: uint64(3), + orig: int64(2), + new: int64(3), modified: func(datapoint pmetric.SummaryDataPoint) { datapoint.SetCount(3) }, @@ -1549,8 +1549,8 @@ func Test_newPathGetSetter_Metric(t *testing.T) { Name: "is_monotonic", }, }, - orig: "true", - new: "false", + orig: true, + new: false, modified: func(metric pmetric.Metric) { metric.Sum().SetIsMonotonic(false) }, diff --git a/processor/transformprocessor/internal/metrics/processor_test.go b/processor/transformprocessor/internal/metrics/processor_test.go index 149197f2d895..f06bd219a4d2 100644 --- a/processor/transformprocessor/internal/metrics/processor_test.go +++ b/processor/transformprocessor/internal/metrics/processor_test.go @@ -49,6 +49,8 @@ func TestProcess(t *testing.T) { td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Sum().DataPoints().At(1).Attributes().InsertString("test", "pass") td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(1).Histogram().DataPoints().At(0).Attributes().InsertString("test", "pass") td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(1).Histogram().DataPoints().At(1).Attributes().InsertString("test", "pass") + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).ExponentialHistogram().DataPoints().At(0).Attributes().InsertString("test", "pass") + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).ExponentialHistogram().DataPoints().At(1).Attributes().InsertString("test", "pass") }, }, { @@ -65,6 +67,7 @@ func TestProcess(t *testing.T) { want: func(td pmetric.Metrics) { td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).SetDescription("test") td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(1).SetDescription("test") + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).SetDescription("test") }, }, { @@ -72,6 +75,7 @@ func TestProcess(t *testing.T) { want: func(td pmetric.Metrics) { td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).SetUnit("new unit") td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(1).SetUnit("new unit") + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).SetUnit("new unit") }, }, { @@ -85,14 +89,46 @@ func TestProcess(t *testing.T) { want: func(td pmetric.Metrics) { td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityDelta) td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(1).Histogram().SetAggregationTemporality(pmetric.MetricAggregationTemporalityDelta) + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).ExponentialHistogram().SetAggregationTemporality(pmetric.MetricAggregationTemporalityDelta) }, }, { - query: `set(metric.is_monotonic, "true") where metric.is_monotonic == "false"`, + query: `set(metric.is_monotonic, true) where metric.is_monotonic == false`, want: func(td pmetric.Metrics) { td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Sum().SetIsMonotonic(true) }, }, + { + query: `set(attributes["test"], "pass") where count == 1`, + want: func(td pmetric.Metrics) { + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(1).Histogram().DataPoints().At(0).Attributes().InsertString("test", "pass") + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).ExponentialHistogram().DataPoints().At(0).Attributes().InsertString("test", "pass") + }, + }, + { + query: `set(attributes["test"], "pass") where scale == 1`, + want: func(td pmetric.Metrics) { + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).ExponentialHistogram().DataPoints().At(0).Attributes().InsertString("test", "pass") + }, + }, + { + query: `set(attributes["test"], "pass") where zero_count == 1`, + want: func(td pmetric.Metrics) { + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).ExponentialHistogram().DataPoints().At(0).Attributes().InsertString("test", "pass") + }, + }, + { + query: `set(attributes["test"], "pass") where positive.offset == 1`, + want: func(td pmetric.Metrics) { + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).ExponentialHistogram().DataPoints().At(0).Attributes().InsertString("test", "pass") + }, + }, + { + query: `set(attributes["test"], "pass") where negative.offset == 1`, + want: func(td pmetric.Metrics) { + td.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(2).ExponentialHistogram().DataPoints().At(0).Attributes().InsertString("test", "pass") + }, + }, } for _, tt := range tests { @@ -119,6 +155,7 @@ func constructMetrics() pmetric.Metrics { rm0ils0 := rm0.ScopeMetrics().AppendEmpty() fillMetricOne(rm0ils0.Metrics().AppendEmpty()) fillMetricTwo(rm0ils0.Metrics().AppendEmpty()) + fillMetricThree(rm0ils0.Metrics().AppendEmpty()) return td } @@ -152,6 +189,7 @@ func fillMetricTwo(m pmetric.Metric) { dataPoint0.Attributes().InsertString("attr1", "test1") dataPoint0.Attributes().InsertString("attr2", "test2") dataPoint0.Attributes().InsertString("attr3", "test3") + dataPoint0.SetCount(1) dataPoint1 := m.Histogram().DataPoints().AppendEmpty() dataPoint1.SetStartTimestamp(StartTimestamp) @@ -159,3 +197,27 @@ func fillMetricTwo(m pmetric.Metric) { dataPoint1.Attributes().InsertString("attr2", "test2") dataPoint1.Attributes().InsertString("attr3", "test3") } + +func fillMetricThree(m pmetric.Metric) { + m.SetName("operationC") + m.SetDescription("operationC description") + m.SetUnit("operationC unit") + m.SetDataType(pmetric.MetricDataTypeExponentialHistogram) + + dataPoint0 := m.ExponentialHistogram().DataPoints().AppendEmpty() + dataPoint0.SetStartTimestamp(StartTimestamp) + dataPoint0.Attributes().InsertString("attr1", "test1") + dataPoint0.Attributes().InsertString("attr2", "test2") + dataPoint0.Attributes().InsertString("attr3", "test3") + dataPoint0.SetCount(1) + dataPoint0.SetScale(1) + dataPoint0.SetZeroCount(1) + dataPoint0.Positive().SetOffset(1) + dataPoint0.Negative().SetOffset(1) + + dataPoint1 := m.ExponentialHistogram().DataPoints().AppendEmpty() + dataPoint1.SetStartTimestamp(StartTimestamp) + dataPoint1.Attributes().InsertString("attr1", "test1") + dataPoint1.Attributes().InsertString("attr2", "test2") + dataPoint1.Attributes().InsertString("attr3", "test3") +} diff --git a/processor/transformprocessor/internal/traces/functions_test.go b/processor/transformprocessor/internal/traces/functions_test.go index 3adb2dc81038..100d78bbb0e5 100644 --- a/processor/transformprocessor/internal/traces/functions_test.go +++ b/processor/transformprocessor/internal/traces/functions_test.go @@ -18,578 +18,10 @@ import ( "testing" "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/ptrace" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/common" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/common/testhelper" ) -func Test_newFunctionCall(t *testing.T) { - input := ptrace.NewSpan() - input.SetName("bear") - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "hello") - attrs.CopyTo(input.Attributes()) - - tests := []struct { - name string - inv common.Invocation - want func(ptrace.Span) - }{ - { - name: "set name", - inv: common.Invocation{ - Function: "set", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "name", - }, - }, - }, - }, - { - String: testhelper.Strp("cat"), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.SetName("cat") - }, - }, - { - name: "set status.code", - inv: common.Invocation{ - Function: "set", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "status", - }, - { - Name: "code", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Status().SetCode(ptrace.StatusCodeOk) - }, - }, - { - name: "keep_keys one", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "keep_keys two", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("test"), - }, - { - String: testhelper.Strp("test2"), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "keep_keys none", - inv: common.Invocation{ - Function: "keep_keys", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - }, - }, - { - name: "truncate attributes", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "h") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "h") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "truncate attributes with zero", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(0), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "truncate attributes nothing", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(100), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "hello") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "truncate attributes exact", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(11), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "hello") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "truncate resource attributes", - inv: common.Invocation{ - Function: "truncate_all", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "resource", - }, - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(11), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "hello") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "limit attributes", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "limit attributes zero", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(0), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "limit attributes nothing", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(100), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "hello") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "limit resource attributes", - inv: common.Invocation{ - Function: "limit", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "resource", - }, - { - Name: "attributes", - }, - }, - }, - }, - { - Int: testhelper.Intp(1), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "hello") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "testing replace_match", - inv: common.Invocation{ - Function: "replace_match", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - MapKey: testhelper.Strp("test"), - }, - }, - }, - }, - { - String: testhelper.Strp("hello*"), - }, - { - String: testhelper.Strp("hello {universe}"), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello {universe}") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "hello") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "testing replace_match doesn't match", - inv: common.Invocation{ - Function: "replace_match", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - MapKey: testhelper.Strp("test"), - }, - }, - }, - }, - { - String: testhelper.Strp("goodbye*"), - }, - { - String: testhelper.Strp("goodbye {universe}"), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "hello") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "testing replace_all_matches", - inv: common.Invocation{ - Function: "replace_all_matches", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("hello*"), - }, - { - String: testhelper.Strp("hello {universe}"), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello {universe}") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "hello {universe}") - attrs.CopyTo(span.Attributes()) - }, - }, - { - name: "testing replace_all_matches no matches", - inv: common.Invocation{ - Function: "replace_all_matches", - Arguments: []common.Value{ - { - Path: &common.Path{ - Fields: []common.Field{ - { - Name: "attributes", - }, - }, - }, - }, - { - String: testhelper.Strp("goodbye*"), - }, - { - String: testhelper.Strp("goodbye {universe}"), - }, - }, - }, - want: func(span ptrace.Span) { - input.CopyTo(span) - span.Attributes().Clear() - attrs := pcommon.NewMap() - attrs.InsertString("test", "hello world") - attrs.InsertInt("test2", 3) - attrs.InsertBool("test3", true) - attrs.InsertString("test4", "hello") - attrs.CopyTo(span.Attributes()) - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - span := ptrace.NewSpan() - input.CopyTo(span) - - evaluate, err := common.NewFunctionCall(tt.inv, DefaultFunctions(), ParsePath) - assert.NoError(t, err) - evaluate(spanTransformContext{ - span: span, - il: pcommon.NewInstrumentationScope(), - resource: pcommon.NewResource(), - }) - - expected := ptrace.NewSpan() - tt.want(expected) - assert.Equal(t, expected, span) - }) - } +func Test_DefaultFunctions(t *testing.T) { + assert.Equal(t, common.DefaultFunctions(), DefaultFunctions()) } diff --git a/processor/transformprocessor/internal/traces/processor_test.go b/processor/transformprocessor/internal/traces/processor_test.go index b3de0a0c67bc..f85689e9fe43 100644 --- a/processor/transformprocessor/internal/traces/processor_test.go +++ b/processor/transformprocessor/internal/traces/processor_test.go @@ -66,17 +66,54 @@ func TestProcess(t *testing.T) { }, }, { - query: `set(attributes["test"], "pass") where trace_id == TraceID(0x01000000000000000000000000000000)`, + query: `set(attributes["test"], "pass") where dropped_attributes_count == 1`, want: func(td ptrace.Traces) { td.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).Attributes().InsertString("test", "pass") }, }, { - query: `set(attributes["test"], "pass") where span_id == SpanID(0x0100000000000000)`, + query: `set(attributes["test"], "pass") where dropped_events_count == 1`, want: func(td ptrace.Traces) { td.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).Attributes().InsertString("test", "pass") }, }, + { + query: `set(attributes["test"], "pass") where dropped_links_count == 1`, + want: func(td ptrace.Traces) { + td.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).Attributes().InsertString("test", "pass") + }, + }, + { + query: `set(attributes["test"], "pass") where span_id == SpanID(0x0102030405060708)`, + want: func(td ptrace.Traces) { + td.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).Attributes().InsertString("test", "pass") + }, + }, + { + query: `set(attributes["test"], "pass") where parent_span_id == SpanID(0x0807060504030201)`, + want: func(td ptrace.Traces) { + td.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).Attributes().InsertString("test", "pass") + }, + }, + { + query: `set(attributes["test"], "pass") where trace_id == TraceID(0x0102030405060708090a0b0c0d0e0f10)`, + want: func(td ptrace.Traces) { + td.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).Attributes().InsertString("test", "pass") + }, + }, + { + query: `set(attributes["test"], "pass") where trace_state == "new"`, + want: func(td ptrace.Traces) { + td.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).Attributes().InsertString("test", "pass") + }, + }, + { + query: `set(attributes["test"], "pass") where attributes["doesnt exist"] == nil`, + want: func(td ptrace.Traces) { + td.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(0).Attributes().InsertString("test", "pass") + td.ResourceSpans().At(0).ScopeSpans().At(0).Spans().At(1).Attributes().InsertString("test", "pass") + }, + }, } for _, tt := range tests { @@ -208,11 +245,15 @@ func constructTracesNum(num int) ptrace.Traces { func fillSpanOne(span ptrace.Span) { span.SetName("operationA") - span.SetSpanID(pcommon.NewSpanID([8]byte{1, 0, 0, 0, 0, 0, 0, 0})) - span.SetTraceID(pcommon.NewTraceID([16]byte{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0})) + span.SetSpanID(pcommon.NewSpanID(spanID)) + span.SetParentSpanID(pcommon.NewSpanID(spanID2)) + span.SetTraceID(pcommon.NewTraceID(traceID)) span.SetStartTimestamp(TestSpanStartTimestamp) span.SetEndTimestamp(TestSpanEndTimestamp) span.SetDroppedAttributesCount(1) + span.SetDroppedLinksCount(1) + span.SetDroppedEventsCount(1) + span.SetTraceState("new") span.Attributes().InsertString("http.method", "get") span.Attributes().InsertString("http.path", "/health") span.Attributes().InsertString("http.url", "http://localhost/health") diff --git a/processor/transformprocessor/internal/traces/traces.go b/processor/transformprocessor/internal/traces/traces.go index e890cf342820..8885c69b24ca 100644 --- a/processor/transformprocessor/internal/traces/traces.go +++ b/processor/transformprocessor/internal/traces/traces.go @@ -16,7 +16,6 @@ package traces // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor/internal/traces" import ( - "encoding/hex" "fmt" "time" @@ -222,10 +221,8 @@ func accessTraceID() pathGetSetter { return ctx.GetItem().(ptrace.Span).TraceID() }, setter: func(ctx common.TransformContext, val interface{}) { - if str, ok := val.(string); ok { - if traceID, err := common.ParseTraceID(str); err == nil { - ctx.GetItem().(ptrace.Span).SetTraceID(traceID) - } + if newTraceID, ok := val.(pcommon.TraceID); ok { + ctx.GetItem().(ptrace.Span).SetTraceID(newTraceID) } }, } @@ -237,10 +234,8 @@ func accessSpanID() pathGetSetter { return ctx.GetItem().(ptrace.Span).SpanID() }, setter: func(ctx common.TransformContext, val interface{}) { - if str, ok := val.(string); ok { - if spanID, err := common.ParseSpanID(str); err == nil { - ctx.GetItem().(ptrace.Span).SetSpanID(spanID) - } + if newSpanID, ok := val.(pcommon.SpanID); ok { + ctx.GetItem().(ptrace.Span).SetSpanID(newSpanID) } }, } @@ -249,7 +244,7 @@ func accessSpanID() pathGetSetter { func accessTraceState() pathGetSetter { return pathGetSetter{ getter: func(ctx common.TransformContext) interface{} { - return ctx.GetItem().(ptrace.Span).TraceState() + return (string)(ctx.GetItem().(ptrace.Span).TraceState()) }, setter: func(ctx common.TransformContext, val interface{}) { if str, ok := val.(string); ok { @@ -265,11 +260,8 @@ func accessParentSpanID() pathGetSetter { return ctx.GetItem().(ptrace.Span).ParentSpanID() }, setter: func(ctx common.TransformContext, val interface{}) { - if str, ok := val.(string); ok { - id, _ := hex.DecodeString(str) - var idArr [8]byte - copy(idArr[:8], id) - ctx.GetItem().(ptrace.Span).SetParentSpanID(pcommon.NewSpanID(idArr)) + if newParentSpanID, ok := val.(pcommon.SpanID); ok { + ctx.GetItem().(ptrace.Span).SetParentSpanID(newParentSpanID) } }, } @@ -355,7 +347,7 @@ func accessAttributesKey(mapKey *string) pathGetSetter { func accessDroppedAttributesCount() pathGetSetter { return pathGetSetter{ getter: func(ctx common.TransformContext) interface{} { - return ctx.GetItem().(ptrace.Span).DroppedAttributesCount() + return int64(ctx.GetItem().(ptrace.Span).DroppedAttributesCount()) }, setter: func(ctx common.TransformContext, val interface{}) { if i, ok := val.(int64); ok { @@ -384,7 +376,7 @@ func accessEvents() pathGetSetter { func accessDroppedEventsCount() pathGetSetter { return pathGetSetter{ getter: func(ctx common.TransformContext) interface{} { - return ctx.GetItem().(ptrace.Span).DroppedEventsCount() + return int64(ctx.GetItem().(ptrace.Span).DroppedEventsCount()) }, setter: func(ctx common.TransformContext, val interface{}) { if i, ok := val.(int64); ok { @@ -413,7 +405,7 @@ func accessLinks() pathGetSetter { func accessDroppedLinksCount() pathGetSetter { return pathGetSetter{ getter: func(ctx common.TransformContext) interface{} { - return ctx.GetItem().(ptrace.Span).DroppedLinksCount() + return int64(ctx.GetItem().(ptrace.Span).DroppedLinksCount()) }, setter: func(ctx common.TransformContext, val interface{}) { if i, ok := val.(int64); ok { diff --git a/processor/transformprocessor/internal/traces/traces_test.go b/processor/transformprocessor/internal/traces/traces_test.go index b5046469f488..671b824b656b 100644 --- a/processor/transformprocessor/internal/traces/traces_test.go +++ b/processor/transformprocessor/internal/traces/traces_test.go @@ -15,7 +15,6 @@ package traces import ( - "encoding/hex" "testing" "time" @@ -79,7 +78,7 @@ func Test_newPathGetSetter(t *testing.T) { }, }, orig: pcommon.NewTraceID(traceID), - new: hex.EncodeToString(traceID2[:]), + new: pcommon.NewTraceID(traceID2), modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource) { span.SetTraceID(pcommon.NewTraceID(traceID2)) }, @@ -92,7 +91,7 @@ func Test_newPathGetSetter(t *testing.T) { }, }, orig: pcommon.NewSpanID(spanID), - new: hex.EncodeToString(spanID2[:]), + new: pcommon.NewSpanID(spanID2), modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource) { span.SetSpanID(pcommon.NewSpanID(spanID2)) }, @@ -104,7 +103,7 @@ func Test_newPathGetSetter(t *testing.T) { Name: "trace_state", }, }, - orig: ptrace.TraceState("state"), + orig: "state", new: "newstate", modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource) { span.SetTraceState("newstate") @@ -118,7 +117,7 @@ func Test_newPathGetSetter(t *testing.T) { }, }, orig: pcommon.NewSpanID(spanID2), - new: hex.EncodeToString(spanID[:]), + new: pcommon.NewSpanID(spanID), modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource) { span.SetParentSpanID(pcommon.NewSpanID(spanID)) }, @@ -351,7 +350,7 @@ func Test_newPathGetSetter(t *testing.T) { Name: "dropped_attributes_count", }, }, - orig: uint32(10), + orig: int64(10), new: int64(20), modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource) { span.SetDroppedAttributesCount(20) @@ -380,7 +379,7 @@ func Test_newPathGetSetter(t *testing.T) { Name: "dropped_events_count", }, }, - orig: uint32(20), + orig: int64(20), new: int64(30), modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource) { span.SetDroppedEventsCount(30) @@ -409,7 +408,7 @@ func Test_newPathGetSetter(t *testing.T) { Name: "dropped_links_count", }, }, - orig: uint32(30), + orig: int64(30), new: int64(40), modified: func(span ptrace.Span, il pcommon.InstrumentationScope, resource pcommon.Resource) { span.SetDroppedLinksCount(40) diff --git a/receiver/activedirectorydsreceiver/go.mod b/receiver/activedirectorydsreceiver/go.mod index 9e7f3d375368..68fce9216a7a 100644 --- a/receiver/activedirectorydsreceiver/go.mod +++ b/receiver/activedirectorydsreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 ) diff --git a/receiver/activedirectorydsreceiver/go.sum b/receiver/activedirectorydsreceiver/go.sum index 27288b19085a..ca6fe6e56865 100644 --- a/receiver/activedirectorydsreceiver/go.sum +++ b/receiver/activedirectorydsreceiver/go.sum @@ -183,10 +183,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/aerospikereceiver/Makefile b/receiver/aerospikereceiver/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/receiver/aerospikereceiver/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/receiver/aerospikereceiver/README.md b/receiver/aerospikereceiver/README.md new file mode 100644 index 000000000000..eb5e8ddf3e42 --- /dev/null +++ b/receiver/aerospikereceiver/README.md @@ -0,0 +1,39 @@ +# Aerospike Receiver + +| Status | | +| ------------------------ | --------- | +| Stability | [alpha] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | + +The Aerospike receiver is designed to collect performance metrics from one or +more Aerospike nodes. It uses the +[official Go client](https://github.com/aerospike/aerospike-client-go/tree/v5/) +to connect and collect. + +Aerospike versions 4.9, 5.x, and 6.x are supported. + + +## Configuration + +Configuration parameters: + +- `endpoint` (default localhost:3000) +- `collect_cluster_metrics` (default false): Whether discovered peer nodes should be collected +- `collection_interval` (default = 60s): This receiver collects metrics on an interval. Valid time units are ns, us (or Β΅s), ms, s, m, h. +- `username` (Enterprise Edition only.) +- `password` (Enterprise Edition only.) + +### Example Configuration + +```yaml +receivers: + aerospike: + endpoint: localhost:9000 + collect_cluster_metrics: false + collection_interval: 30s +``` + +## Metrics + +Details about the metrics produced by this receiver can be found in [metadata.yaml](./metadata.yaml) diff --git a/receiver/aerospikereceiver/client.go b/receiver/aerospikereceiver/client.go new file mode 100644 index 000000000000..2b999dbe4692 --- /dev/null +++ b/receiver/aerospikereceiver/client.go @@ -0,0 +1,158 @@ +// 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 aerospikereceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver" + +import ( + "fmt" + "strings" + "time" + + as "github.com/aerospike/aerospike-client-go/v5" + "github.com/aerospike/aerospike-client-go/v5/types" + "go.uber.org/zap" +) + +type defaultASClient struct { + conn *as.Connection // open connection to Aerospike + policy *as.ClientPolicy // Timeout and authentication information + logger *zap.Logger // logs malformed metrics in responses +} + +// aerospike is the interface that provides information about a given node +type aerospike interface { + // NamespaceInfo gets information about a specific namespace + NamespaceInfo(namespace string) (map[string]string, error) + // Info gets high-level information about the node/system. + Info() (map[string]string, error) + // Close closes the connection to the Aerospike node + Close() +} + +// newASClient creates a new defaultASClient connected to the given host and port. +// If username and password aren't blank, they're used to authenticate +func newASClient(host string, port int, username, password string, timeout time.Duration, logger *zap.Logger) (*defaultASClient, error) { + authEnabled := username != "" && password != "" + + policy := as.NewClientPolicy() + policy.Timeout = timeout + if authEnabled { + policy.User = username + policy.Password = password + } + + conn, err := as.NewConnection(policy, as.NewHost(host, port)) + if err != nil { + return nil, err + } + + if authEnabled { + if err := conn.Login(policy); err != nil { + return nil, err + } + } + + return &defaultASClient{ + conn: conn, + logger: logger, + policy: policy, + }, nil +} + +func (c *defaultASClient) NamespaceInfo(namespace string) (map[string]string, error) { + if err := c.conn.SetTimeout(time.Now().Add(c.policy.Timeout), c.policy.Timeout); err != nil { + return nil, fmt.Errorf("failed to set timeout: %w", err) + } + namespaceKey := "namespace/" + namespace + response, err := c.conn.RequestInfo(namespaceKey) + + // Try to login and get a new session + if err != nil && err.Matches(types.EXPIRED_SESSION) { + if loginErr := c.conn.Login(c.policy); loginErr != nil { + return nil, loginErr + } + } + + if err != nil { + return nil, err + } + + info := make(map[string]string) + for k, v := range response { + if k == namespaceKey { + for _, pair := range splitFields(v) { + parts := splitPair(pair) + if len(parts) != 2 { + c.logger.Warn(fmt.Sprintf("metric pair '%s' not in key=value format", pair)) + continue + } + info[parts[0]] = parts[1] + + } + + } + } + return info, nil +} + +func (c *defaultASClient) Info() (map[string]string, error) { + if err := c.conn.SetTimeout(time.Now().Add(c.policy.Timeout), c.policy.Timeout); err != nil { + return nil, fmt.Errorf("failed to set timeout: %w", err) + } + + response, err := c.conn.RequestInfo("namespaces", "node", "statistics", "services") + + // Try to login and get a new session + if err != nil && err.Matches(types.EXPIRED_SESSION) { + if loginErr := c.conn.Login(c.policy); loginErr != nil { + return nil, loginErr + } + } + + if err != nil { + return nil, err + } + info := make(map[string]string) + for k, v := range response { + switch k { + case "statistics": + for _, pair := range splitFields(v) { + parts := splitPair(pair) + if len(parts) != 2 { + c.logger.Warn(fmt.Sprintf("metric pair '%s' not in key=value format", pair)) + continue + } + info[parts[0]] = parts[1] + + } + case "node": + info[k] = v + } + } + return info, nil +} + +func (c *defaultASClient) Close() { + c.conn.Close() +} + +// splitPair splits a metric pair in the format of 'key=value' +func splitPair(pair string) []string { + return strings.Split(pair, "=") +} + +// splitFields splits a string of metric pairs delimited with the ';' character +func splitFields(info string) []string { + return strings.Split(info, ";") +} diff --git a/receiver/aerospikereceiver/config.go b/receiver/aerospikereceiver/config.go new file mode 100644 index 000000000000..8edb944a7d03 --- /dev/null +++ b/receiver/aerospikereceiver/config.go @@ -0,0 +1,88 @@ +// 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 aerospikereceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver" + +import ( + "errors" + "fmt" + "net" + "strconv" + "time" + + "go.opentelemetry.io/collector/receiver/scraperhelper" + "go.uber.org/multierr" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver/internal/metadata" +) + +var ( + errBadEndpoint = errors.New("endpoint must be specified as host:port") + errBadPort = errors.New("invalid port in endpoint") + errEmptyEndpoint = errors.New("endpoint must be specified") + errEmptyPassword = errors.New("password must be set if username is set") + errEmptyUsername = errors.New("username must be set if password is set") + errNegativeTimeout = errors.New("timeout must be non-negative") +) + +// Config is the receiver configuration +type Config struct { + scraperhelper.ScraperControllerSettings `mapstructure:",squash"` + Endpoint string `mapstructure:"endpoint"` + Username string `mapstructure:"username"` + Password string `mapstructure:"password"` + CollectClusterMetrics bool `mapstructure:"collect_cluster_metrics"` + Timeout time.Duration `mapstructure:"timeout"` + Metrics metadata.MetricsSettings `mapstructure:"metrics"` +} + +// Validate validates the values of the given Config, and returns an error if validation fails +func (c *Config) Validate() error { + var allErrs error + + if c.Endpoint == "" { + return multierr.Append(allErrs, errEmptyEndpoint) + } + + host, portStr, err := net.SplitHostPort(c.Endpoint) + if err != nil { + return multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadEndpoint, err)) + } + + if host == "" { + allErrs = multierr.Append(allErrs, errBadEndpoint) + } + + port, err := strconv.ParseInt(portStr, 10, 32) + if err != nil { + allErrs = multierr.Append(allErrs, fmt.Errorf("%w: %s", errBadPort, err)) + } + + if port < 0 || port > 65535 { + allErrs = multierr.Append(allErrs, fmt.Errorf("%w: %d", errBadPort, port)) + } + + if c.Username != "" && c.Password == "" { + allErrs = multierr.Append(allErrs, errEmptyPassword) + } + + if c.Password != "" && c.Username == "" { + allErrs = multierr.Append(allErrs, errEmptyUsername) + } + if c.Timeout.Milliseconds() < 0 { + allErrs = multierr.Append(allErrs, fmt.Errorf("%w: must be positive", errNegativeTimeout)) + } + + return allErrs +} diff --git a/receiver/aerospikereceiver/config_test.go b/receiver/aerospikereceiver/config_test.go new file mode 100644 index 000000000000..c0f9bd1fb09c --- /dev/null +++ b/receiver/aerospikereceiver/config_test.go @@ -0,0 +1,98 @@ +// 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 aerospikereceiver + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" +) + +func TestValidate(t *testing.T) { + testCases := []struct { + name string + config *Config + expected error + }{ + { + name: "blank endpoint", + config: &Config{ + Endpoint: "", + }, + expected: errEmptyEndpoint, + }, + { + name: "missing port", + config: &Config{ + Endpoint: "localhost", + }, + expected: errBadEndpoint, + }, + { + name: "missing host", + config: &Config{ + Endpoint: ":3001", + }, + expected: errBadEndpoint, + }, + { + name: "negative port", + config: &Config{ + Endpoint: "localhost:-2", + }, + expected: errBadPort, + }, + { + name: "bad port", + config: &Config{ + Endpoint: "localhost:2.02", + }, + expected: errBadPort, + }, + { + name: "negative timeout", + config: &Config{ + Endpoint: "localhost:3001", + Timeout: -1 * time.Second, + }, + expected: errNegativeTimeout, + }, + { + name: "password but no username", + config: &Config{ + Endpoint: "localhost:3001", + Username: "", + Password: "secret", + }, + expected: errEmptyUsername, + }, + { + name: "username but no password", + config: &Config{ + Endpoint: "localhost:3001", + Username: "ro_user", + }, + expected: errEmptyPassword, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.config.Validate() + require.ErrorIs(t, err, tc.expected) + }) + } +} diff --git a/receiver/aerospikereceiver/documentation.md b/receiver/aerospikereceiver/documentation.md new file mode 100644 index 000000000000..d160800a3763 --- /dev/null +++ b/receiver/aerospikereceiver/documentation.md @@ -0,0 +1,46 @@ +[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) + +# aerospikereceiver + +## Metrics + +These are the metrics available for this scraper. + +| Name | Description | Unit | Type | Attributes | +| ---- | ----------- | ---- | ---- | ---------- | +| **aeropsike.namespace.transaction.count** | Number of transactions performed on the namespace Aggregate of Aerospike Metrics client_delete_error, client_delete_filtered_out, client_delete_not_found, client_delete_success, client_delete_timeout, client_read_error, client_read_filtered_out, client_read_not_found, client_read_success, client_read_timeout, client_udf_error, client_udf_filtered_out, client_udf_not_found, client_udf_success, client_udf_timeout, client_write_error, client_write_filtered_out, client_write_not_found, client_write_success, client_write_timeout | {transactions} | Sum(Int) |
  • transaction_type
  • transaction_result
| +| **aerospike.namespace.disk.available** | Minimum percentage of contiguous disk space free to the namespace across all devices | % | Gauge(Int) |
| +| **aerospike.namespace.memory.free** | Percentage of the namespace's memory which is still free Aerospike metric memory_free_pct | % | Gauge(Int) |
| +| **aerospike.namespace.memory.usage** | Memory currently used by each component of the namespace Aggregate of Aerospike Metrics memory_used_data_bytes, memory_used_index_bytes, memory_used_set_index_bytes, memory_used_sindex_bytes | By | Sum(Int) |
  • namespace_component
| +| **aerospike.namespace.scan.count** | Number of scan operations performed on the namespace Aggregate of Aerospike Metrics scan_aggr_abort, scan_aggr_complete, scan_aggr_error, scan_basic_abort, scan_basic_complete, scan_basic_error, scan_ops_bg_abort, scan_ops_bg_complete, scan_ops_bg_error, scan_udf_bg_abort, scan_udf_bg_complete, scan_udf_bg_error | {scans} | Sum(Int) |
  • scan_type
  • scan_result
| +| **aerospike.node.connection.count** | Number of connections opened and closed to the node Aggregate of Aerospike Metrics client_connections_closed, client_connections_opened, fabric_connections_closed, fabric_connections_opened, heartbeat_connections_closed, heartbeat_connections_opened | {connections} | Sum(Int) |
  • connection_type
  • connection_op
| +| **aerospike.node.connection.open** | Current number of open connections to the node Aggregate of Aerospike Metrics client_connections, fabric_connections, heartbeat_connections | {connections} | Sum(Int) |
  • connection_type
| +| **aerospike.node.memory.free** | Percentage of the node's memory which is still free Aerospike Metric system_free_mem_pct | % | Gauge(Int) |
| + +**Highlighted metrics** are emitted by default. Other metrics are optional and not emitted by default. +Any metric can be enabled or disabled with the following scraper configuration: + +```yaml +metrics: + : + enabled: +``` + +## Resource attributes + +| Name | Description | Type | +| ---- | ----------- | ---- | +| aerospike.namespace | Name of the Aerospike namespace | String | +| aerospike.node.name | Name of the Aerospike node collected from | String | + +## Metric attributes + +| Name | Description | Values | +| ---- | ----------- | ------ | +| connection_op (operation) | Operation performed with a connection (open or close) | close, open | +| connection_type (type) | Type of connection to an Aerospike node | client, fabric, heartbeat | +| namespace_component (component) | Individual component of a namespace | data, index, set_index, secondary_index | +| scan_result (result) | Result of a scan operation performed on a namespace | abort, complete, error | +| scan_type (type) | Type of scan operation performed on a namespace | aggregation, basic, ops_background, udf_background | +| transaction_result (result) | Result of a transaction performed on a namespace | error, filtered_out, not_found, success, timeout | +| transaction_type (type) | Type of transaction performed on a namespace | delete, read, udf, write | diff --git a/receiver/aerospikereceiver/factory.go b/receiver/aerospikereceiver/factory.go new file mode 100644 index 000000000000..ee170e828026 --- /dev/null +++ b/receiver/aerospikereceiver/factory.go @@ -0,0 +1,80 @@ +// 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 aerospikereceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver" + +import ( + "context" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/receiver/scraperhelper" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver/internal/metadata" +) + +const ( + typeStr = "aerospike" + defaultEndpoint = "localhost:3000" + defaultTimeout = 20 * time.Second + defaultCollectClusterMetrics = false +) + +// NewFactory creates a new ReceiverFactory with default configuration +func NewFactory() component.ReceiverFactory { + return component.NewReceiverFactory( + typeStr, + createDefaultConfig, + component.WithMetricsReceiver(createMetricsReceiver), + ) +} + +// createMetricsReceiver creates a new MetricsReceiver using scraperhelper +func createMetricsReceiver( + _ context.Context, + params component.ReceiverCreateSettings, + rConf config.Receiver, + consumer consumer.Metrics, +) (component.MetricsReceiver, error) { + cfg := rConf.(*Config) + receiver, err := newAerospikeReceiver(params, cfg, consumer) + if err != nil { + return nil, err + } + + scraper, err := scraperhelper.NewScraper(typeStr, receiver.scrape) + if err != nil { + return nil, err + } + + return scraperhelper.NewScraperControllerReceiver( + &cfg.ScraperControllerSettings, params, consumer, + scraperhelper.AddScraper(scraper), + ) +} + +func createDefaultConfig() config.Receiver { + return &Config{ + ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ + ReceiverSettings: config.NewReceiverSettings(config.NewComponentID(typeStr)), + CollectionInterval: time.Minute, + }, + Endpoint: defaultEndpoint, + Timeout: defaultTimeout, + CollectClusterMetrics: defaultCollectClusterMetrics, + Metrics: metadata.DefaultMetricsSettings(), + } +} diff --git a/receiver/aerospikereceiver/factory_test.go b/receiver/aerospikereceiver/factory_test.go new file mode 100644 index 000000000000..ee623e06e4db --- /dev/null +++ b/receiver/aerospikereceiver/factory_test.go @@ -0,0 +1,32 @@ +// 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 aerospikereceiver_test + +import ( + "testing" + "time" + + "github.com/stretchr/testify/require" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver" +) + +func TestNewFactory(t *testing.T) { + factory := aerospikereceiver.NewFactory() + require.Equal(t, "aerospike", string(factory.Type())) + cfg := factory.CreateDefaultConfig().(*aerospikereceiver.Config) + require.Equal(t, time.Minute, cfg.CollectionInterval) + require.False(t, cfg.CollectClusterMetrics) +} diff --git a/receiver/aerospikereceiver/go.mod b/receiver/aerospikereceiver/go.mod new file mode 100644 index 000000000000..27c7e3c72473 --- /dev/null +++ b/receiver/aerospikereceiver/go.mod @@ -0,0 +1,58 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver + +go 1.17 + +require ( + github.com/aerospike/aerospike-client-go/v5 v5.8.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.53.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 + github.com/stretchr/testify v1.7.2 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.uber.org/multierr v1.8.0 + go.uber.org/zap v1.21.0 +) + +require ( + github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect + github.com/Microsoft/go-winio v0.5.1 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/docker/distribution v2.8.0-beta.1+incompatible // indirect + github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.4.0 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.2 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/knadh/koanf v1.4.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/pelletier/go-toml v1.8.1 // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rogpeppe/go-internal v1.8.1 // indirect + github.com/sirupsen/logrus v1.8.1 // indirect + github.com/stretchr/objx v0.2.0 // indirect + github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da // indirect + go.opencensus.io v0.23.0 // indirect + go.opentelemetry.io/otel v1.7.0 // indirect + go.opentelemetry.io/otel/metric v0.30.0 // indirect + go.opentelemetry.io/otel/trace v1.7.0 // indirect + go.uber.org/atomic v1.9.0 // indirect + golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect + golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect + golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 // indirect + golang.org/x/text v0.3.7 // indirect + google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect + google.golang.org/grpc v1.47.0 // indirect + google.golang.org/protobuf v1.28.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest => ../../internal/scrapertest diff --git a/receiver/aerospikereceiver/go.sum b/receiver/aerospikereceiver/go.sum new file mode 100644 index 000000000000..1bf37172efba --- /dev/null +++ b/receiver/aerospikereceiver/go.sum @@ -0,0 +1,404 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= +github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/aerospike/aerospike-client-go/v5 v5.8.0 h1:EUV2wG80yIenQqOyUlf5NfyhagPIwoeL09MJIE+xILE= +github.com/aerospike/aerospike-client-go/v5 v5.8.0/go.mod h1:rJ/KpmClE7kiBPfvAPrGw9WuNOiz8v2uKbQaUyYPXtI= +github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= +github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.6.0/go.mod h1:gqlclDEZp4aqJOancXK6TN24aKhT0W0Ae9MHk3wzTMM= +github.com/aws/aws-sdk-go-v2/internal/ini v1.2.4/go.mod h1:ZcBrrI3zBKlhGFNYWvju0I3TR93I7YIgAfy82Fh4lcQ= +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/internal/presigned-url v1.3.2/go.mod h1:72HRZDLMtmVQiLG2tLfQcaWLCssELvGl+Zf2WVxMmR8= +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/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21TfrhJ8AEMzVybRNSb/b4g= +github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= +github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= +github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/docker/distribution v2.8.0-beta.1+incompatible h1:9MjVa+OTMHm4C0kKZB68jPlDM9Cg75ta4i46Gxxxn8o= +github.com/docker/distribution v2.8.0-beta.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= +github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= +github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= +github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= +github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= +github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= +github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= +github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= +github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= +github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-rootcerts v1.0.1/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= +github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoIospckxBxk6Q= +github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= +github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= +github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= +github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= +github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= +github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= +github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.15.0 h1:WjP/FQ/sk43MRmnEcT+MlDw2TFvkrXlprrPST/IudjU= +github.com/onsi/gomega v1.15.0/go.mod h1:cIuvLEne0aoVhAgh/O6ac0Op8WWw9H6eYCriF+tEHG0= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.53.0 h1:oXevH7WokAiZ7eWNl9RCJ7iRs5+mAccQwM2QOsTsQD4= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.53.0/go.mod h1:RRtJ08Mu0/rGsiHShFe5pJ0j5IIA4jBO5D2GEC5yVDE= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= +github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= +github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= +github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= +github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da h1:NimzV1aGyq29m5ukMK0AMWEhFaL/lrEOaephfuoiARg= +github.com/yuin/gopher-lua v0.0.0-20200816102855-ee81675732da/go.mod h1:E1AXubJBdNmFERAOucpDIxNzeGfLzg0mYh+UfMWdChA= +go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= +go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= +go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= +go.opentelemetry.io/otel/metric v0.30.0/go.mod h1:/ShZ7+TS4dHzDFmfi1kSXMhMVubNoP0oIaBp70J6UXU= +go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1B0= +go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o= +go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= +go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= +go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= +go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= +go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= +golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 h1:XDXtA5hveEEV8JB2l7nhMTp3t3cHp9ZpwcdjqyEWLlo= +golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.3/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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= +golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= +google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= +google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= +google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= +google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= +gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools/v3 v3.1.0 h1:rVV8Tcg/8jHUkPUorwjaMTtemIMVXfIPKiOqnhEhakk= +honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/receiver/aerospikereceiver/integration_test.go b/receiver/aerospikereceiver/integration_test.go new file mode 100644 index 000000000000..0322a93ab2ca --- /dev/null +++ b/receiver/aerospikereceiver/integration_test.go @@ -0,0 +1,64 @@ +// 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. + +//go:build integration +// +build integration + +package aerospikereceiver_test + +import ( + "context" + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer/consumertest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest/golden" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver" +) + +func TestAerospikeIntegration(t *testing.T) { + t.Parallel() + + ct := containertest.New(t) + container := ct.StartImage("aerospike:ce-5.7.0.17", containertest.WithPortReady(3000)) + + f := aerospikereceiver.NewFactory() + cfg := f.CreateDefaultConfig().(*aerospikereceiver.Config) + cfg.Endpoint = container.AddrForPort(3000) + cfg.ScraperControllerSettings.CollectionInterval = 100 * time.Millisecond + + consumer := new(consumertest.MetricsSink) + settings := componenttest.NewNopReceiverCreateSettings() + receiver, err := f.CreateMetricsReceiver(context.Background(), settings, cfg, consumer) + require.NoError(t, err, "failed creating metrics receiver") + require.NoError(t, receiver.Start(context.Background(), componenttest.NewNopHost()), "failed starting metrics receiver") + + require.Eventually(t, func() bool { + return consumer.DataPointCount() > 0 + }, 2*time.Minute, 1*time.Second, "failed to receive more than 0 metrics") + require.NoError(t, receiver.Shutdown(context.Background()), "failed shutting down metrics receiver") + + actualMetrics := consumer.AllMetrics()[0] + expectedFile := filepath.Join("testdata", "integration", "expected.json") + expectedMetrics, err := golden.ReadMetrics(expectedFile) + require.NoError(t, err, "failed reading expected metrics") + + require.NoError(t, scrapertest.CompareMetrics(expectedMetrics, actualMetrics, scrapertest.IgnoreMetricValues(), scrapertest.IgnoreResourceAttributeValue("node.name"))) +} diff --git a/receiver/aerospikereceiver/internal/metadata/generated_metrics_v2.go b/receiver/aerospikereceiver/internal/metadata/generated_metrics_v2.go new file mode 100644 index 000000000000..c51d192308ee --- /dev/null +++ b/receiver/aerospikereceiver/internal/metadata/generated_metrics_v2.go @@ -0,0 +1,923 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package metadata + +import ( + "fmt" + "strconv" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" +) + +// MetricSettings provides common settings for a particular metric. +type MetricSettings struct { + Enabled bool `mapstructure:"enabled"` +} + +// MetricsSettings provides settings for aerospikereceiver metrics. +type MetricsSettings struct { + AeropsikeNamespaceTransactionCount MetricSettings `mapstructure:"aeropsike.namespace.transaction.count"` + AerospikeNamespaceDiskAvailable MetricSettings `mapstructure:"aerospike.namespace.disk.available"` + AerospikeNamespaceMemoryFree MetricSettings `mapstructure:"aerospike.namespace.memory.free"` + AerospikeNamespaceMemoryUsage MetricSettings `mapstructure:"aerospike.namespace.memory.usage"` + AerospikeNamespaceScanCount MetricSettings `mapstructure:"aerospike.namespace.scan.count"` + AerospikeNodeConnectionCount MetricSettings `mapstructure:"aerospike.node.connection.count"` + AerospikeNodeConnectionOpen MetricSettings `mapstructure:"aerospike.node.connection.open"` + AerospikeNodeMemoryFree MetricSettings `mapstructure:"aerospike.node.memory.free"` +} + +func DefaultMetricsSettings() MetricsSettings { + return MetricsSettings{ + AeropsikeNamespaceTransactionCount: MetricSettings{ + Enabled: true, + }, + AerospikeNamespaceDiskAvailable: MetricSettings{ + Enabled: true, + }, + AerospikeNamespaceMemoryFree: MetricSettings{ + Enabled: true, + }, + AerospikeNamespaceMemoryUsage: MetricSettings{ + Enabled: true, + }, + AerospikeNamespaceScanCount: MetricSettings{ + Enabled: true, + }, + AerospikeNodeConnectionCount: MetricSettings{ + Enabled: true, + }, + AerospikeNodeConnectionOpen: MetricSettings{ + Enabled: true, + }, + AerospikeNodeMemoryFree: MetricSettings{ + Enabled: true, + }, + } +} + +// AttributeConnectionOp specifies the a value connection_op attribute. +type AttributeConnectionOp int + +const ( + _ AttributeConnectionOp = iota + AttributeConnectionOpClose + AttributeConnectionOpOpen +) + +// String returns the string representation of the AttributeConnectionOp. +func (av AttributeConnectionOp) String() string { + switch av { + case AttributeConnectionOpClose: + return "close" + case AttributeConnectionOpOpen: + return "open" + } + return "" +} + +// MapAttributeConnectionOp is a helper map of string to AttributeConnectionOp attribute value. +var MapAttributeConnectionOp = map[string]AttributeConnectionOp{ + "close": AttributeConnectionOpClose, + "open": AttributeConnectionOpOpen, +} + +// AttributeConnectionType specifies the a value connection_type attribute. +type AttributeConnectionType int + +const ( + _ AttributeConnectionType = iota + AttributeConnectionTypeClient + AttributeConnectionTypeFabric + AttributeConnectionTypeHeartbeat +) + +// String returns the string representation of the AttributeConnectionType. +func (av AttributeConnectionType) String() string { + switch av { + case AttributeConnectionTypeClient: + return "client" + case AttributeConnectionTypeFabric: + return "fabric" + case AttributeConnectionTypeHeartbeat: + return "heartbeat" + } + return "" +} + +// MapAttributeConnectionType is a helper map of string to AttributeConnectionType attribute value. +var MapAttributeConnectionType = map[string]AttributeConnectionType{ + "client": AttributeConnectionTypeClient, + "fabric": AttributeConnectionTypeFabric, + "heartbeat": AttributeConnectionTypeHeartbeat, +} + +// AttributeNamespaceComponent specifies the a value namespace_component attribute. +type AttributeNamespaceComponent int + +const ( + _ AttributeNamespaceComponent = iota + AttributeNamespaceComponentData + AttributeNamespaceComponentIndex + AttributeNamespaceComponentSetIndex + AttributeNamespaceComponentSecondaryIndex +) + +// String returns the string representation of the AttributeNamespaceComponent. +func (av AttributeNamespaceComponent) String() string { + switch av { + case AttributeNamespaceComponentData: + return "data" + case AttributeNamespaceComponentIndex: + return "index" + case AttributeNamespaceComponentSetIndex: + return "set_index" + case AttributeNamespaceComponentSecondaryIndex: + return "secondary_index" + } + return "" +} + +// MapAttributeNamespaceComponent is a helper map of string to AttributeNamespaceComponent attribute value. +var MapAttributeNamespaceComponent = map[string]AttributeNamespaceComponent{ + "data": AttributeNamespaceComponentData, + "index": AttributeNamespaceComponentIndex, + "set_index": AttributeNamespaceComponentSetIndex, + "secondary_index": AttributeNamespaceComponentSecondaryIndex, +} + +// AttributeScanResult specifies the a value scan_result attribute. +type AttributeScanResult int + +const ( + _ AttributeScanResult = iota + AttributeScanResultAbort + AttributeScanResultComplete + AttributeScanResultError +) + +// String returns the string representation of the AttributeScanResult. +func (av AttributeScanResult) String() string { + switch av { + case AttributeScanResultAbort: + return "abort" + case AttributeScanResultComplete: + return "complete" + case AttributeScanResultError: + return "error" + } + return "" +} + +// MapAttributeScanResult is a helper map of string to AttributeScanResult attribute value. +var MapAttributeScanResult = map[string]AttributeScanResult{ + "abort": AttributeScanResultAbort, + "complete": AttributeScanResultComplete, + "error": AttributeScanResultError, +} + +// AttributeScanType specifies the a value scan_type attribute. +type AttributeScanType int + +const ( + _ AttributeScanType = iota + AttributeScanTypeAggregation + AttributeScanTypeBasic + AttributeScanTypeOpsBackground + AttributeScanTypeUdfBackground +) + +// String returns the string representation of the AttributeScanType. +func (av AttributeScanType) String() string { + switch av { + case AttributeScanTypeAggregation: + return "aggregation" + case AttributeScanTypeBasic: + return "basic" + case AttributeScanTypeOpsBackground: + return "ops_background" + case AttributeScanTypeUdfBackground: + return "udf_background" + } + return "" +} + +// MapAttributeScanType is a helper map of string to AttributeScanType attribute value. +var MapAttributeScanType = map[string]AttributeScanType{ + "aggregation": AttributeScanTypeAggregation, + "basic": AttributeScanTypeBasic, + "ops_background": AttributeScanTypeOpsBackground, + "udf_background": AttributeScanTypeUdfBackground, +} + +// AttributeTransactionResult specifies the a value transaction_result attribute. +type AttributeTransactionResult int + +const ( + _ AttributeTransactionResult = iota + AttributeTransactionResultError + AttributeTransactionResultFilteredOut + AttributeTransactionResultNotFound + AttributeTransactionResultSuccess + AttributeTransactionResultTimeout +) + +// String returns the string representation of the AttributeTransactionResult. +func (av AttributeTransactionResult) String() string { + switch av { + case AttributeTransactionResultError: + return "error" + case AttributeTransactionResultFilteredOut: + return "filtered_out" + case AttributeTransactionResultNotFound: + return "not_found" + case AttributeTransactionResultSuccess: + return "success" + case AttributeTransactionResultTimeout: + return "timeout" + } + return "" +} + +// MapAttributeTransactionResult is a helper map of string to AttributeTransactionResult attribute value. +var MapAttributeTransactionResult = map[string]AttributeTransactionResult{ + "error": AttributeTransactionResultError, + "filtered_out": AttributeTransactionResultFilteredOut, + "not_found": AttributeTransactionResultNotFound, + "success": AttributeTransactionResultSuccess, + "timeout": AttributeTransactionResultTimeout, +} + +// AttributeTransactionType specifies the a value transaction_type attribute. +type AttributeTransactionType int + +const ( + _ AttributeTransactionType = iota + AttributeTransactionTypeDelete + AttributeTransactionTypeRead + AttributeTransactionTypeUdf + AttributeTransactionTypeWrite +) + +// String returns the string representation of the AttributeTransactionType. +func (av AttributeTransactionType) String() string { + switch av { + case AttributeTransactionTypeDelete: + return "delete" + case AttributeTransactionTypeRead: + return "read" + case AttributeTransactionTypeUdf: + return "udf" + case AttributeTransactionTypeWrite: + return "write" + } + return "" +} + +// MapAttributeTransactionType is a helper map of string to AttributeTransactionType attribute value. +var MapAttributeTransactionType = map[string]AttributeTransactionType{ + "delete": AttributeTransactionTypeDelete, + "read": AttributeTransactionTypeRead, + "udf": AttributeTransactionTypeUdf, + "write": AttributeTransactionTypeWrite, +} + +type metricAeropsikeNamespaceTransactionCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills aeropsike.namespace.transaction.count metric with initial data. +func (m *metricAeropsikeNamespaceTransactionCount) init() { + m.data.SetName("aeropsike.namespace.transaction.count") + m.data.SetDescription("Number of transactions performed on the namespace") + m.data.SetUnit("{transactions}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricAeropsikeNamespaceTransactionCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, transactionTypeAttributeValue string, transactionResultAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("type", pcommon.NewValueString(transactionTypeAttributeValue)) + dp.Attributes().Insert("result", pcommon.NewValueString(transactionResultAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricAeropsikeNamespaceTransactionCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricAeropsikeNamespaceTransactionCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricAeropsikeNamespaceTransactionCount(settings MetricSettings) metricAeropsikeNamespaceTransactionCount { + m := metricAeropsikeNamespaceTransactionCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricAerospikeNamespaceDiskAvailable struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills aerospike.namespace.disk.available metric with initial data. +func (m *metricAerospikeNamespaceDiskAvailable) init() { + m.data.SetName("aerospike.namespace.disk.available") + m.data.SetDescription("Minimum percentage of contiguous disk space free to the namespace across all devices") + m.data.SetUnit("%") + m.data.SetDataType(pmetric.MetricDataTypeGauge) +} + +func (m *metricAerospikeNamespaceDiskAvailable) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricAerospikeNamespaceDiskAvailable) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricAerospikeNamespaceDiskAvailable) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricAerospikeNamespaceDiskAvailable(settings MetricSettings) metricAerospikeNamespaceDiskAvailable { + m := metricAerospikeNamespaceDiskAvailable{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricAerospikeNamespaceMemoryFree struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills aerospike.namespace.memory.free metric with initial data. +func (m *metricAerospikeNamespaceMemoryFree) init() { + m.data.SetName("aerospike.namespace.memory.free") + m.data.SetDescription("Percentage of the namespace's memory which is still free") + m.data.SetUnit("%") + m.data.SetDataType(pmetric.MetricDataTypeGauge) +} + +func (m *metricAerospikeNamespaceMemoryFree) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricAerospikeNamespaceMemoryFree) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricAerospikeNamespaceMemoryFree) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricAerospikeNamespaceMemoryFree(settings MetricSettings) metricAerospikeNamespaceMemoryFree { + m := metricAerospikeNamespaceMemoryFree{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricAerospikeNamespaceMemoryUsage struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills aerospike.namespace.memory.usage metric with initial data. +func (m *metricAerospikeNamespaceMemoryUsage) init() { + m.data.SetName("aerospike.namespace.memory.usage") + m.data.SetDescription("Memory currently used by each component of the namespace") + m.data.SetUnit("By") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricAerospikeNamespaceMemoryUsage) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, namespaceComponentAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("component", pcommon.NewValueString(namespaceComponentAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricAerospikeNamespaceMemoryUsage) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricAerospikeNamespaceMemoryUsage) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricAerospikeNamespaceMemoryUsage(settings MetricSettings) metricAerospikeNamespaceMemoryUsage { + m := metricAerospikeNamespaceMemoryUsage{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricAerospikeNamespaceScanCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills aerospike.namespace.scan.count metric with initial data. +func (m *metricAerospikeNamespaceScanCount) init() { + m.data.SetName("aerospike.namespace.scan.count") + m.data.SetDescription("Number of scan operations performed on the namespace") + m.data.SetUnit("{scans}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricAerospikeNamespaceScanCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, scanTypeAttributeValue string, scanResultAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("type", pcommon.NewValueString(scanTypeAttributeValue)) + dp.Attributes().Insert("result", pcommon.NewValueString(scanResultAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricAerospikeNamespaceScanCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricAerospikeNamespaceScanCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricAerospikeNamespaceScanCount(settings MetricSettings) metricAerospikeNamespaceScanCount { + m := metricAerospikeNamespaceScanCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricAerospikeNodeConnectionCount struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills aerospike.node.connection.count metric with initial data. +func (m *metricAerospikeNodeConnectionCount) init() { + m.data.SetName("aerospike.node.connection.count") + m.data.SetDescription("Number of connections opened and closed to the node") + m.data.SetUnit("{connections}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(true) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricAerospikeNodeConnectionCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, connectionTypeAttributeValue string, connectionOpAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("type", pcommon.NewValueString(connectionTypeAttributeValue)) + dp.Attributes().Insert("operation", pcommon.NewValueString(connectionOpAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricAerospikeNodeConnectionCount) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricAerospikeNodeConnectionCount) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricAerospikeNodeConnectionCount(settings MetricSettings) metricAerospikeNodeConnectionCount { + m := metricAerospikeNodeConnectionCount{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricAerospikeNodeConnectionOpen struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills aerospike.node.connection.open metric with initial data. +func (m *metricAerospikeNodeConnectionOpen) init() { + m.data.SetName("aerospike.node.connection.open") + m.data.SetDescription("Current number of open connections to the node") + m.data.SetUnit("{connections}") + m.data.SetDataType(pmetric.MetricDataTypeSum) + m.data.Sum().SetIsMonotonic(false) + m.data.Sum().SetAggregationTemporality(pmetric.MetricAggregationTemporalityCumulative) + m.data.Sum().DataPoints().EnsureCapacity(m.capacity) +} + +func (m *metricAerospikeNodeConnectionOpen) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, connectionTypeAttributeValue string) { + if !m.settings.Enabled { + return + } + dp := m.data.Sum().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) + dp.Attributes().Insert("type", pcommon.NewValueString(connectionTypeAttributeValue)) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricAerospikeNodeConnectionOpen) updateCapacity() { + if m.data.Sum().DataPoints().Len() > m.capacity { + m.capacity = m.data.Sum().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricAerospikeNodeConnectionOpen) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Sum().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricAerospikeNodeConnectionOpen(settings MetricSettings) metricAerospikeNodeConnectionOpen { + m := metricAerospikeNodeConnectionOpen{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +type metricAerospikeNodeMemoryFree struct { + data pmetric.Metric // data buffer for generated metric. + settings MetricSettings // metric settings provided by user. + capacity int // max observed number of data points added to the metric. +} + +// init fills aerospike.node.memory.free metric with initial data. +func (m *metricAerospikeNodeMemoryFree) init() { + m.data.SetName("aerospike.node.memory.free") + m.data.SetDescription("Percentage of the node's memory which is still free") + m.data.SetUnit("%") + m.data.SetDataType(pmetric.MetricDataTypeGauge) +} + +func (m *metricAerospikeNodeMemoryFree) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64) { + if !m.settings.Enabled { + return + } + dp := m.data.Gauge().DataPoints().AppendEmpty() + dp.SetStartTimestamp(start) + dp.SetTimestamp(ts) + dp.SetIntVal(val) +} + +// updateCapacity saves max length of data point slices that will be used for the slice capacity. +func (m *metricAerospikeNodeMemoryFree) updateCapacity() { + if m.data.Gauge().DataPoints().Len() > m.capacity { + m.capacity = m.data.Gauge().DataPoints().Len() + } +} + +// emit appends recorded metric data to a metrics slice and prepares it for recording another set of data points. +func (m *metricAerospikeNodeMemoryFree) emit(metrics pmetric.MetricSlice) { + if m.settings.Enabled && m.data.Gauge().DataPoints().Len() > 0 { + m.updateCapacity() + m.data.MoveTo(metrics.AppendEmpty()) + m.init() + } +} + +func newMetricAerospikeNodeMemoryFree(settings MetricSettings) metricAerospikeNodeMemoryFree { + m := metricAerospikeNodeMemoryFree{settings: settings} + if settings.Enabled { + m.data = pmetric.NewMetric() + m.init() + } + return m +} + +// MetricsBuilder provides an interface for scrapers to report metrics while taking care of all the transformations +// required to produce metric representation defined in metadata and user settings. +type MetricsBuilder struct { + startTime pcommon.Timestamp // start time that will be applied to all recorded data points. + metricsCapacity int // maximum observed number of metrics per resource. + resourceCapacity int // maximum observed number of resource attributes. + metricsBuffer pmetric.Metrics // accumulates metrics data before emitting. + buildInfo component.BuildInfo // contains version information + metricAeropsikeNamespaceTransactionCount metricAeropsikeNamespaceTransactionCount + metricAerospikeNamespaceDiskAvailable metricAerospikeNamespaceDiskAvailable + metricAerospikeNamespaceMemoryFree metricAerospikeNamespaceMemoryFree + metricAerospikeNamespaceMemoryUsage metricAerospikeNamespaceMemoryUsage + metricAerospikeNamespaceScanCount metricAerospikeNamespaceScanCount + metricAerospikeNodeConnectionCount metricAerospikeNodeConnectionCount + metricAerospikeNodeConnectionOpen metricAerospikeNodeConnectionOpen + metricAerospikeNodeMemoryFree metricAerospikeNodeMemoryFree +} + +// metricBuilderOption applies changes to default metrics builder. +type metricBuilderOption func(*MetricsBuilder) + +// WithStartTime sets startTime on the metrics builder. +func WithStartTime(startTime pcommon.Timestamp) metricBuilderOption { + return func(mb *MetricsBuilder) { + mb.startTime = startTime + } +} + +func NewMetricsBuilder(settings MetricsSettings, buildInfo component.BuildInfo, options ...metricBuilderOption) *MetricsBuilder { + mb := &MetricsBuilder{ + startTime: pcommon.NewTimestampFromTime(time.Now()), + metricsBuffer: pmetric.NewMetrics(), + buildInfo: buildInfo, + metricAeropsikeNamespaceTransactionCount: newMetricAeropsikeNamespaceTransactionCount(settings.AeropsikeNamespaceTransactionCount), + metricAerospikeNamespaceDiskAvailable: newMetricAerospikeNamespaceDiskAvailable(settings.AerospikeNamespaceDiskAvailable), + metricAerospikeNamespaceMemoryFree: newMetricAerospikeNamespaceMemoryFree(settings.AerospikeNamespaceMemoryFree), + metricAerospikeNamespaceMemoryUsage: newMetricAerospikeNamespaceMemoryUsage(settings.AerospikeNamespaceMemoryUsage), + metricAerospikeNamespaceScanCount: newMetricAerospikeNamespaceScanCount(settings.AerospikeNamespaceScanCount), + metricAerospikeNodeConnectionCount: newMetricAerospikeNodeConnectionCount(settings.AerospikeNodeConnectionCount), + metricAerospikeNodeConnectionOpen: newMetricAerospikeNodeConnectionOpen(settings.AerospikeNodeConnectionOpen), + metricAerospikeNodeMemoryFree: newMetricAerospikeNodeMemoryFree(settings.AerospikeNodeMemoryFree), + } + for _, op := range options { + op(mb) + } + return mb +} + +// updateCapacity updates max length of metrics and resource attributes that will be used for the slice capacity. +func (mb *MetricsBuilder) updateCapacity(rm pmetric.ResourceMetrics) { + if mb.metricsCapacity < rm.ScopeMetrics().At(0).Metrics().Len() { + mb.metricsCapacity = rm.ScopeMetrics().At(0).Metrics().Len() + } + if mb.resourceCapacity < rm.Resource().Attributes().Len() { + mb.resourceCapacity = rm.Resource().Attributes().Len() + } +} + +// ResourceMetricsOption applies changes to provided resource metrics. +type ResourceMetricsOption func(pmetric.ResourceMetrics) + +// WithAerospikeNamespace sets provided value as "aerospike.namespace" attribute for current resource. +func WithAerospikeNamespace(val string) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + rm.Resource().Attributes().UpsertString("aerospike.namespace", val) + } +} + +// WithAerospikeNodeName sets provided value as "aerospike.node.name" attribute for current resource. +func WithAerospikeNodeName(val string) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + rm.Resource().Attributes().UpsertString("aerospike.node.name", val) + } +} + +// WithStartTimeOverride overrides start time for all the resource metrics data points. +// This option should be only used if different start time has to be set on metrics coming from different resources. +func WithStartTimeOverride(start pcommon.Timestamp) ResourceMetricsOption { + return func(rm pmetric.ResourceMetrics) { + var dps pmetric.NumberDataPointSlice + metrics := rm.ScopeMetrics().At(0).Metrics() + for i := 0; i < metrics.Len(); i++ { + switch metrics.At(i).DataType() { + case pmetric.MetricDataTypeGauge: + dps = metrics.At(i).Gauge().DataPoints() + case pmetric.MetricDataTypeSum: + dps = metrics.At(i).Sum().DataPoints() + } + for j := 0; j < dps.Len(); j++ { + dps.At(j).SetStartTimestamp(start) + } + } + } +} + +// EmitForResource saves all the generated metrics under a new resource and updates the internal state to be ready for +// recording another set of data points as part of another resource. This function can be helpful when one scraper +// needs to emit metrics from several resources. Otherwise calling this function is not required, +// just `Emit` function can be called instead. +// Resource attributes should be provided as ResourceMetricsOption arguments. +func (mb *MetricsBuilder) EmitForResource(rmo ...ResourceMetricsOption) { + rm := pmetric.NewResourceMetrics() + rm.Resource().Attributes().EnsureCapacity(mb.resourceCapacity) + ils := rm.ScopeMetrics().AppendEmpty() + ils.Scope().SetName("otelcol/aerospikereceiver") + ils.Scope().SetVersion(mb.buildInfo.Version) + ils.Metrics().EnsureCapacity(mb.metricsCapacity) + mb.metricAeropsikeNamespaceTransactionCount.emit(ils.Metrics()) + mb.metricAerospikeNamespaceDiskAvailable.emit(ils.Metrics()) + mb.metricAerospikeNamespaceMemoryFree.emit(ils.Metrics()) + mb.metricAerospikeNamespaceMemoryUsage.emit(ils.Metrics()) + mb.metricAerospikeNamespaceScanCount.emit(ils.Metrics()) + mb.metricAerospikeNodeConnectionCount.emit(ils.Metrics()) + mb.metricAerospikeNodeConnectionOpen.emit(ils.Metrics()) + mb.metricAerospikeNodeMemoryFree.emit(ils.Metrics()) + for _, op := range rmo { + op(rm) + } + if ils.Metrics().Len() > 0 { + mb.updateCapacity(rm) + rm.MoveTo(mb.metricsBuffer.ResourceMetrics().AppendEmpty()) + } +} + +// Emit returns all the metrics accumulated by the metrics builder and updates the internal state to be ready for +// recording another set of metrics. This function will be responsible for applying all the transformations required to +// produce metric representation defined in metadata and user settings, e.g. delta or cumulative. +func (mb *MetricsBuilder) Emit(rmo ...ResourceMetricsOption) pmetric.Metrics { + mb.EmitForResource(rmo...) + metrics := pmetric.NewMetrics() + mb.metricsBuffer.MoveTo(metrics) + return metrics +} + +// RecordAeropsikeNamespaceTransactionCountDataPoint adds a data point to aeropsike.namespace.transaction.count metric. +func (mb *MetricsBuilder) RecordAeropsikeNamespaceTransactionCountDataPoint(ts pcommon.Timestamp, inputVal string, transactionTypeAttributeValue AttributeTransactionType, transactionResultAttributeValue AttributeTransactionResult) error { + val, err := strconv.ParseInt(inputVal, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse int64 for AeropsikeNamespaceTransactionCount, value was %s: %w", inputVal, err) + } + mb.metricAeropsikeNamespaceTransactionCount.recordDataPoint(mb.startTime, ts, val, transactionTypeAttributeValue.String(), transactionResultAttributeValue.String()) + return nil +} + +// RecordAerospikeNamespaceDiskAvailableDataPoint adds a data point to aerospike.namespace.disk.available metric. +func (mb *MetricsBuilder) RecordAerospikeNamespaceDiskAvailableDataPoint(ts pcommon.Timestamp, inputVal string) error { + val, err := strconv.ParseInt(inputVal, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse int64 for AerospikeNamespaceDiskAvailable, value was %s: %w", inputVal, err) + } + mb.metricAerospikeNamespaceDiskAvailable.recordDataPoint(mb.startTime, ts, val) + return nil +} + +// RecordAerospikeNamespaceMemoryFreeDataPoint adds a data point to aerospike.namespace.memory.free metric. +func (mb *MetricsBuilder) RecordAerospikeNamespaceMemoryFreeDataPoint(ts pcommon.Timestamp, inputVal string) error { + val, err := strconv.ParseInt(inputVal, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse int64 for AerospikeNamespaceMemoryFree, value was %s: %w", inputVal, err) + } + mb.metricAerospikeNamespaceMemoryFree.recordDataPoint(mb.startTime, ts, val) + return nil +} + +// RecordAerospikeNamespaceMemoryUsageDataPoint adds a data point to aerospike.namespace.memory.usage metric. +func (mb *MetricsBuilder) RecordAerospikeNamespaceMemoryUsageDataPoint(ts pcommon.Timestamp, inputVal string, namespaceComponentAttributeValue AttributeNamespaceComponent) error { + val, err := strconv.ParseInt(inputVal, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse int64 for AerospikeNamespaceMemoryUsage, value was %s: %w", inputVal, err) + } + mb.metricAerospikeNamespaceMemoryUsage.recordDataPoint(mb.startTime, ts, val, namespaceComponentAttributeValue.String()) + return nil +} + +// RecordAerospikeNamespaceScanCountDataPoint adds a data point to aerospike.namespace.scan.count metric. +func (mb *MetricsBuilder) RecordAerospikeNamespaceScanCountDataPoint(ts pcommon.Timestamp, inputVal string, scanTypeAttributeValue AttributeScanType, scanResultAttributeValue AttributeScanResult) error { + val, err := strconv.ParseInt(inputVal, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse int64 for AerospikeNamespaceScanCount, value was %s: %w", inputVal, err) + } + mb.metricAerospikeNamespaceScanCount.recordDataPoint(mb.startTime, ts, val, scanTypeAttributeValue.String(), scanResultAttributeValue.String()) + return nil +} + +// RecordAerospikeNodeConnectionCountDataPoint adds a data point to aerospike.node.connection.count metric. +func (mb *MetricsBuilder) RecordAerospikeNodeConnectionCountDataPoint(ts pcommon.Timestamp, inputVal string, connectionTypeAttributeValue AttributeConnectionType, connectionOpAttributeValue AttributeConnectionOp) error { + val, err := strconv.ParseInt(inputVal, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse int64 for AerospikeNodeConnectionCount, value was %s: %w", inputVal, err) + } + mb.metricAerospikeNodeConnectionCount.recordDataPoint(mb.startTime, ts, val, connectionTypeAttributeValue.String(), connectionOpAttributeValue.String()) + return nil +} + +// RecordAerospikeNodeConnectionOpenDataPoint adds a data point to aerospike.node.connection.open metric. +func (mb *MetricsBuilder) RecordAerospikeNodeConnectionOpenDataPoint(ts pcommon.Timestamp, inputVal string, connectionTypeAttributeValue AttributeConnectionType) error { + val, err := strconv.ParseInt(inputVal, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse int64 for AerospikeNodeConnectionOpen, value was %s: %w", inputVal, err) + } + mb.metricAerospikeNodeConnectionOpen.recordDataPoint(mb.startTime, ts, val, connectionTypeAttributeValue.String()) + return nil +} + +// RecordAerospikeNodeMemoryFreeDataPoint adds a data point to aerospike.node.memory.free metric. +func (mb *MetricsBuilder) RecordAerospikeNodeMemoryFreeDataPoint(ts pcommon.Timestamp, inputVal string) error { + val, err := strconv.ParseInt(inputVal, 10, 64) + if err != nil { + return fmt.Errorf("failed to parse int64 for AerospikeNodeMemoryFree, value was %s: %w", inputVal, err) + } + mb.metricAerospikeNodeMemoryFree.recordDataPoint(mb.startTime, ts, val) + return nil +} + +// Reset resets metrics builder to its initial state. It should be used when external metrics source is restarted, +// and metrics builder should update its startTime and reset it's internal state accordingly. +func (mb *MetricsBuilder) Reset(options ...metricBuilderOption) { + mb.startTime = pcommon.NewTimestampFromTime(time.Now()) + for _, op := range options { + op(mb) + } +} diff --git a/receiver/aerospikereceiver/metadata.yaml b/receiver/aerospikereceiver/metadata.yaml new file mode 100644 index 000000000000..0bd5b8eef41d --- /dev/null +++ b/receiver/aerospikereceiver/metadata.yaml @@ -0,0 +1,144 @@ +name: aerospikereceiver + +resource_attributes: + aerospike.node.name: + description: Name of the Aerospike node collected from + type: string + aerospike.namespace: + description: Name of the Aerospike namespace + type: string + +attributes: + namespace_component: + value: component + description: Individual component of a namespace + enum: + - data + - index + - set_index + - secondary_index + scan_type: + value: type + description: Type of scan operation performed on a namespace + enum: + - aggregation + - basic + - ops_background + - udf_background + scan_result: + value: result + description: Result of a scan operation performed on a namespace + enum: + - abort + - complete + - error + transaction_type: + value: type + description: Type of transaction performed on a namespace + enum: + - delete + - read + - udf + - write + transaction_result: + value: result + description: Result of a transaction performed on a namespace + enum: + - error + - filtered_out + - not_found + - success + - timeout + connection_type: + value: type + description: Type of connection to an Aerospike node + enum: + - client + - fabric + - heartbeat + connection_op: + value: operation + description: Operation performed with a connection (open or close) + enum: + - close + - open + +metrics: + aerospike.node.memory.free: + enabled: true + description: Percentage of the node's memory which is still free + extended_documentation: Aerospike Metric system_free_mem_pct + unit: '%' + gauge: + value_type: int + input_type: string + aerospike.node.connection.count: + enabled: true + description: Number of connections opened and closed to the node + extended_documentation: Aggregate of Aerospike Metrics client_connections_closed, client_connections_opened, fabric_connections_closed, fabric_connections_opened, heartbeat_connections_closed, heartbeat_connections_opened + unit: '{connections}' + attributes: [connection_type, connection_op] + sum: + value_type: int + input_type: string + monotonic: true + aggregation: cumulative + aerospike.node.connection.open: + enabled: true + description: Current number of open connections to the node + extended_documentation: Aggregate of Aerospike Metrics client_connections, fabric_connections, heartbeat_connections + unit: '{connections}' + attributes: [connection_type] + sum: + value_type: int + input_type: string + monotonic: false + aggregation: cumulative + aerospike.namespace.memory.usage: + enabled: true + description: Memory currently used by each component of the namespace + extended_documentation: Aggregate of Aerospike Metrics memory_used_data_bytes, memory_used_index_bytes, memory_used_set_index_bytes, memory_used_sindex_bytes + unit: By + attributes: [namespace_component] + sum: + value_type: int + input_type: string + monotonic: false + aggregation: cumulative + aerospike.namespace.memory.free: + enabled: true + description: Percentage of the namespace's memory which is still free + extended_documentation: Aerospike metric memory_free_pct + unit: '%' + gauge: + value_type: int + input_type: string + aerospike.namespace.disk.available: + enabled: true + description: Minimum percentage of contiguous disk space free to the namespace across all devices + unit: '%' + gauge: + value_type: int + input_type: string + aerospike.namespace.scan.count: + enabled: true + description: Number of scan operations performed on the namespace + unit: '{scans}' + extended_documentation: Aggregate of Aerospike Metrics scan_aggr_abort, scan_aggr_complete, scan_aggr_error, scan_basic_abort, scan_basic_complete, scan_basic_error, scan_ops_bg_abort, scan_ops_bg_complete, scan_ops_bg_error, scan_udf_bg_abort, scan_udf_bg_complete, scan_udf_bg_error + attributes: [scan_type, scan_result] + sum: + value_type: int + input_type: string + monotonic: true + aggregation: cumulative + aeropsike.namespace.transaction.count: + enabled: true + description: Number of transactions performed on the namespace + unit: '{transactions}' + extended_documentation: Aggregate of Aerospike Metrics client_delete_error, client_delete_filtered_out, client_delete_not_found, client_delete_success, client_delete_timeout, client_read_error, client_read_filtered_out, client_read_not_found, client_read_success, client_read_timeout, client_udf_error, client_udf_filtered_out, client_udf_not_found, client_udf_success, client_udf_timeout, client_write_error, client_write_filtered_out, client_write_not_found, client_write_success, client_write_timeout + attributes: [transaction_type, transaction_result] + sum: + value_type: int + input_type: string + monotonic: true + aggregation: cumulative diff --git a/receiver/aerospikereceiver/mocks/aerospike.go b/receiver/aerospikereceiver/mocks/aerospike.go new file mode 100644 index 000000000000..7ecf1bb95c7f --- /dev/null +++ b/receiver/aerospikereceiver/mocks/aerospike.go @@ -0,0 +1,76 @@ +// Code generated by mockery v2.12.3. DO NOT EDIT. + +package mocks + +import mock "github.com/stretchr/testify/mock" + +// Aerospike is an autogenerated mock type for the Aerospike type +type Aerospike struct { + mock.Mock +} + +// Close provides a mock function with given fields: +func (_m *Aerospike) Close() { + _m.Called() +} + +// Info provides a mock function with given fields: +func (_m *Aerospike) Info() (map[string]string, error) { + ret := _m.Called() + + var r0 map[string]string + if rf, ok := ret.Get(0).(func() map[string]string); ok { + r0 = rf() + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]string) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func() error); ok { + r1 = rf() + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// NamespaceInfo provides a mock function with given fields: namespace +func (_m *Aerospike) NamespaceInfo(namespace string) (map[string]string, error) { + ret := _m.Called(namespace) + + var r0 map[string]string + if rf, ok := ret.Get(0).(func(string) map[string]string); ok { + r0 = rf(namespace) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(map[string]string) + } + } + + var r1 error + if rf, ok := ret.Get(1).(func(string) error); ok { + r1 = rf(namespace) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type NewAerospikeT interface { + mock.TestingT + Cleanup(func()) +} + +// NewAerospike creates a new instance of aerospike. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewAerospike(t NewAerospikeT) *Aerospike { + mock := &Aerospike{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/receiver/aerospikereceiver/scraper.go b/receiver/aerospikereceiver/scraper.go new file mode 100644 index 000000000000..568a6ed3fdf7 --- /dev/null +++ b/receiver/aerospikereceiver/scraper.go @@ -0,0 +1,250 @@ +// 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 aerospikereceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver" + +import ( + "context" + "fmt" + "net" + "strconv" + "strings" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver/scrapererror" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver/internal/metadata" +) + +// aerospikeReceiver is a metrics receiver using the Aerospike interface to collect +type aerospikeReceiver struct { + config *Config + consumer consumer.Metrics + host string // host/IP of configured Aerospike node + port int // port of configured Aerospike node + clientFactory clientFactoryFunc + mb *metadata.MetricsBuilder + logger *zap.Logger +} + +// clientFactoryFunc creates an Aerospike connection to the given host and port +type clientFactoryFunc func(host string, port int) (aerospike, error) + +// newAerospikeReceiver creates a new aerospikeReceiver connected to the endpoint provided in cfg +// +// If the host or port can't be parsed from endpoint, an error is returned. +func newAerospikeReceiver(params component.ReceiverCreateSettings, cfg *Config, consumer consumer.Metrics) (*aerospikeReceiver, error) { + host, portStr, err := net.SplitHostPort(cfg.Endpoint) + if err != nil { + return nil, fmt.Errorf("%w: %s", errBadEndpoint, err) + } + + port, err := strconv.ParseInt(portStr, 10, 32) + if err != nil { + return nil, fmt.Errorf("%w: %s", errBadPort, err) + } + + return &aerospikeReceiver{ + logger: params.Logger, + config: cfg, + consumer: consumer, + clientFactory: func(host string, port int) (aerospike, error) { + return newASClient(host, port, cfg.Username, cfg.Password, cfg.Timeout, params.Logger) + }, + host: host, + port: int(port), + mb: metadata.NewMetricsBuilder(cfg.Metrics, params.BuildInfo), + }, nil +} + +// scrape scrapes both Node and Namespace metrics from the provided Aerospike node. +// If CollectClusterMetrics is true, it then scrapes every discovered node +func (r *aerospikeReceiver) scrape(ctx context.Context) (pmetric.Metrics, error) { + errs := &scrapererror.ScrapeErrors{} + now := pcommon.NewTimestampFromTime(time.Now().UTC()) + client, err := r.clientFactory(r.host, r.port) + if err != nil { + return pmetric.NewMetrics(), fmt.Errorf("failed to connect: %w", err) + } + defer client.Close() + + info, err := client.Info() + if err != nil { + r.logger.Warn(fmt.Sprintf("failed to get INFO: %s", err.Error())) + return r.mb.Emit(), err + } + r.emitNode(info, now, errs) + r.scrapeNamespaces(info, client, now, errs) + + if r.config.CollectClusterMetrics { + r.logger.Debug("Collecting peer nodes") + for _, n := range strings.Split(info["services"], ";") { + r.scrapeDiscoveredNode(n, now, errs) + } + } + + return r.mb.Emit(), errs.Combine() +} + +// scrapeNode collects metrics from a single Aerospike node +func (r *aerospikeReceiver) scrapeNode(client aerospike, now pcommon.Timestamp, errs *scrapererror.ScrapeErrors) { + info, err := client.Info() + if err != nil { + errs.AddPartial(0, err) + return + } + + r.emitNode(info, now, errs) + r.scrapeNamespaces(info, client, now, errs) +} + +// scrapeDiscoveredNode connects to a discovered Aerospike node and scrapes it using that connection +// +// If unable to parse the endpoint or connect, that error is logged and we return early +func (r *aerospikeReceiver) scrapeDiscoveredNode(endpoint string, now pcommon.Timestamp, errs *scrapererror.ScrapeErrors) { + host, portStr, err := net.SplitHostPort(endpoint) + if err != nil { + r.logger.Warn(fmt.Sprintf("%s: %s", errBadEndpoint, err)) + errs.Add(err) + return + } + port, err := strconv.ParseInt(portStr, 10, 32) + if err != nil { + r.logger.Warn(fmt.Sprintf("%s: %s", errBadPort, err)) + errs.Add(err) + return + } + + nClient, err := r.clientFactory(host, int(port)) + if err != nil { + r.logger.Warn(err.Error()) + errs.Add(err) + return + } + defer nClient.Close() + + r.scrapeNode(nClient, now, errs) +} + +// emitNode records node metrics and emits the resource. If statistics are missing in INFO, nothing is recorded +func (r *aerospikeReceiver) emitNode(info map[string]string, now pcommon.Timestamp, errs *scrapererror.ScrapeErrors) { + for k, v := range info { + switch k { + case "client_connections": + addPartialIfError(errs, r.mb.RecordAerospikeNodeConnectionOpenDataPoint(now, v, metadata.AttributeConnectionTypeClient)) + case "fabric_connections": + addPartialIfError(errs, r.mb.RecordAerospikeNodeConnectionOpenDataPoint(now, v, metadata.AttributeConnectionTypeFabric)) + case "heartbeat_connections": + addPartialIfError(errs, r.mb.RecordAerospikeNodeConnectionOpenDataPoint(now, v, metadata.AttributeConnectionTypeHeartbeat)) + case "client_connections_closed": + addPartialIfError(errs, r.mb.RecordAerospikeNodeConnectionCountDataPoint(now, v, metadata.AttributeConnectionTypeClient, metadata.AttributeConnectionOpClose)) + case "client_connections_opened": + addPartialIfError(errs, r.mb.RecordAerospikeNodeConnectionCountDataPoint(now, v, metadata.AttributeConnectionTypeClient, metadata.AttributeConnectionOpOpen)) + case "fabric_connections_closed": + addPartialIfError(errs, r.mb.RecordAerospikeNodeConnectionCountDataPoint(now, v, metadata.AttributeConnectionTypeFabric, metadata.AttributeConnectionOpClose)) + case "fabric_connections_opened": + addPartialIfError(errs, r.mb.RecordAerospikeNodeConnectionCountDataPoint(now, v, metadata.AttributeConnectionTypeFabric, metadata.AttributeConnectionOpOpen)) + case "heartbeat_connections_closed": + addPartialIfError(errs, r.mb.RecordAerospikeNodeConnectionCountDataPoint(now, v, metadata.AttributeConnectionTypeHeartbeat, metadata.AttributeConnectionOpClose)) + case "heartbeat_connections_opened": + addPartialIfError(errs, r.mb.RecordAerospikeNodeConnectionCountDataPoint(now, v, metadata.AttributeConnectionTypeHeartbeat, metadata.AttributeConnectionOpOpen)) + case "system_free_mem_pct": + addPartialIfError(errs, r.mb.RecordAerospikeNodeMemoryFreeDataPoint(now, v)) + } + } + + r.mb.EmitForResource(metadata.WithAerospikeNodeName(info["node"])) +} + +// scrapeNamespaces records metrics for all namespaces on a node +// The given client is used to collect namespace metrics, which is connected to a single node +func (r *aerospikeReceiver) scrapeNamespaces(info map[string]string, client aerospike, now pcommon.Timestamp, errs *scrapererror.ScrapeErrors) { + namespaces := strings.Split(info["namespaces"], ";") + for _, n := range namespaces { + if n == "" { + continue + } + nInfo, err := client.NamespaceInfo(n) + if err != nil { + r.logger.Warn(fmt.Sprintf("failed getting namespace %s: %s", n, err.Error())) + errs.AddPartial(0, err) + continue + } + nInfo["node"] = info["node"] + r.emitNamespace(nInfo, now, errs) + } +} + +// emitNamespace emits a namespace resource with its name as resource attribute +func (r *aerospikeReceiver) emitNamespace(info map[string]string, now pcommon.Timestamp, errs *scrapererror.ScrapeErrors) { + for k, v := range info { + switch k { + // Capacity + case "device_available_pct": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceDiskAvailableDataPoint(now, v)) + case "memory_free_pct": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceMemoryFreeDataPoint(now, v)) + + // Memory usage + case "memory_used_data_bytes": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceMemoryUsageDataPoint(now, v, metadata.AttributeNamespaceComponentData)) + case "memory_used_index_bytes": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceMemoryUsageDataPoint(now, v, metadata.AttributeNamespaceComponentIndex)) + case "memory_used_sindex_bytes": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceMemoryUsageDataPoint(now, v, metadata.AttributeNamespaceComponentSecondaryIndex)) + case "memory_used_set_index_bytes": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceMemoryUsageDataPoint(now, v, metadata.AttributeNamespaceComponentSetIndex)) + + // Scans + case "scan_aggr_abort": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeAggregation, metadata.AttributeScanResultAbort)) + case "scan_aggr_complete": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeAggregation, metadata.AttributeScanResultComplete)) + case "scan_aggr_error": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeAggregation, metadata.AttributeScanResultError)) + case "scan_basic_abort": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeBasic, metadata.AttributeScanResultAbort)) + case "scan_basic_complete": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeBasic, metadata.AttributeScanResultComplete)) + case "scan_basic_error": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeBasic, metadata.AttributeScanResultError)) + case "scan_ops_bg_abort": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeOpsBackground, metadata.AttributeScanResultAbort)) + case "scan_ops_bg_complete": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeOpsBackground, metadata.AttributeScanResultComplete)) + case "scan_ops_bg_error": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeOpsBackground, metadata.AttributeScanResultError)) + case "scan_udf_bg_abort": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeUdfBackground, metadata.AttributeScanResultAbort)) + case "scan_udf_bg_complete": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeUdfBackground, metadata.AttributeScanResultComplete)) + case "scan_udf_bg_error": + addPartialIfError(errs, r.mb.RecordAerospikeNamespaceScanCountDataPoint(now, v, metadata.AttributeScanTypeUdfBackground, metadata.AttributeScanResultError)) + } + } + + r.mb.EmitForResource(metadata.WithAerospikeNamespace(info["name"]), metadata.WithAerospikeNodeName(info["node"])) +} + +// addPartialIfError adds a partial error if the given error isn't nil +func addPartialIfError(errs *scrapererror.ScrapeErrors, err error) { + if err != nil { + errs.AddPartial(1, err) + } +} diff --git a/receiver/aerospikereceiver/scraper_test.go b/receiver/aerospikereceiver/scraper_test.go new file mode 100644 index 000000000000..0374bbcdeb39 --- /dev/null +++ b/receiver/aerospikereceiver/scraper_test.go @@ -0,0 +1,208 @@ +// 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 aerospikereceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver" + +import ( + "context" + "errors" + "fmt" + "testing" + "time" + + as "github.com/aerospike/aerospike-client-go/v5" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver/scrapererror" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver/mocks" +) + +func TestNewAerospikeReceiver_BadEndpoint(t *testing.T) { + testCases := []struct { + name string + endpoint string + errMsg string + }{ + { + name: "no port", + endpoint: "localhost", + errMsg: "missing port in address", + }, + { + name: "no address", + endpoint: "", + errMsg: "missing port in address", + }, + } + + cs, err := consumer.NewMetrics(func(ctx context.Context, ld pmetric.Metrics) error { return nil }) + require.NoError(t, err) + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + cfg := &Config{Endpoint: tc.endpoint} + receiver, err := newAerospikeReceiver(component.ReceiverCreateSettings{}, cfg, cs) + require.ErrorContains(t, err, tc.errMsg) + require.Nil(t, receiver) + }) + } +} + +func TestScrapeNode(t *testing.T) { + testCases := []struct { + name string + setupClient func() *mocks.Aerospike + expectedErr string + }{ + { + name: "error response", + setupClient: func() *mocks.Aerospike { + client := &mocks.Aerospike{} + client.On("Info").Return(nil, as.ErrNetTimeout) + return client + }, + expectedErr: as.ErrNetTimeout.Error(), + }, + { + name: "empty response", + setupClient: func() *mocks.Aerospike { + client := &mocks.Aerospike{} + client.On("Info").Return(map[string]string{}, nil) + return client + }, + }, + } + + logger, err := zap.NewDevelopment() + require.NoError(t, err) + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + client := tc.setupClient() + cs, err := consumer.NewMetrics(func(ctx context.Context, ld pmetric.Metrics) error { return nil }) + require.NoError(t, err) + + receiver, err := newAerospikeReceiver( + component.ReceiverCreateSettings{ + TelemetrySettings: component.TelemetrySettings{ + Logger: logger, + }, + }, + &Config{Endpoint: "localhost:3000"}, + cs, + ) + require.NoError(t, err) + errs := &scrapererror.ScrapeErrors{} + receiver.scrapeNode(client, pcommon.NewTimestampFromTime(time.Now().UTC()), errs) + + if tc.expectedErr != "" { + assert.EqualError(t, errs.Combine(), tc.expectedErr) + } + client.AssertExpectations(t) + require.Equal(t, 0, receiver.mb.Emit().MetricCount()) + }) + } +} + +func TestScrape_CollectClusterMetrics(t *testing.T) { + t.Parallel() + + logger, err := zap.NewDevelopment() + require.NoError(t, err) + now := pcommon.NewTimestampFromTime(time.Now().UTC()) + + expectedMB := metadata.NewMetricsBuilder(metadata.DefaultMetricsSettings(), component.NewDefaultBuildInfo()) + + require.NoError(t, expectedMB.RecordAerospikeNodeConnectionOpenDataPoint(now, "22", metadata.AttributeConnectionTypeClient)) + expectedMB.EmitForResource(metadata.WithAerospikeNodeName("Primary Node")) + + require.NoError(t, expectedMB.RecordAerospikeNamespaceMemoryFreeDataPoint(now, "45")) + expectedMB.EmitForResource(metadata.WithAerospikeNamespace("test"), metadata.WithAerospikeNodeName("Primary Node")) + + require.NoError(t, expectedMB.RecordAerospikeNodeConnectionOpenDataPoint(now, "1", metadata.AttributeConnectionTypeClient)) + expectedMB.EmitForResource(metadata.WithAerospikeNodeName("Secondary Node")) + + require.NoError(t, expectedMB.RecordAerospikeNamespaceMemoryUsageDataPoint(now, "128", metadata.AttributeNamespaceComponentData)) + expectedMB.EmitForResource(metadata.WithAerospikeNamespace("test"), metadata.WithAerospikeNodeName("Secondary Node")) + + initialClient := mocks.NewAerospike(t) + initialClient.On("Info").Return(map[string]string{ + "node": "Primary Node", + "namespaces": "test;bar", + "services": "localhost:3001;localhost:3002;invalid", + "client_connections": "22", + }, nil) + initialClient.On("NamespaceInfo", "test").Return(map[string]string{ + "name": "test", + "memory_free_pct": "45", + }, nil) + + initialClient.On("NamespaceInfo", "bar").Return(nil, errors.New("no such namespace")) + initialClient.On("Close").Return() + + peerClient := mocks.NewAerospike(t) + peerClient.On("Info").Return(map[string]string{ + "node": "Secondary Node", + "namespaces": "test", + "client_connections": "1", + }, nil) + + peerClient.On("NamespaceInfo", "test").Return(map[string]string{ + "name": "test", + "memory_used_data_bytes": "128", + }, nil) + peerClient.On("Close").Return() + + clientFactory := func(host string, port int) (aerospike, error) { + switch fmt.Sprintf("%s:%d", host, port) { + case "localhost:3000": + return initialClient, nil + case "localhost:3001": + return peerClient, nil + case "localhost:3002": + return nil, errors.New("connection timeout") + } + + return nil, errors.New("unexpected endpoint") + } + receiver := &aerospikeReceiver{ + host: "localhost", + port: 3000, + clientFactory: clientFactory, + mb: metadata.NewMetricsBuilder(metadata.DefaultMetricsSettings(), component.NewDefaultBuildInfo()), + logger: logger, + config: &Config{ + CollectClusterMetrics: true, + }, + } + + actualMetrics, err := receiver.scrape(context.Background()) + require.EqualError(t, err, "no such namespace; connection timeout; address invalid: missing port in address") + + expectedMetrics := expectedMB.Emit() + require.NoError(t, scrapertest.CompareMetrics(expectedMetrics, actualMetrics)) + + initialClient.AssertExpectations(t) + peerClient.AssertExpectations(t) +} diff --git a/receiver/aerospikereceiver/testdata/config.yaml b/receiver/aerospikereceiver/testdata/config.yaml new file mode 100644 index 000000000000..df704df94d96 --- /dev/null +++ b/receiver/aerospikereceiver/testdata/config.yaml @@ -0,0 +1,5 @@ +receivers: + aerospike: + endpoint: localhost:3000 + collect_cluster_metrics: false + collection_interval: 30s diff --git a/receiver/aerospikereceiver/testdata/integration/expected.json b/receiver/aerospikereceiver/testdata/integration/expected.json new file mode 100644 index 000000000000..eec1581bdf9d --- /dev/null +++ b/receiver/aerospikereceiver/testdata/integration/expected.json @@ -0,0 +1,214 @@ +{ + "resourceMetrics": [ + { + "resource": { + "attributes": [ + { + "key": "aerospike.node.name", + "value": { + "stringValue": "BB9020011AC4202" + } + } + ] + }, + "instrumentationLibraryMetrics": [ + { + "instrumentationLibrary": { + "name": "otelcol/aerospikereceiver", + "version": "latest" + }, + "metrics": [ + { + "name": "aerospike.node.connection.count", + "description": "Number of connections opened and closed to the node", + "unit": "{connections}", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "client" + } + }, + { + "key": "operation", + "value": { + "stringValue": "open" + } + } + ], + "startTimeUnixNano": "1655394861662434007", + "timeUnixNano": "1655394876665653577", + "asInt": "55" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "heartbeat" + } + }, + { + "key": "operation", + "value": { + "stringValue": "open" + } + } + ], + "startTimeUnixNano": "1655394861662434007", + "timeUnixNano": "1655394876665653577", + "asInt": "2" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "client" + } + }, + { + "key": "operation", + "value": { + "stringValue": "close" + } + } + ], + "startTimeUnixNano": "1655394861662434007", + "timeUnixNano": "1655394876665653577", + "asInt": "54" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "heartbeat" + } + }, + { + "key": "operation", + "value": { + "stringValue": "close" + } + } + ], + "startTimeUnixNano": "1655394861662434007", + "timeUnixNano": "1655394876665653577", + "asInt": "0" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "fabric" + } + }, + { + "key": "operation", + "value": { + "stringValue": "open" + } + } + ], + "startTimeUnixNano": "1655394861662434007", + "timeUnixNano": "1655394876665653577", + "asInt": "48" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "fabric" + } + }, + { + "key": "operation", + "value": { + "stringValue": "close" + } + } + ], + "startTimeUnixNano": "1655394861662434007", + "timeUnixNano": "1655394876665653577", + "asInt": "0" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "isMonotonic": true + } + }, + { + "name": "aerospike.node.connection.open", + "description": "Current number of open connections to the node", + "unit": "{connections}", + "sum": { + "dataPoints": [ + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "client" + } + } + ], + "startTimeUnixNano": "1655394861662434007", + "timeUnixNano": "1655394876665653577", + "asInt": "1" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "fabric" + } + } + ], + "startTimeUnixNano": "1655394861662434007", + "timeUnixNano": "1655394876665653577", + "asInt": "48" + }, + { + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "heartbeat" + } + } + ], + "startTimeUnixNano": "1655394861662434007", + "timeUnixNano": "1655394876665653577", + "asInt": "2" + } + ], + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE" + } + }, + { + "name": "aerospike.node.memory.free", + "description": "Percentage of the node's memory which is still free", + "unit": "%", + "gauge": { + "dataPoints": [ + { + "startTimeUnixNano": "1655394861662434007", + "timeUnixNano": "1655394876665653577", + "asInt": "72" + } + ] + } + } + ] + } + ] + } + ] +} diff --git a/receiver/apachereceiver/go.mod b/receiver/apachereceiver/go.mod index 25a876876593..e6de75b42343 100644 --- a/receiver/apachereceiver/go.mod +++ b/receiver/apachereceiver/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -18,7 +18,7 @@ require ( github.com/containerd/containerd v1.5.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.15+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect @@ -72,7 +72,7 @@ require ( require ( github.com/rogpeppe/go-internal v1.6.2 // indirect github.com/testcontainers/testcontainers-go v0.13.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest => ../../internal/scrapertest diff --git a/receiver/apachereceiver/go.sum b/receiver/apachereceiver/go.sum index 44da4968ebba..ea380b2a0e5d 100644 --- a/receiver/apachereceiver/go.sum +++ b/receiver/apachereceiver/go.sum @@ -253,8 +253,8 @@ github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.15+incompatible h1:dk9FewY/9Xwm4ay/HViEEHSQuM/kL4F+JaG6GQdgmGo= -github.com/docker/docker v20.10.15+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -741,10 +741,10 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/awscontainerinsightreceiver/README.md b/receiver/awscontainerinsightreceiver/README.md index cf714009ea22..9d14eb864c57 100644 --- a/receiver/awscontainerinsightreceiver/README.md +++ b/receiver/awscontainerinsightreceiver/README.md @@ -1,7 +1,7 @@ # AWS Container Insights Receiver ## Overview -AWS Container Insights Receiver (`awscontainerinsightreceiver`) is an AWS specific receiver that supports [CloudWatch Container Insights]((https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContainerInsights.html)). CloudWatch Container Insights collect, aggregate, +AWS Container Insights Receiver (`awscontainerinsightreceiver`) is an AWS specific receiver that supports [CloudWatch Container Insights](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContainerInsights.html). CloudWatch Container Insights collect, aggregate, and summarize metrics and logs from your containerized applications and microservices. Data are collected as as performance log events using [embedded metric format](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Embedded_Metric_Format.html). From the EMF data, Amazon CloudWatch can create the aggregated CloudWatch metrics at the cluster, node, pod, task, and service level. @@ -854,4 +854,4 @@ To deploy to an ECS cluster check this [doc](https://aws-otel.github.io/docs/set | InstanceId | | EBSVolumeId |

-

\ No newline at end of file +

diff --git a/receiver/awscontainerinsightreceiver/go.mod b/receiver/awscontainerinsightreceiver/go.mod index 6c6cf2ef0393..2de677adde78 100644 --- a/receiver/awscontainerinsightreceiver/go.mod +++ b/receiver/awscontainerinsightreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscon go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/google/cadvisor v0.44.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight v0.53.0 @@ -13,8 +13,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.53.0 github.com/shirou/gopsutil/v3 v3.22.5 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 k8s.io/api v0.24.1 k8s.io/apimachinery v0.24.1 @@ -36,7 +36,7 @@ require ( github.com/cyphar/filepath-securejoin v0.2.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.0-beta.1+incompatible // indirect - github.com/docker/docker v20.10.15+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/emicklei/go-restful v2.9.5+incompatible // indirect diff --git a/receiver/awscontainerinsightreceiver/go.sum b/receiver/awscontainerinsightreceiver/go.sum index ebe5dbca3f9d..2714f55dfe8a 100644 --- a/receiver/awscontainerinsightreceiver/go.sum +++ b/receiver/awscontainerinsightreceiver/go.sum @@ -98,8 +98,8 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkY github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.35.24/go.mod h1:tlPOdRjfxPBpNIwqDj61rmsnA85v9jc0Ps9+muhnW+k= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -288,8 +288,8 @@ github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4Kfc github.com/docker/distribution v2.8.0-beta.1+incompatible h1:9MjVa+OTMHm4C0kKZB68jPlDM9Cg75ta4i46Gxxxn8o= github.com/docker/distribution v2.8.0-beta.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.12+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.15+incompatible h1:dk9FewY/9Xwm4ay/HViEEHSQuM/kL4F+JaG6GQdgmGo= -github.com/docker/docker v20.10.15+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -876,10 +876,10 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/awscontainerinsightreceiver/internal/cadvisor/cadvisor_linux_test.go b/receiver/awscontainerinsightreceiver/internal/cadvisor/cadvisor_linux_test.go index 8df3516d993a..01aa9f865c34 100644 --- a/receiver/awscontainerinsightreceiver/internal/cadvisor/cadvisor_linux_test.go +++ b/receiver/awscontainerinsightreceiver/internal/cadvisor/cadvisor_linux_test.go @@ -20,7 +20,6 @@ package cadvisor import ( "errors" "net/http" - "os" "testing" "github.com/google/cadvisor/cache/memory" @@ -62,6 +61,14 @@ func (m *mockCadvisorManager2) SubcontainersInfo(containerName string, query *in return nil, nil } +func newMockCreateManager(t *testing.T) createCadvisorManager { + return func(memoryCache *memory.InMemoryCache, sysfs sysfs.SysFs, houskeepingConfig manager.HouskeepingConfig, + includedMetricsSet container.MetricSet, collectorHTTPClient *http.Client, rawContainerCgroupPathPrefixWhiteList []string, + perfEventsFile string) (cadvisorManager, error) { + return &mockCadvisorManager{t: t}, nil + } +} + var mockCreateManager2 = func(memoryCache *memory.InMemoryCache, sysfs sysfs.SysFs, houskeepingConfig manager.HouskeepingConfig, includedMetricsSet container.MetricSet, collectorHTTPClient *http.Client, rawContainerCgroupPathPrefixWhiteList []string, perfEventsFile string) (cadvisorManager, error) { @@ -82,53 +89,52 @@ func (m *MockK8sDecorator) Decorate(metric *extractors.CAdvisorMetric) *extracto } func TestGetMetrics(t *testing.T) { - // normal case - originalHostName := os.Getenv("HOST_NAME") - os.Setenv("HOST_NAME", "host") + t.Setenv("HOST_NAME", "host") hostInfo := testutils.MockHostInfo{ClusterName: "cluster"} k8sdecoratorOption := WithDecorator(&MockK8sDecorator{}) - mockCreateManager := func(memoryCache *memory.InMemoryCache, sysfs sysfs.SysFs, houskeepingConfig manager.HouskeepingConfig, - includedMetricsSet container.MetricSet, collectorHTTPClient *http.Client, rawContainerCgroupPathPrefixWhiteList []string, - perfEventsFile string) (cadvisorManager, error) { - return &mockCadvisorManager{t: t}, nil - } - c, err := New("eks", hostInfo, zap.NewNop(), cadvisorManagerCreator(mockCreateManager), k8sdecoratorOption) + + c, err := New("eks", hostInfo, zap.NewNop(), cadvisorManagerCreator(newMockCreateManager(t)), k8sdecoratorOption) assert.NotNil(t, c) - assert.Nil(t, err) + assert.NoError(t, err) assert.NotNil(t, c.GetMetrics()) - os.Setenv("HOST_NAME", originalHostName) +} + +func TestGetMetricsNoEnv(t *testing.T) { + hostInfo := testutils.MockHostInfo{ClusterName: "cluster"} + k8sdecoratorOption := WithDecorator(&MockK8sDecorator{}) - // no environmental variable - c, err = New("eks", hostInfo, zap.NewNop(), cadvisorManagerCreator(mockCreateManager), k8sdecoratorOption) + c, err := New("eks", hostInfo, zap.NewNop(), cadvisorManagerCreator(newMockCreateManager(t)), k8sdecoratorOption) assert.Nil(t, c) - assert.NotNil(t, err) + assert.Error(t, err) +} + +func TestGetMetricsNoClusterName(t *testing.T) { + t.Setenv("HOST_NAME", "host") + hostInfo := testutils.MockHostInfo{} + k8sdecoratorOption := WithDecorator(&MockK8sDecorator{}) - // no cluster name - originalHostName = os.Getenv("HOST_NAME") - os.Setenv("HOST_NAME", "host") - hostInfo = testutils.MockHostInfo{} - c, err = New("eks", hostInfo, zap.NewNop(), cadvisorManagerCreator(mockCreateManager), k8sdecoratorOption) + c, err := New("eks", hostInfo, zap.NewNop(), cadvisorManagerCreator(newMockCreateManager(t)), k8sdecoratorOption) assert.NotNil(t, c) - assert.Nil(t, err) + assert.NoError(t, err) assert.Nil(t, c.GetMetrics()) - os.Setenv("HOST_NAME", originalHostName) +} - // error when calling manager.Start - originalHostName = os.Getenv("HOST_NAME") - os.Setenv("HOST_NAME", "host") - hostInfo = testutils.MockHostInfo{ClusterName: "cluster"} - c, err = New("eks", hostInfo, zap.NewNop(), cadvisorManagerCreator(mockCreateManager2), k8sdecoratorOption) - assert.Nil(t, c) - assert.NotNil(t, err) - os.Setenv("HOST_NAME", originalHostName) - - // error when creating cadvisor manager - originalHostName = os.Getenv("HOST_NAME") - os.Setenv("HOST_NAME", "host") - hostInfo = testutils.MockHostInfo{ClusterName: "cluster"} - c, err = New("eks", hostInfo, zap.NewNop(), cadvisorManagerCreator(mockCreateManagerWithError), k8sdecoratorOption) +func TestGetMetricsErrorWhenCreatingManager(t *testing.T) { + t.Setenv("HOST_NAME", "host") + hostInfo := testutils.MockHostInfo{ClusterName: "cluster"} + k8sdecoratorOption := WithDecorator(&MockK8sDecorator{}) + + c, err := New("eks", hostInfo, zap.NewNop(), cadvisorManagerCreator(mockCreateManagerWithError), k8sdecoratorOption) assert.Nil(t, c) - assert.NotNil(t, err) + assert.Error(t, err) +} - os.Setenv("HOST_NAME", originalHostName) +func TestGetMetricsErrorWhenCallingManagerStart(t *testing.T) { + t.Setenv("HOST_NAME", "host") + hostInfo := testutils.MockHostInfo{ClusterName: "cluster"} + k8sdecoratorOption := WithDecorator(&MockK8sDecorator{}) + + c, err := New("eks", hostInfo, zap.NewNop(), cadvisorManagerCreator(mockCreateManager2), k8sdecoratorOption) + assert.Nil(t, c) + assert.Error(t, err) } diff --git a/receiver/awscontainerinsightreceiver/internal/ecsInfo/utils.go b/receiver/awscontainerinsightreceiver/internal/ecsInfo/utils.go index cd946034340d..315412711c2a 100644 --- a/receiver/awscontainerinsightreceiver/internal/ecsInfo/utils.go +++ b/receiver/awscontainerinsightreceiver/internal/ecsInfo/utils.go @@ -100,7 +100,7 @@ func request(ctx context.Context, endpoint string, client doer) ([]byte, error) body, err := ioutil.ReadAll(reader) if err != nil { - return nil, fmt.Errorf("unable to read response body from %s, error: %v", endpoint, err) + return nil, fmt.Errorf("unable to read response body from %s, error: %w", endpoint, err) } if len(body) == maxHTTPResponseLength { diff --git a/receiver/awscontainerinsightreceiver/internal/host/hostinfo.go b/receiver/awscontainerinsightreceiver/internal/host/hostinfo.go index 0a8905e491d5..5dd75aa1a5f0 100644 --- a/receiver/awscontainerinsightreceiver/internal/host/hostinfo.go +++ b/receiver/awscontainerinsightreceiver/internal/host/hostinfo.go @@ -82,14 +82,14 @@ func NewInfo(containerOrchestrator string, refreshInterval time.Duration, logger nodeCapacity, err := mInfo.nodeCapacityCreator(logger) if err != nil { - return nil, fmt.Errorf("failed to initialize NodeCapacity: %v", err) + return nil, fmt.Errorf("failed to initialize NodeCapacity: %w", err) } mInfo.nodeCapacity = nodeCapacity defaultSessionConfig := awsutil.CreateDefaultSessionConfig() _, session, err := mInfo.awsSessionCreator(logger, &awsutil.Conn{}, &defaultSessionConfig) if err != nil { - return nil, fmt.Errorf("failed to create aws session: %v", err) + return nil, fmt.Errorf("failed to create aws session: %w", err) } mInfo.awsSession = session diff --git a/receiver/awscontainerinsightreceiver/internal/host/nodeCapacity.go b/receiver/awscontainerinsightreceiver/internal/host/nodeCapacity.go index 6ffc7658587d..c809e204a359 100644 --- a/receiver/awscontainerinsightreceiver/internal/host/nodeCapacity.go +++ b/receiver/awscontainerinsightreceiver/internal/host/nodeCapacity.go @@ -64,7 +64,7 @@ func newNodeCapacity(logger *zap.Logger, options ...nodeCapacityOption) (nodeCap return nil, err } if err := nc.osSetenv(goPSUtilProcDirEnv, hostProc); err != nil { - return nil, fmt.Errorf("NodeCapacity cannot set goPSUtilProcDirEnv to %s: %v", hostProc, err) + return nil, fmt.Errorf("NodeCapacity cannot set goPSUtilProcDirEnv to %s: %w", hostProc, err) } nc.parseCPU() diff --git a/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver.go b/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver.go index 4c280bca16fd..409ba7d26acf 100644 --- a/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver.go +++ b/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver.go @@ -113,7 +113,7 @@ func New(clusterNameProvider clusterNameProvider, logger *zap.Logger, options .. } if err := k.init(); err != nil { - return nil, fmt.Errorf("fail to initialize k8sapiserver, err: %v", err) + return nil, fmt.Errorf("fail to initialize k8sapiserver, err: %w", err) } return k, nil diff --git a/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver_test.go b/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver_test.go index 3fd8aee05618..e86edfdcbf89 100644 --- a/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver_test.go +++ b/receiver/awscontainerinsightreceiver/internal/k8sapiserver/k8sapiserver_test.go @@ -186,10 +186,8 @@ func TestK8sAPIServer_GetMetrics(t *testing.T) { k.isLeadingC = make(chan bool) } - originalHostName := os.Getenv("HOST_NAME") - originalNamespace := os.Getenv("K8S_NAMESPACE") - os.Setenv("HOST_NAME", hostName) - os.Setenv("K8S_NAMESPACE", "namespace") + t.Setenv("HOST_NAME", hostName) + t.Setenv("K8S_NAMESPACE", "namespace") k8sAPIServer, err := New(MockClusterNameProvicer{}, zap.NewNop(), k8sClientOption, leadingOption, broadcasterOption, isLeadingCOption) @@ -238,9 +236,6 @@ func TestK8sAPIServer_GetMetrics(t *testing.T) { } k8sAPIServer.Shutdown() - // restore env variables - os.Setenv("HOST_NAME", originalHostName) - os.Setenv("K8S_NAMESPACE", originalNamespace) } func TestK8sAPIServer_init(t *testing.T) { @@ -250,13 +245,9 @@ func TestK8sAPIServer_init(t *testing.T) { assert.NotNil(t, err) assert.True(t, strings.HasPrefix(err.Error(), "environment variable HOST_NAME is not set")) - originalHostName := os.Getenv("HOST_NAME") - os.Setenv("HOST_NAME", "hostname") + t.Setenv("HOST_NAME", "hostname") err = k8sAPIServer.init() assert.NotNil(t, err) assert.True(t, strings.HasPrefix(err.Error(), "environment variable K8S_NAMESPACE is not set")) - - // restore env variables - os.Setenv("HOST_NAME", originalHostName) } diff --git a/receiver/awscontainerinsightreceiver/internal/stores/kubeletutil/kubeletclient.go b/receiver/awscontainerinsightreceiver/internal/stores/kubeletutil/kubeletclient.go index 84f67e1a0bdd..ca58eec0b889 100644 --- a/receiver/awscontainerinsightreceiver/internal/stores/kubeletutil/kubeletclient.go +++ b/receiver/awscontainerinsightreceiver/internal/stores/kubeletutil/kubeletclient.go @@ -62,13 +62,13 @@ func (k *KubeletClient) ListPods() ([]corev1.Pod, error) { var result []corev1.Pod b, err := k.restClient.Get("/pods") if err != nil { - return result, fmt.Errorf("call to /pods endpoint failed: %v", err) + return result, fmt.Errorf("call to /pods endpoint failed: %w", err) } pods := corev1.PodList{} err = json.Unmarshal(b, &pods) if err != nil { - return result, fmt.Errorf("parsing response failed: %v", err) + return result, fmt.Errorf("parsing response failed: %w", err) } return pods.Items, nil diff --git a/receiver/awscontainerinsightreceiver/internal/stores/podstore.go b/receiver/awscontainerinsightreceiver/internal/stores/podstore.go index cb0ac8eb6730..c92149e5d8f5 100644 --- a/receiver/awscontainerinsightreceiver/internal/stores/podstore.go +++ b/receiver/awscontainerinsightreceiver/internal/stores/podstore.go @@ -121,7 +121,7 @@ func NewPodStore(hostIP string, prefFullPodName bool, addFullPodNameMetricLabel // Try to detect kubelet permission issue here if _, err := podClient.ListPods(); err != nil { - return nil, fmt.Errorf("cannot get pod from kubelet, err: %v", err) + return nil, fmt.Errorf("cannot get pod from kubelet, err: %w", err) } k8sClient := k8sclient.Get(logger) diff --git a/receiver/awsecscontainermetricsreceiver/factory_test.go b/receiver/awsecscontainermetricsreceiver/factory_test.go index 1ef914f83fbd..2aa90ea359ab 100644 --- a/receiver/awsecscontainermetricsreceiver/factory_test.go +++ b/receiver/awsecscontainermetricsreceiver/factory_test.go @@ -16,7 +16,6 @@ package awsecscontainermetricsreceiver import ( "context" - "os" "testing" "github.com/stretchr/testify/require" @@ -33,8 +32,6 @@ func TestValidConfig(t *testing.T) { } func TestCreateMetricsReceiver(t *testing.T) { - os.Unsetenv(endpoints.TaskMetadataEndpointV4EnvVar) - metricsReceiver, err := createMetricsReceiver( context.Background(), componenttest.NewNopReceiverCreateSettings(), @@ -46,7 +43,7 @@ func TestCreateMetricsReceiver(t *testing.T) { } func TestCreateMetricsReceiverWithEnv(t *testing.T) { - os.Setenv(endpoints.TaskMetadataEndpointV4EnvVar, "http://www.test.com") + t.Setenv(endpoints.TaskMetadataEndpointV4EnvVar, "http://www.test.com") metricsReceiver, err := createMetricsReceiver( context.Background(), @@ -59,7 +56,7 @@ func TestCreateMetricsReceiverWithEnv(t *testing.T) { } func TestCreateMetricsReceiverWithBadUrl(t *testing.T) { - os.Setenv(endpoints.TaskMetadataEndpointV4EnvVar, "bad-url-format") + t.Setenv(endpoints.TaskMetadataEndpointV4EnvVar, "bad-url-format") metricsReceiver, err := createMetricsReceiver( context.Background(), diff --git a/receiver/awsecscontainermetricsreceiver/go.mod b/receiver/awsecscontainermetricsreceiver/go.mod index a86e93e35edd..596397c76f09 100644 --- a/receiver/awsecscontainermetricsreceiver/go.mod +++ b/receiver/awsecscontainermetricsreceiver/go.mod @@ -6,9 +6,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/ecsutil v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/receiver/awsecscontainermetricsreceiver/go.sum b/receiver/awsecscontainermetricsreceiver/go.sum index 016b08c55fc2..bd6938f2cdac 100644 --- a/receiver/awsecscontainermetricsreceiver/go.sum +++ b/receiver/awsecscontainermetricsreceiver/go.sum @@ -182,12 +182,12 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/awsfirehosereceiver/README.md b/receiver/awsfirehosereceiver/README.md index e45a8d5a476c..912eddc7e9fe 100644 --- a/receiver/awsfirehosereceiver/README.md +++ b/receiver/awsfirehosereceiver/README.md @@ -44,8 +44,8 @@ See the [Record Types](#record-types) section for all available options. The access key to be checked on each request received. This can be set when creating or updating the delivery stream. See [documentation](https://docs.aws.amazon.com/firehose/latest/dev/create-destination.html#create-destination-http) for details. -##Record Types +## Record Types ### cwmetrics The record type for the CloudWatch metric stream. Expects the format for the records to be JSON. -See [documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Metric-Streams.html) for details. \ No newline at end of file +See [documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Metric-Streams.html) for details. diff --git a/receiver/awsfirehosereceiver/go.mod b/receiver/awsfirehosereceiver/go.mod index f040f72fc2a2..f19993e42927 100644 --- a/receiver/awsfirehosereceiver/go.mod +++ b/receiver/awsfirehosereceiver/go.mod @@ -4,9 +4,9 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/receiver/awsfirehosereceiver/go.sum b/receiver/awsfirehosereceiver/go.sum index e25e88eed60d..f0d89b0cd7c4 100644 --- a/receiver/awsfirehosereceiver/go.sum +++ b/receiver/awsfirehosereceiver/go.sum @@ -189,12 +189,12 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/awsxrayreceiver/factory_test.go b/receiver/awsxrayreceiver/factory_test.go index a134391594aa..bca64a08ddb0 100644 --- a/receiver/awsxrayreceiver/factory_test.go +++ b/receiver/awsxrayreceiver/factory_test.go @@ -16,9 +16,7 @@ package awsxrayreceiver import ( "context" - "os" "runtime" - "strings" "testing" "github.com/stretchr/testify/assert" @@ -46,9 +44,7 @@ func TestCreateTracesReceiver(t *testing.T) { t.Skip() } - env := stashEnv() - defer restoreEnv(env) - os.Setenv(defaultRegionEnvName, mockRegion) + t.Setenv(defaultRegionEnvName, mockRegion) factory := NewFactory() _, err := factory.CreateTracesReceiver( @@ -71,19 +67,3 @@ func TestCreateMetricsReceiver(t *testing.T) { assert.NotNil(t, err, "a trace receiver factory should not create a metric receiver") assert.ErrorIs(t, err, component.ErrDataTypeIsNotSupported) } - -func stashEnv() []string { - env := os.Environ() - os.Clearenv() - - return env -} - -func restoreEnv(env []string) { - os.Clearenv() - - for _, e := range env { - p := strings.SplitN(e, "=", 2) - os.Setenv(p[0], p[1]) - } -} diff --git a/receiver/awsxrayreceiver/go.mod b/receiver/awsxrayreceiver/go.mod index 7975ef15bcec..fccd86837ef4 100644 --- a/receiver/awsxrayreceiver/go.mod +++ b/receiver/awsxrayreceiver/go.mod @@ -3,14 +3,15 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxra go 1.17 require ( - github.com/aws/aws-sdk-go v1.44.28 + github.com/aws/aws-sdk-go v1.44.33 github.com/google/uuid v1.3.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/xray v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 + go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) @@ -35,7 +36,6 @@ require ( go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect go.uber.org/atomic v1.9.0 // indirect - go.uber.org/multierr v1.8.0 // indirect golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect golang.org/x/sys v0.0.0-20220412211240-33da011f77ad // indirect golang.org/x/text v0.3.7 // indirect @@ -47,7 +47,7 @@ require ( require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.opentelemetry.io/otel/sdk v1.7.0 // indirect ) diff --git a/receiver/awsxrayreceiver/go.sum b/receiver/awsxrayreceiver/go.sum index 7372e54a12a7..661f650f303a 100644 --- a/receiver/awsxrayreceiver/go.sum +++ b/receiver/awsxrayreceiver/go.sum @@ -5,8 +5,8 @@ github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAE github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -188,12 +188,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/awsxrayreceiver/internal/udppoller/poller.go b/receiver/awsxrayreceiver/internal/udppoller/poller.go index f2e0597a4c43..5887728e4634 100644 --- a/receiver/awsxrayreceiver/internal/udppoller/poller.go +++ b/receiver/awsxrayreceiver/internal/udppoller/poller.go @@ -153,14 +153,13 @@ func (p *poller) read(buf *[]byte) (int, error) { if err == nil { return rlen, nil } - switch terr := err.(type) { - case net.Error: - if !terr.Timeout() { - return -1, fmt.Errorf("read from UDP socket: %w", &recvErr.ErrIrrecoverable{Err: terr}) + var netErr net.Error + if errors.As(err, &netErr) { + if !netErr.Timeout() { + return -1, fmt.Errorf("read from UDP socket: %w", &recvErr.ErrIrrecoverable{Err: netErr}) } - default: - return 0, fmt.Errorf("read from UDP socket: %w", &recvErr.ErrRecoverable{Err: terr}) } + return 0, fmt.Errorf("read from UDP socket: %w", &recvErr.ErrRecoverable{Err: err}) } diff --git a/receiver/awsxrayreceiver/receiver.go b/receiver/awsxrayreceiver/receiver.go index 6bfd2f7068d0..db8c85a602a4 100644 --- a/receiver/awsxrayreceiver/receiver.go +++ b/receiver/awsxrayreceiver/receiver.go @@ -23,6 +23,7 @@ import ( "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/obsreport" + "go.uber.org/multierr" "go.uber.org/zap" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/proxy" @@ -102,16 +103,11 @@ func (x *xrayReceiver) Start(ctx context.Context, host component.Host) error { func (x *xrayReceiver) Shutdown(ctx context.Context) error { var err error if pollerErr := x.poller.Close(); pollerErr != nil { - err = pollerErr + err = fmt.Errorf("failed to close poller: %w", pollerErr) } if proxyErr := x.server.Shutdown(ctx); proxyErr != nil { - if err == nil { - err = proxyErr - } else { - err = fmt.Errorf("failed to close proxy: %s: failed to close poller: %s", - proxyErr.Error(), err.Error()) - } + err = multierr.Append(err, fmt.Errorf("failed to close proxy: %w", proxyErr)) } return err } diff --git a/receiver/awsxrayreceiver/receiver_test.go b/receiver/awsxrayreceiver/receiver_test.go index ce61001dfdf2..fd4ec387bcf4 100644 --- a/receiver/awsxrayreceiver/receiver_test.go +++ b/receiver/awsxrayreceiver/receiver_test.go @@ -21,7 +21,6 @@ import ( "fmt" "io/ioutil" "net" - "os" "path/filepath" "runtime" "strings" @@ -123,9 +122,7 @@ func TestSegmentsPassedToConsumer(t *testing.T) { assert.NoError(t, err, "SetupTelemetry should succeed") defer tt.Shutdown(context.Background()) - env := stashEnv() - defer restoreEnv(env) - os.Setenv(defaultRegionEnvName, mockRegion) + t.Setenv(defaultRegionEnvName, mockRegion) receiverID := config.NewComponentID("TestSegmentsPassedToConsumer") @@ -153,9 +150,7 @@ func TestTranslatorErrorsOut(t *testing.T) { assert.NoError(t, err, "SetupTelemetry should succeed") defer tt.Shutdown(context.Background()) - env := stashEnv() - defer restoreEnv(env) - os.Setenv(defaultRegionEnvName, mockRegion) + t.Setenv(defaultRegionEnvName, mockRegion) receiverID := config.NewComponentID("TestTranslatorErrorsOut") @@ -179,9 +174,7 @@ func TestSegmentsConsumerErrorsOut(t *testing.T) { assert.NoError(t, err, "SetupTelemetry should succeed") defer tt.Shutdown(context.Background()) - env := stashEnv() - defer restoreEnv(env) - os.Setenv(defaultRegionEnvName, mockRegion) + t.Setenv(defaultRegionEnvName, mockRegion) receiverID := config.NewComponentID("TestSegmentsConsumerErrorsOut") @@ -209,16 +202,14 @@ func TestPollerCloseError(t *testing.T) { assert.NoError(t, err, "SetupTelemetry should succeed") defer tt.Shutdown(context.Background()) - env := stashEnv() - defer restoreEnv(env) - os.Setenv(defaultRegionEnvName, mockRegion) + t.Setenv(defaultRegionEnvName, mockRegion) _, rcvr, _ := createAndOptionallyStartReceiver(t, config.NewComponentID("TestPollerCloseError"), nil, false, tt.ToReceiverCreateSettings()) mPoller := &mockPoller{closeErr: errors.New("mockPollerCloseErr")} rcvr.(*xrayReceiver).poller = mPoller rcvr.(*xrayReceiver).server = &mockProxy{} err = rcvr.Shutdown(context.Background()) - assert.EqualError(t, err, mPoller.closeErr.Error(), "expected error") + assert.ErrorIs(t, err, mPoller.closeErr, "expected error") } func TestProxyCloseError(t *testing.T) { @@ -226,16 +217,14 @@ func TestProxyCloseError(t *testing.T) { assert.NoError(t, err, "SetupTelemetry should succeed") defer tt.Shutdown(context.Background()) - env := stashEnv() - defer restoreEnv(env) - os.Setenv(defaultRegionEnvName, mockRegion) + t.Setenv(defaultRegionEnvName, mockRegion) _, rcvr, _ := createAndOptionallyStartReceiver(t, config.NewComponentID("TestPollerCloseError"), nil, false, tt.ToReceiverCreateSettings()) mProxy := &mockProxy{closeErr: errors.New("mockProxyCloseErr")} rcvr.(*xrayReceiver).poller = &mockPoller{} rcvr.(*xrayReceiver).server = mProxy err = rcvr.Shutdown(context.Background()) - assert.EqualError(t, err, mProxy.closeErr.Error(), "expected error") + assert.ErrorIs(t, err, mProxy.closeErr, "expected error") } func TestBothPollerAndProxyCloseError(t *testing.T) { @@ -243,9 +232,7 @@ func TestBothPollerAndProxyCloseError(t *testing.T) { assert.NoError(t, err, "SetupTelemetry should succeed") defer tt.Shutdown(context.Background()) - env := stashEnv() - defer restoreEnv(env) - os.Setenv(defaultRegionEnvName, mockRegion) + t.Setenv(defaultRegionEnvName, mockRegion) _, rcvr, _ := createAndOptionallyStartReceiver(t, config.NewComponentID("TestBothPollerAndProxyCloseError"), nil, false, tt.ToReceiverCreateSettings()) mPoller := &mockPoller{closeErr: errors.New("mockPollerCloseErr")} @@ -253,10 +240,8 @@ func TestBothPollerAndProxyCloseError(t *testing.T) { rcvr.(*xrayReceiver).poller = mPoller rcvr.(*xrayReceiver).server = mProxy err = rcvr.Shutdown(context.Background()) - assert.EqualError(t, err, - fmt.Sprintf("failed to close proxy: %s: failed to close poller: %s", - mProxy.closeErr.Error(), mPoller.closeErr.Error()), - "expected error") + assert.ErrorIs(t, err, mPoller.closeErr, "expected error") + assert.ErrorIs(t, err, mProxy.closeErr, "expected error") } type mockPoller struct { diff --git a/receiver/bigipreceiver/config_test.go b/receiver/bigipreceiver/config_test.go index 967508266847..45776fcd0425 100644 --- a/receiver/bigipreceiver/config_test.go +++ b/receiver/bigipreceiver/config_test.go @@ -17,10 +17,14 @@ package bigipreceiver // import "github.com/open-telemetry/opentelemetry-collect import ( "errors" "fmt" + "path/filepath" "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/service/servicetest" "go.uber.org/multierr" ) @@ -124,3 +128,23 @@ func TestValidate(t *testing.T) { }) } } + +func TestLoadConfig(t *testing.T) { + factories, err := componenttest.NopFactories() + require.Nil(t, err) + + factory := NewFactory() + factories.Receivers[typeStr] = factory + cfg, err := servicetest.LoadConfigAndValidate(filepath.Join("testdata", "config.yaml"), factories) + require.NoError(t, err) + require.NotNil(t, cfg) + + require.Equal(t, len(cfg.Receivers), 1) + + expected := factory.CreateDefaultConfig().(*Config) + expected.Username = "otelu" + expected.Password = "$BIGIP_PASSWORD" + expected.TLSSetting.InsecureSkipVerify = true + + require.Equal(t, expected, cfg.Receivers[config.NewComponentID("bigip")]) +} diff --git a/receiver/bigipreceiver/go.mod b/receiver/bigipreceiver/go.mod index 0e873008a88b..d3aab9b1a978 100644 --- a/receiver/bigipreceiver/go.mod +++ b/receiver/bigipreceiver/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/receiver/bigipreceiver/go.sum b/receiver/bigipreceiver/go.sum index d9bcbfdd3e44..aa9f34dbfa77 100644 --- a/receiver/bigipreceiver/go.sum +++ b/receiver/bigipreceiver/go.sum @@ -194,10 +194,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/bigipreceiver/scraper.go b/receiver/bigipreceiver/scraper.go index e6826b61c2e8..0d46caded577 100644 --- a/receiver/bigipreceiver/scraper.go +++ b/receiver/bigipreceiver/scraper.go @@ -109,7 +109,7 @@ func (s *bigipScraper) scrape(ctx context.Context) (pmetric.Metrics, error) { // scrape metrics for pool members poolMembers, err := s.client.GetPoolMembers(ctx, pools) - if err == errCollectedNoPoolMembers { + if errors.Is(err, errCollectedNoPoolMembers) { scrapeErrors.AddPartial(1, err) s.logger.Warn("Failed to scrape pool member metrics", zap.Error(err)) } else { diff --git a/receiver/bigipreceiver/testdata/config.yaml b/receiver/bigipreceiver/testdata/config.yaml new file mode 100644 index 000000000000..56d362abc7f3 --- /dev/null +++ b/receiver/bigipreceiver/testdata/config.yaml @@ -0,0 +1,21 @@ +receivers: + bigip: + collection_interval: 10s + endpoint: https://localhost:443 + username: otelu + password: $BIGIP_PASSWORD + tls: + insecure_skip_verify: true + +processors: + nop: + +exporters: + nop: + +service: + pipelines: + metrics: + receivers: [bigip] + processors: [nop] + exporters: [nop] diff --git a/receiver/carbonreceiver/config.go b/receiver/carbonreceiver/config.go index b44c2644a3fd..089a2203ec42 100644 --- a/receiver/carbonreceiver/config.go +++ b/receiver/carbonreceiver/config.go @@ -69,11 +69,7 @@ func (cfg *Config) Unmarshal(componentParser *confmap.Conf) error { } if err := protocol.LoadParserConfig(vParserCfg, cfg.Parser); err != nil { - return fmt.Errorf( - "error on %q section for %s: %v", - parserConfigSection, - cfg.ID().String(), - err) + return fmt.Errorf("error on %q section for %s: %w", parserConfigSection, cfg.ID().String(), err) } // Unmarshal exact to validate the config keys. diff --git a/receiver/carbonreceiver/go.mod b/receiver/carbonreceiver/go.mod index de8ad71bf4ab..c678725b53a9 100644 --- a/receiver/carbonreceiver/go.mod +++ b/receiver/carbonreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.28.0 @@ -30,8 +30,8 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/sdk v1.7.0 // indirect diff --git a/receiver/carbonreceiver/go.sum b/receiver/carbonreceiver/go.sum index cab9bd78136e..902c4ca8776f 100644 --- a/receiver/carbonreceiver/go.sum +++ b/receiver/carbonreceiver/go.sum @@ -183,12 +183,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/carbonreceiver/protocol/path_parser_helper.go b/receiver/carbonreceiver/protocol/path_parser_helper.go index 84fce3d0cf47..4c13f39e901a 100644 --- a/receiver/carbonreceiver/protocol/path_parser_helper.go +++ b/receiver/carbonreceiver/protocol/path_parser_helper.go @@ -111,12 +111,12 @@ func (pph *PathParserHelper) Parse(line string) (*metricspb.Metric, error) { parsedPath := ParsedPath{} err := pph.pathParser.ParsePath(path, &parsedPath) if err != nil { - return nil, fmt.Errorf("invalid carbon metric [%s]: %v", line, err) + return nil, fmt.Errorf("invalid carbon metric [%s]: %w", line, err) } unixTime, err := strconv.ParseInt(timestampStr, 10, 64) if err != nil { - return nil, fmt.Errorf("invalid carbon metric time [%s]: %v", line, err) + return nil, fmt.Errorf("invalid carbon metric time [%s]: %w", line, err) } var metricType metricspb.MetricDescriptor_Type @@ -134,7 +134,7 @@ func (pph *PathParserHelper) Parse(line string) (*metricspb.Metric, error) { } else { dblVal, err := strconv.ParseFloat(valueStr, 64) if err != nil { - return nil, fmt.Errorf("invalid carbon metric value [%s]: %v", line, err) + return nil, fmt.Errorf("invalid carbon metric value [%s]: %w", line, err) } if parsedPath.MetricType == CumulativeMetricType { metricType = metricspb.MetricDescriptor_CUMULATIVE_DOUBLE diff --git a/receiver/carbonreceiver/protocol/regex_parser.go b/receiver/carbonreceiver/protocol/regex_parser.go index 2627f20a700b..4232a5b2ae13 100644 --- a/receiver/carbonreceiver/protocol/regex_parser.go +++ b/receiver/carbonreceiver/protocol/regex_parser.go @@ -123,7 +123,7 @@ func compileRegexRules(rules []*RegexRule) error { for i, r := range rules { regex, err := regexp.Compile(r.Regexp) if err != nil { - return fmt.Errorf("error compiling %d-th rule: %v", i, err) + return fmt.Errorf("error compiling %d-th rule: %w", i, err) } switch TargetMetricType(r.MetricType) { diff --git a/receiver/carbonreceiver/transport/tcp_server.go b/receiver/carbonreceiver/transport/tcp_server.go index 9e5e95225bf2..0b7593893381 100644 --- a/receiver/carbonreceiver/transport/tcp_server.go +++ b/receiver/carbonreceiver/transport/tcp_server.go @@ -17,6 +17,7 @@ package transport // import "github.com/open-telemetry/opentelemetry-collector-c import ( "bufio" "context" + "errors" "fmt" "io" "net" @@ -102,7 +103,8 @@ func (t *tcpServer) ListenAndServe( continue } - if netErr, ok := acceptErr.(net.Error); ok { + var netErr net.Error + if errors.As(acceptErr, &netErr) { t.reporter.OnDebugf( "TCP Transport (%s) - Accept (temporary=%v) net.Error: %v", t.ln.Addr().String(), @@ -196,11 +198,9 @@ func (t *tcpServer) handleConnection( } } - if netErr, ok := err.(*net.OpError); ok { - t.reporter.OnDebugf( - "TCP Transport (%s) - net.OpError: %v", - t.ln.Addr(), - netErr) + netErr := &net.OpError{} + if errors.As(err, &netErr) { + t.reporter.OnDebugf("TCP Transport (%s) - net.OpError: %v", t.ln.Addr(), netErr) if !netErr.Temporary() || netErr.Timeout() { // We want to end on timeout so idle connections are purged. span.End() @@ -208,7 +208,7 @@ func (t *tcpServer) handleConnection( } } - if err == io.EOF { + if errors.Is(err, io.EOF) { t.reporter.OnDebugf( "TCP Transport (%s) - error: %v", t.ln.Addr(), diff --git a/receiver/carbonreceiver/transport/udp_server.go b/receiver/carbonreceiver/transport/udp_server.go index 2a91a6a7d6fc..60a62f3af0e7 100644 --- a/receiver/carbonreceiver/transport/udp_server.go +++ b/receiver/carbonreceiver/transport/udp_server.go @@ -17,6 +17,7 @@ package transport // import "github.com/open-telemetry/opentelemetry-collector-c import ( "bytes" "context" + "errors" "io" "net" "strings" @@ -78,7 +79,8 @@ func (u *udpServer) ListenAndServe( "UDP Transport (%s) - ReadFrom error: %v", u.packetConn.LocalAddr(), err) - if netErr, ok := err.(net.Error); ok { + var netErr net.Error + if errors.As(err, &netErr) { if netErr.Temporary() { // nolint SA1019 continue } @@ -105,7 +107,7 @@ func (u *udpServer) handlePacket( buf := bytes.NewBuffer(data) for { bytes, err := buf.ReadBytes((byte)('\n')) - if err == io.EOF { + if errors.Is(err, io.EOF) { if len(bytes) == 0 { // Completed without errors. break diff --git a/receiver/cloudfoundryreceiver/README.md b/receiver/cloudfoundryreceiver/README.md index 84b1458a2837..8b3bbb34ddb7 100644 --- a/receiver/cloudfoundryreceiver/README.md +++ b/receiver/cloudfoundryreceiver/README.md @@ -1,5 +1,11 @@ # Cloud Foundry Receiver +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | + The Cloud Foundry receiver connects to the RLP (Reverse Log Proxy) Gateway of the Cloud Foundry installation, typically available at the URL `https://log-stream.`. @@ -97,4 +103,7 @@ provide the GUID and name of application, space and organization respectively. This might not be a comprehensive list of attributes, as the receiver passes on whatever attributes the gateway provides, which may include some that are specific to TAS and possibly new ones in future Cloud Foundry versions as -well. \ No newline at end of file +well. + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib \ No newline at end of file diff --git a/receiver/cloudfoundryreceiver/config.go b/receiver/cloudfoundryreceiver/config.go index d5cfa15921c9..63c0e09d5fbf 100644 --- a/receiver/cloudfoundryreceiver/config.go +++ b/receiver/cloudfoundryreceiver/config.go @@ -82,7 +82,7 @@ func validateURLOption(name string, value string) error { _, err := url.Parse(value) if err != nil { - return fmt.Errorf("failed to parse %s as url: %v", name, err) + return fmt.Errorf("failed to parse %s as url: %w", name, err) } return nil diff --git a/receiver/cloudfoundryreceiver/go.mod b/receiver/cloudfoundryreceiver/go.mod index 09686b316ddf..26092c0b3b1a 100644 --- a/receiver/cloudfoundryreceiver/go.mod +++ b/receiver/cloudfoundryreceiver/go.mod @@ -6,8 +6,8 @@ require ( code.cloudfoundry.org/go-loggregator v7.4.0+incompatible github.com/cloudfoundry-incubator/uaago v0.0.0-20190307164349-8136b7bbe76e github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/receiver/cloudfoundryreceiver/go.sum b/receiver/cloudfoundryreceiver/go.sum index 0087847a6e0e..f70a5d025fef 100644 --- a/receiver/cloudfoundryreceiver/go.sum +++ b/receiver/cloudfoundryreceiver/go.sum @@ -221,10 +221,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/cloudfoundryreceiver/receiver.go b/receiver/cloudfoundryreceiver/receiver.go index 404f1e8036b8..2b2fddeeac51 100644 --- a/receiver/cloudfoundryreceiver/receiver.go +++ b/receiver/cloudfoundryreceiver/receiver.go @@ -73,7 +73,7 @@ func newCloudFoundryReceiver( func (cfr *cloudFoundryReceiver) Start(ctx context.Context, host component.Host) error { tokenProvider, tokenErr := newUAATokenProvider(cfr.settings.Logger, cfr.config.UAA.LimitedHTTPClientSettings, cfr.config.UAA.Username, cfr.config.UAA.Password) if tokenErr != nil { - return fmt.Errorf("create cloud foundry UAA token provider: %v", tokenErr) + return fmt.Errorf("create cloud foundry UAA token provider: %w", tokenErr) } streamFactory, streamErr := newEnvelopeStreamFactory( @@ -83,7 +83,7 @@ func (cfr *cloudFoundryReceiver) Start(ctx context.Context, host component.Host) host, ) if streamErr != nil { - return fmt.Errorf("creating cloud foundry RLP envelope stream factory: %v", streamErr) + return fmt.Errorf("creating cloud foundry RLP envelope stream factory: %w", streamErr) } innerCtx, cancel := context.WithCancel(context.Background()) @@ -97,13 +97,13 @@ func (cfr *cloudFoundryReceiver) Start(ctx context.Context, host component.Host) _, tokenErr = tokenProvider.ProvideToken() if tokenErr != nil { - host.ReportFatalError(fmt.Errorf("cloud foundry receiver failed to fetch initial token from UAA: %v", tokenErr)) + host.ReportFatalError(fmt.Errorf("cloud foundry receiver failed to fetch initial token from UAA: %w", tokenErr)) return } envelopeStream, err := streamFactory.CreateStream(innerCtx, cfr.config.RLPGateway.ShardID) if err != nil { - host.ReportFatalError(fmt.Errorf("creating RLP gateway envelope stream: %v", err)) + host.ReportFatalError(fmt.Errorf("creating RLP gateway envelope stream: %w", err)) return } diff --git a/receiver/cloudfoundryreceiver/stream.go b/receiver/cloudfoundryreceiver/stream.go index 91f359feae08..47590f7bf6e8 100644 --- a/receiver/cloudfoundryreceiver/stream.go +++ b/receiver/cloudfoundryreceiver/stream.go @@ -40,7 +40,7 @@ func newEnvelopeStreamFactory( httpClient, err := httpConfig.ToClient(host.GetExtensions(), settings) if err != nil { - return nil, fmt.Errorf("creating HTTP client for Cloud Foundry RLP Gateway: %v", err) + return nil, fmt.Errorf("creating HTTP client for Cloud Foundry RLP Gateway: %w", err) } gatewayClient := loggregator.NewRLPGatewayClient(httpConfig.Endpoint, diff --git a/receiver/cloudfoundryreceiver/uaa.go b/receiver/cloudfoundryreceiver/uaa.go index c3c7645d5084..f32fa7c5be9f 100644 --- a/receiver/cloudfoundryreceiver/uaa.go +++ b/receiver/cloudfoundryreceiver/uaa.go @@ -78,7 +78,7 @@ func (utp *UAATokenProvider) ProvideToken() (string, error) { token, expiresInSeconds, err := utp.client.GetAuthTokenWithExpiresIn(utp.username, utp.password, utp.tlsSkipVerify) if err != nil { - return "", fmt.Errorf("get auth token from UAA: %v", err) + return "", fmt.Errorf("get auth token from UAA: %w", err) } if expiresInSeconds > 0 { diff --git a/receiver/collectdreceiver/collectd.go b/receiver/collectdreceiver/collectd.go index 954d5482f12d..68a9d31626cd 100644 --- a/receiver/collectdreceiver/collectd.go +++ b/receiver/collectdreceiver/collectd.go @@ -95,7 +95,7 @@ func (r *collectDRecord) appendToMetrics(metrics []*metricspb.Metric, defaultLab metric, err := r.newMetric(metricName, dsType, val, labels) if err != nil { - return metrics, fmt.Errorf("error processing metric %s: %v", sanitize.String(metricName), err) + return metrics, fmt.Errorf("error processing metric %s: %w", sanitize.String(metricName), err) } metrics = append(metrics, metric) @@ -108,7 +108,7 @@ func (r *collectDRecord) newMetric(name string, dsType *string, val *json.Number metric := &metricspb.Metric{} point, isDouble, err := r.newPoint(val) if err != nil { - return metric, fmt.Errorf("error processing metric %s: %v", name, err) + return metric, fmt.Errorf("error processing metric %s: %w", name, err) } lKeys, lValues := labelKeysAndValues(labels) @@ -159,7 +159,7 @@ func (r *collectDRecord) newPoint(val *json.Number) (*metricspb.Point, bool, err } else { v, err := val.Float64() if err != nil { - return nil, isDouble, fmt.Errorf("value could not be decoded: %v", err) + return nil, isDouble, fmt.Errorf("value could not be decoded: %w", err) } p.Value = &metricspb.Point_DoubleValue{DoubleValue: v} } diff --git a/receiver/collectdreceiver/go.mod b/receiver/collectdreceiver/go.mod index 31bc67e3b078..158826fbe734 100644 --- a/receiver/collectdreceiver/go.mod +++ b/receiver/collectdreceiver/go.mod @@ -8,7 +8,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.28.0 ) @@ -28,8 +28,8 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/receiver/collectdreceiver/go.sum b/receiver/collectdreceiver/go.sum index e124d7669c0b..645d0226c243 100644 --- a/receiver/collectdreceiver/go.sum +++ b/receiver/collectdreceiver/go.sum @@ -181,12 +181,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/collectdreceiver/receiver.go b/receiver/collectdreceiver/receiver.go index 23689b35be3d..9aa8c567cf22 100644 --- a/receiver/collectdreceiver/receiver.go +++ b/receiver/collectdreceiver/receiver.go @@ -74,7 +74,7 @@ func newCollectdReceiver( func (cdr *collectdReceiver) Start(_ context.Context, host component.Host) error { go func() { if err := cdr.server.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) && err != nil { - host.ReportFatalError(fmt.Errorf("error starting collectd receiver: %v", err)) + host.ReportFatalError(fmt.Errorf("error starting collectd receiver: %w", err)) } }() return nil diff --git a/receiver/collectdreceiver/receiver_test.go b/receiver/collectdreceiver/receiver_test.go index d44e5834a4f1..9b86e3016c11 100644 --- a/receiver/collectdreceiver/receiver_test.go +++ b/receiver/collectdreceiver/receiver_test.go @@ -76,10 +76,7 @@ func TestNewReceiver(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { _, err := newCollectdReceiver(logger, tt.args.addr, time.Second*10, "", tt.args.nextConsumer) - if err != tt.wantErr { - t.Errorf("newCollectdReceiver() error = %v, wantErr %v", err, tt.wantErr) - return - } + require.ErrorIs(t, err, tt.wantErr) }) } } diff --git a/receiver/couchdbreceiver/go.mod b/receiver/couchdbreceiver/go.mod index 165074ea0194..e430c25ed25c 100644 --- a/receiver/couchdbreceiver/go.mod +++ b/receiver/couchdbreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/couchd go 1.17 require ( - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 ) @@ -11,7 +11,7 @@ require github.com/stretchr/testify v1.7.2 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/receiver/couchdbreceiver/go.sum b/receiver/couchdbreceiver/go.sum index 0bb99a58471c..04b29c57e582 100644 --- a/receiver/couchdbreceiver/go.sum +++ b/receiver/couchdbreceiver/go.sum @@ -197,10 +197,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/dockerstatsreceiver/README.md b/receiver/dockerstatsreceiver/README.md index a3db4bef394d..7d41482e0892 100644 --- a/receiver/dockerstatsreceiver/README.md +++ b/receiver/dockerstatsreceiver/README.md @@ -1,12 +1,16 @@ # Docker Stats Receiver +| Status | | +| ------------------------ |-----------| +| Stability | [alpha] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | + The Docker Stats receiver queries the local Docker daemon's container stats API for all desired running containers on a configured interval. These stats are for container resource usage of cpu, memory, network, and the [blkio controller](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). -Supported pipeline types: metrics - > :information_source: Requires Docker API version 1.22+ and only Linux is supported. ## Configuration @@ -58,3 +62,6 @@ receivers: The full list of settings exposed for this receiver are documented [here](./config.go) with detailed sample configurations [here](./testdata/config.yaml). + +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/dockerstatsreceiver/go.mod b/receiver/dockerstatsreceiver/go.mod index 8ac9c34c42d6..f3d34df85104 100644 --- a/receiver/dockerstatsreceiver/go.mod +++ b/receiver/dockerstatsreceiver/go.mod @@ -3,13 +3,13 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/docker go 1.17 require ( - github.com/docker/docker v20.10.16+incompatible + github.com/docker/docker v20.10.17+incompatible github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/docker v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/receiver/dockerstatsreceiver/go.sum b/receiver/dockerstatsreceiver/go.sum index bb6b4c3cc6c2..e3b88f86b1e3 100644 --- a/receiver/dockerstatsreceiver/go.sum +++ b/receiver/dockerstatsreceiver/go.sum @@ -43,8 +43,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.0-beta.1+incompatible h1:9MjVa+OTMHm4C0kKZB68jPlDM9Cg75ta4i46Gxxxn8o= github.com/docker/distribution v2.8.0-beta.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -218,12 +218,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/dotnetdiagnosticsreceiver/README.md b/receiver/dotnetdiagnosticsreceiver/README.md index 5c077fc8b116..1e755df88823 100644 --- a/receiver/dotnetdiagnosticsreceiver/README.md +++ b/receiver/dotnetdiagnosticsreceiver/README.md @@ -1,5 +1,11 @@ ## Dotnet Diagnostics Receiver +| Status | | +| ------------------------ |------------| +| Stability | [alpha] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | + This receiver provides a capability similar to the [dotnet-counters](https://docs.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-counters) tool, which takes a .NET process ID and reads metrics from that process, @@ -109,3 +115,6 @@ This receiver is _beta_. It has been tested on macOS and Linux with .NET v3.1. https://github.com/dotnet/diagnostics/blob/master/documentation/design-docs/ipc-protocol.md https://github.com/Microsoft/perfview/blob/main/src/TraceEvent/EventPipe/EventPipeFormat.md + +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/dotnetdiagnosticsreceiver/go.mod b/receiver/dotnetdiagnosticsreceiver/go.mod index e215fe8940dd..e6bccb601d49 100644 --- a/receiver/dotnetdiagnosticsreceiver/go.mod +++ b/receiver/dotnetdiagnosticsreceiver/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/receiver/dotnetdiagnosticsreceiver/go.sum b/receiver/dotnetdiagnosticsreceiver/go.sum index 1c441c552618..b4998ff2ba68 100644 --- a/receiver/dotnetdiagnosticsreceiver/go.sum +++ b/receiver/dotnetdiagnosticsreceiver/go.sum @@ -188,10 +188,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/elasticsearchreceiver/go.mod b/receiver/elasticsearchreceiver/go.mod index 12959666cbe1..d94ffb62eb05 100644 --- a/receiver/elasticsearchreceiver/go.mod +++ b/receiver/elasticsearchreceiver/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) @@ -20,7 +20,7 @@ require ( github.com/containerd/containerd v1.5.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.11+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect @@ -73,7 +73,7 @@ require ( require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect ) diff --git a/receiver/elasticsearchreceiver/go.sum b/receiver/elasticsearchreceiver/go.sum index 9e2e712f16d6..9cd382c81cc1 100644 --- a/receiver/elasticsearchreceiver/go.sum +++ b/receiver/elasticsearchreceiver/go.sum @@ -252,8 +252,9 @@ github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TT github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.11+incompatible h1:OqzI/g/W54LczvhnccGqniFoQghHx3pklbLuhfXpqGo= github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -405,7 +406,6 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.7.2 h1:zoNxOV7WjqXptQOVngLmcSQgXmgk4NMz1HibBchjl/I= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -742,10 +742,10 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/expvarreceiver/config.go b/receiver/expvarreceiver/config.go index 78d9c9b13dd7..42b848adb20c 100644 --- a/receiver/expvarreceiver/config.go +++ b/receiver/expvarreceiver/config.go @@ -36,7 +36,7 @@ var _ config.Receiver = (*Config)(nil) func (c *Config) Validate() error { u, err := url.Parse(c.Endpoint) if err != nil { - return fmt.Errorf("endpoint is not a valid URL: %v", err) + return fmt.Errorf("endpoint is not a valid URL: %w", err) } if u.Scheme != "http" && u.Scheme != "https" { return fmt.Errorf("scheme must be 'http' or 'https', but was '%s'", u.Scheme) diff --git a/receiver/expvarreceiver/go.mod b/receiver/expvarreceiver/go.mod index faf526051f99..ec65eb3b3d68 100644 --- a/receiver/expvarreceiver/go.mod +++ b/receiver/expvarreceiver/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/receiver/expvarreceiver/go.sum b/receiver/expvarreceiver/go.sum index c5cbf3b3ba38..3b65bb50811a 100644 --- a/receiver/expvarreceiver/go.sum +++ b/receiver/expvarreceiver/go.sum @@ -190,10 +190,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/expvarreceiver/scraper.go b/receiver/expvarreceiver/scraper.go index c80d5690c801..8c3d06dcbb3d 100644 --- a/receiver/expvarreceiver/scraper.go +++ b/receiver/expvarreceiver/scraper.go @@ -76,7 +76,7 @@ func (e *expVarScraper) scrape(ctx context.Context) (pmetric.Metrics, error) { result, err := decodeResponseBody(resp.Body) if err != nil { - return emptyMetrics, fmt.Errorf("could not decode response body to JSON: %v", err) + return emptyMetrics, fmt.Errorf("could not decode response body to JSON: %w", err) } memStats := result.MemStats if memStats == nil { diff --git a/receiver/filelogreceiver/go.mod b/receiver/filelogreceiver/go.mod index 806608ad4f4c..3b37859d3e84 100644 --- a/receiver/filelogreceiver/go.mod +++ b/receiver/filelogreceiver/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/receiver/filelogreceiver/go.sum b/receiver/filelogreceiver/go.sum index 905a0ea30bf1..7a4391342e96 100644 --- a/receiver/filelogreceiver/go.sum +++ b/receiver/filelogreceiver/go.sum @@ -208,10 +208,10 @@ go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/flinkmetricsreceiver/go.mod b/receiver/flinkmetricsreceiver/go.mod index 716f1c74b20e..be09a12a7007 100644 --- a/receiver/flinkmetricsreceiver/go.mod +++ b/receiver/flinkmetricsreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/stretchr/testify v1.7.2 github.com/testcontainers/testcontainers-go v0.13.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -20,7 +20,7 @@ require ( github.com/containerd/containerd v1.5.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.11+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect diff --git a/receiver/flinkmetricsreceiver/go.sum b/receiver/flinkmetricsreceiver/go.sum index 75a99c65cf8b..cf54aa7f337d 100644 --- a/receiver/flinkmetricsreceiver/go.sum +++ b/receiver/flinkmetricsreceiver/go.sum @@ -252,8 +252,9 @@ github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TT github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.11+incompatible h1:OqzI/g/W54LczvhnccGqniFoQghHx3pklbLuhfXpqGo= github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -404,7 +405,6 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/mux v1.7.2 h1:zoNxOV7WjqXptQOVngLmcSQgXmgk4NMz1HibBchjl/I= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= @@ -741,10 +741,10 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/fluentforwardreceiver/conversion.go b/receiver/fluentforwardreceiver/conversion.go index 5140667342c4..54debc6ef36b 100644 --- a/receiver/fluentforwardreceiver/conversion.go +++ b/receiver/fluentforwardreceiver/conversion.go @@ -17,6 +17,7 @@ package fluentforwardreceiver // import "github.com/open-telemetry/opentelemetry import ( "bytes" "compress/gzip" + "errors" "fmt" "io" "time" @@ -434,7 +435,7 @@ func (pfe *PackedForwardEventLogRecords) parseEntries(entriesRaw []byte, isGzipp lr := plog.NewLogRecord() err := parseEntryToLogRecord(msgpReader, lr) if err != nil { - if msgp.Cause(err) == io.EOF { + if errors.Is(msgp.Cause(err), io.EOF) { return nil } return err diff --git a/receiver/fluentforwardreceiver/go.mod b/receiver/fluentforwardreceiver/go.mod index 83e868e90234..ca91e6675e9c 100644 --- a/receiver/fluentforwardreceiver/go.mod +++ b/receiver/fluentforwardreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/stretchr/testify v1.7.2 github.com/tinylib/msgp v1.1.6 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/receiver/fluentforwardreceiver/go.sum b/receiver/fluentforwardreceiver/go.sum index 923de45de805..2b06bb555d0e 100644 --- a/receiver/fluentforwardreceiver/go.sum +++ b/receiver/fluentforwardreceiver/go.sum @@ -190,10 +190,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/fluentforwardreceiver/heartbeat.go b/receiver/fluentforwardreceiver/heartbeat.go index 2ed1d7a93fdd..bc412a6192c1 100644 --- a/receiver/fluentforwardreceiver/heartbeat.go +++ b/receiver/fluentforwardreceiver/heartbeat.go @@ -16,6 +16,7 @@ package fluentforwardreceiver // import "github.com/open-telemetry/opentelemetry import ( "context" + "errors" "net" "syscall" @@ -33,7 +34,7 @@ func respondToHeartbeats(ctx context.Context, udpSock net.PacketConn, logger *za for { n, addr, err := udpSock.ReadFrom(buf) if err != nil || n == 0 { - if ctx.Err() != nil || err == syscall.EINVAL { + if ctx.Err() != nil || errors.Is(err, syscall.EINVAL) { return } continue diff --git a/receiver/fluentforwardreceiver/server.go b/receiver/fluentforwardreceiver/server.go index 4e607f73f2ef..f7c9bbff5ddd 100644 --- a/receiver/fluentforwardreceiver/server.go +++ b/receiver/fluentforwardreceiver/server.go @@ -77,7 +77,7 @@ func (s *server) handleConnections(ctx context.Context, listener net.Listener) { err := s.handleConn(ctx, conn) if err != nil { - if err == io.EOF { + if errors.Is(err, io.EOF) { s.logger.Debug("Closing connection", zap.String("remoteAddr", conn.RemoteAddr().String()), zap.Error(err)) } else { s.logger.Debug("Unexpected error handling connection", zap.String("remoteAddr", conn.RemoteAddr().String()), zap.Error(err)) @@ -113,10 +113,10 @@ func (s *server) handleConn(ctx context.Context, conn net.Conn) error { err = event.DecodeMsg(reader) if err != nil { - if err != io.EOF { + if !errors.Is(err, io.EOF) { stats.Record(ctx, observ.FailedToParse.M(1)) } - return fmt.Errorf("failed to parse %s mode event: %v", mode.String(), err) + return fmt.Errorf("failed to parse %s mode event: %w", mode.String(), err) } stats.Record(ctx, observ.EventsParsed.M(1)) @@ -130,7 +130,7 @@ func (s *server) handleConn(ctx context.Context, conn net.Conn) error { if event.Chunk() != "" { err := msgp.Encode(conn, AckResponse{Ack: event.Chunk()}) if err != nil { - return fmt.Errorf("failed to acknowledge chunk %s: %v", event.Chunk(), err) + return fmt.Errorf("failed to acknowledge chunk %s: %w", event.Chunk(), err) } } } diff --git a/receiver/googlecloudpubsubreceiver/README.md b/receiver/googlecloudpubsubreceiver/README.md index d8b56913ca3b..a45527a9d0e8 100644 --- a/receiver/googlecloudpubsubreceiver/README.md +++ b/receiver/googlecloudpubsubreceiver/README.md @@ -20,6 +20,10 @@ The following configuration options are supported: a fallback, when no `content-type` attribute is present. * `compression` (Optional): The compression that will be used on received data from the subscription. When set it can only be `gzip`. This will only be used as a fallback, when no `content-encoding` attribute is present. +* `endpoint` (Optional): Override the default Pubsub Endpoint, useful when connecting to the PubSub emulator instance + or switching between [global and regional service endpoints](https://cloud.google.com/pubsub/docs/reference/service_apis_overview#service_endpoints). +* `insecure` (Optional): allows performing β€œinsecure” SSL connections and transfers, useful when connecting to a local + emulator instance. Only has effect if Endpoint is not "" ```yaml receivers: diff --git a/receiver/googlecloudpubsubreceiver/config.go b/receiver/googlecloudpubsubreceiver/config.go index c54cff538c7e..d127352fde99 100644 --- a/receiver/googlecloudpubsubreceiver/config.go +++ b/receiver/googlecloudpubsubreceiver/config.go @@ -31,10 +31,10 @@ type Config struct { ProjectID string `mapstructure:"project"` // User agent that will be used by the Pubsub client to connect to the service UserAgent string `mapstructure:"user_agent"` - // Override of the Pubsub endpoint, for testing only - endpoint string + // Override of the Pubsub Endpoint, leave empty for the default endpoint + Endpoint string `mapstructure:"endpoint"` // Only has effect if Endpoint is not "" - insecure bool + Insecure bool `mapstructure:"insecure"` // Timeout for all API calls. If not set, defaults to 12 seconds. exporterhelper.TimeoutSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct. diff --git a/receiver/googlecloudpubsubreceiver/go.mod b/receiver/googlecloudpubsubreceiver/go.mod index a7cdf84a5c0a..42dca5bfc919 100644 --- a/receiver/googlecloudpubsubreceiver/go.mod +++ b/receiver/googlecloudpubsubreceiver/go.mod @@ -5,12 +5,12 @@ go 1.17 require ( cloud.google.com/go/pubsub v1.22.2 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/zap v1.21.0 - google.golang.org/api v0.82.0 - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 + google.golang.org/api v0.83.0 + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 google.golang.org/grpc v1.47.0 ) @@ -43,7 +43,7 @@ require ( go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect go.uber.org/multierr v1.8.0 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/text v0.3.7 // indirect diff --git a/receiver/googlecloudpubsubreceiver/go.sum b/receiver/googlecloudpubsubreceiver/go.sum index c0d8ebc2f724..190f509fe4bc 100644 --- a/receiver/googlecloudpubsubreceiver/go.sum +++ b/receiver/googlecloudpubsubreceiver/go.sum @@ -326,10 +326,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= @@ -429,8 +429,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= 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-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -463,8 +463,9 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -642,8 +643,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -730,8 +731,8 @@ google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= diff --git a/receiver/googlecloudpubsubreceiver/internal/handler.go b/receiver/googlecloudpubsubreceiver/internal/handler.go index b200ea743fc9..eff176948c74 100644 --- a/receiver/googlecloudpubsubreceiver/internal/handler.go +++ b/receiver/googlecloudpubsubreceiver/internal/handler.go @@ -16,6 +16,7 @@ package internal // import "github.com/open-telemetry/opentelemetry-collector-co import ( "context" + "errors" "fmt" "io" "sync" @@ -168,7 +169,7 @@ func (handler *StreamHandler) requestStream(ctx context.Context, cancel context. timer := time.NewTimer(handler.ackBatchWait) for { if err := handler.acknowledgeMessages(); err != nil { - if err == io.EOF { + if errors.Is(err, io.EOF) { handler.logger.Warn("EOF reached") break } @@ -181,7 +182,7 @@ func (handler *StreamHandler) requestStream(ctx context.Context, cancel context. case <-timer.C: timer.Reset(handler.ackBatchWait) } - if ctx.Err() == context.Canceled { + if errors.Is(ctx.Err(), context.Canceled) { _ = handler.acknowledgeMessages() timer.Stop() break @@ -211,7 +212,7 @@ func (handler *StreamHandler) responseStream(ctx context.Context, cancel context } else { var s, grpcStatus = status.FromError(err) switch { - case err == io.EOF: + case errors.Is(err, io.EOF): activeStreaming = false case !grpcStatus: handler.logger.Warn("response stream breaking on error", @@ -231,7 +232,7 @@ func (handler *StreamHandler) responseStream(ctx context.Context, cancel context activeStreaming = false } } - if ctx.Err() == context.Canceled { + if errors.Is(ctx.Err(), context.Canceled) { // Canceling the loop, collector is probably stopping handler.logger.Warn("response stream ctx.Err() == context.Canceled") break diff --git a/receiver/googlecloudpubsubreceiver/receiver.go b/receiver/googlecloudpubsubreceiver/receiver.go index 55b24a0c20c5..43c6c94c7a72 100644 --- a/receiver/googlecloudpubsubreceiver/receiver.go +++ b/receiver/googlecloudpubsubreceiver/receiver.go @@ -80,16 +80,16 @@ func (receiver *pubsubReceiver) generateClientOptions() (copts []option.ClientOp if receiver.userAgent != "" { copts = append(copts, option.WithUserAgent(receiver.userAgent)) } - if receiver.config.endpoint != "" { - if receiver.config.insecure { + if receiver.config.Endpoint != "" { + if receiver.config.Insecure { var dialOpts []grpc.DialOption if receiver.userAgent != "" { dialOpts = append(dialOpts, grpc.WithUserAgent(receiver.userAgent)) } - conn, _ := grpc.Dial(receiver.config.endpoint, append(dialOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))...) + conn, _ := grpc.Dial(receiver.config.Endpoint, append(dialOpts, grpc.WithTransportCredentials(insecure.NewCredentials()))...) copts = append(copts, option.WithGRPCConn(conn)) } else { - copts = append(copts, option.WithEndpoint(receiver.config.endpoint)) + copts = append(copts, option.WithEndpoint(receiver.config.Endpoint)) } } return copts diff --git a/receiver/googlecloudpubsubreceiver/receiver_test.go b/receiver/googlecloudpubsubreceiver/receiver_test.go index 832462cbd5e3..dacee6d176e3 100644 --- a/receiver/googlecloudpubsubreceiver/receiver_test.go +++ b/receiver/googlecloudpubsubreceiver/receiver_test.go @@ -45,8 +45,8 @@ func TestStartReceiverNoSubscription(t *testing.T) { userAgent: "test-user-agent", config: &Config{ - endpoint: srv.Addr, - insecure: true, + Endpoint: srv.Addr, + Insecure: true, ProjectID: "my-project", TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 12 * time.Second, @@ -95,8 +95,8 @@ func TestReceiver(t *testing.T) { userAgent: "test-user-agent", config: &Config{ - endpoint: srv.Addr, - insecure: true, + Endpoint: srv.Addr, + Insecure: true, ProjectID: "my-project", TimeoutSettings: exporterhelper.TimeoutSettings{ Timeout: 1 * time.Second, diff --git a/receiver/googlecloudspannerreceiver/go.mod b/receiver/googlecloudspannerreceiver/go.mod index 573277ce5270..73aa10746426 100644 --- a/receiver/googlecloudspannerreceiver/go.mod +++ b/receiver/googlecloudspannerreceiver/go.mod @@ -5,22 +5,22 @@ go 1.17 require ( cloud.google.com/go/spanner v1.33.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 - google.golang.org/api v0.82.0 + google.golang.org/api v0.83.0 gopkg.in/yaml.v3 v3.0.1 ) require ( - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 google.golang.org/grpc v1.47.0 ) require ( github.com/ReneKroon/ttlcache/v2 v2.11.0 github.com/mitchellh/hashstructure v1.1.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( @@ -58,9 +58,9 @@ require ( go.opentelemetry.io/otel/trace v1.7.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect - golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 // indirect + golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect diff --git a/receiver/googlecloudspannerreceiver/go.sum b/receiver/googlecloudspannerreceiver/go.sum index 1e434f28957c..945159241123 100644 --- a/receiver/googlecloudspannerreceiver/go.sum +++ b/receiver/googlecloudspannerreceiver/go.sum @@ -345,10 +345,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= @@ -451,8 +451,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -485,8 +485,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -667,8 +667,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.77.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -754,8 +754,8 @@ google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220502173005-c8bf987b8c21/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= diff --git a/receiver/googlecloudspannerreceiver/internal/datasource/database_test.go b/receiver/googlecloudspannerreceiver/internal/datasource/database_test.go index 16d5cbb6fc27..1b748bcd5d3b 100644 --- a/receiver/googlecloudspannerreceiver/internal/datasource/database_test.go +++ b/receiver/googlecloudspannerreceiver/internal/datasource/database_test.go @@ -16,12 +16,10 @@ package datasource import ( "context" - "os" "testing" "cloud.google.com/go/spanner" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestNewDatabaseFromClient(t *testing.T) { @@ -60,13 +58,7 @@ func TestNewDatabaseWithNoCredentialsFilePath(t *testing.T) { ctx := context.Background() databaseID := databaseID() - err := os.Setenv("GOOGLE_APPLICATION_CREDENTIALS", "../../testdata/serviceAccount.json") - require.NoError(t, err) - - defer func() { - err = os.Unsetenv("GOOGLE_APPLICATION_CREDENTIALS") - require.NoError(t, err) - }() + t.Setenv("GOOGLE_APPLICATION_CREDENTIALS", "../../testdata/serviceAccount.json") database, err := NewDatabase(ctx, databaseID, "") diff --git a/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality.go b/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality.go index 4a91d4c6f1f7..934cc5f5d8cd 100644 --- a/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality.go +++ b/receiver/googlecloudspannerreceiver/internal/filter/itemcardinality.go @@ -15,6 +15,7 @@ package filter // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/googlecloudspannerreceiver/internal/filter" import ( + "errors" "fmt" "sort" "time" @@ -127,7 +128,7 @@ func (f *itemCardinalityFilter) filterItems(items []*Item) ([]*Item, error) { func (f *itemCardinalityFilter) includeItem(item *Item, limit *currentLimitByTimestamp) (bool, error) { if _, err := f.cache.Get(item.SeriesKey); err == nil { return true, nil - } else if err != ttlcache.ErrNotFound { + } else if !errors.Is(err, ttlcache.ErrNotFound) { return false, err } @@ -137,7 +138,7 @@ func (f *itemCardinalityFilter) includeItem(item *Item, limit *currentLimitByTim } if err := f.cache.SetWithTTL(item.SeriesKey, struct{}{}, f.itemActivityPeriod); err != nil { - if err == ttlcache.ErrClosed { + if errors.Is(err, ttlcache.ErrClosed) { err = fmt.Errorf("set item from cache failed for metric %q because cache has been already closed: %w", f.metricName, err) } return false, err diff --git a/receiver/googlecloudspannerreceiver/internal/statsreader/currentstatsreader.go b/receiver/googlecloudspannerreceiver/internal/statsreader/currentstatsreader.go index 4ca37b496531..df0cca9c6d34 100644 --- a/receiver/googlecloudspannerreceiver/internal/statsreader/currentstatsreader.go +++ b/receiver/googlecloudspannerreceiver/internal/statsreader/currentstatsreader.go @@ -16,6 +16,7 @@ package statsreader // import "github.com/open-telemetry/opentelemetry-collector import ( "context" + "errors" "fmt" "time" @@ -96,7 +97,7 @@ func (reader *currentStatsReader) pull(ctx context.Context, stmt statsStatement) for { row, err := rowsIterator.Next() if err != nil { - if err == iterator.Done { + if errors.Is(err, iterator.Done) { return collectedDataPoints, nil } return nil, fmt.Errorf("query %q failed with error: %w", stmt.statement.SQL, err) diff --git a/receiver/hostmetricsreceiver/config.go b/receiver/hostmetricsreceiver/config.go index e43489e447c3..2b466ecc5ed8 100644 --- a/receiver/hostmetricsreceiver/config.go +++ b/receiver/hostmetricsreceiver/config.go @@ -81,7 +81,7 @@ func (cfg *Config) Unmarshal(componentParser *confmap.Conf) error { } err = collectorViperSection.UnmarshalExact(collectorCfg) if err != nil { - return fmt.Errorf("error reading settings for scraper type %q: %v", key, err) + return fmt.Errorf("error reading settings for scraper type %q: %w", key, err) } cfg.Scrapers[key] = collectorCfg diff --git a/receiver/hostmetricsreceiver/go.mod b/receiver/hostmetricsreceiver/go.mod index e380aa603f11..3b7716177882 100644 --- a/receiver/hostmetricsreceiver/go.mod +++ b/receiver/hostmetricsreceiver/go.mod @@ -7,9 +7,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 github.com/shirou/gopsutil/v3 v3.22.5 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 golang.org/x/sys v0.0.0-20220412211240-33da011f77ad diff --git a/receiver/hostmetricsreceiver/go.sum b/receiver/hostmetricsreceiver/go.sum index fa9b6b37ec6c..04f0f8a47d67 100644 --- a/receiver/hostmetricsreceiver/go.sum +++ b/receiver/hostmetricsreceiver/go.sum @@ -222,12 +222,12 @@ github.com/yusufpapurcu/wmi v1.2.2 h1:KBNDSne4vP5mbSWnJbO+51IMOXJB67QiYCSBrubbPR github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go index 902e4a232929..18ed92b22558 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/cpu_scraper_test.go @@ -108,7 +108,9 @@ func TestScrape(t *testing.T) { isPartial := scrapererror.IsPartialScrapeError(err) assert.True(t, isPartial) if isPartial { - assert.Equal(t, 2, err.(scrapererror.PartialScrapeError).Failed) + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + assert.Equal(t, 2, scraperErr.Failed) } return diff --git a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_others_test.go b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_others_test.go index 3f0769be0ee8..9530dc7ac246 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_others_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_others_test.go @@ -62,7 +62,9 @@ func TestScrape_Others(t *testing.T) { isPartial := scrapererror.IsPartialScrapeError(err) assert.True(t, isPartial) if isPartial { - assert.Equal(t, metricsLen, err.(scrapererror.PartialScrapeError).Failed) + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + assert.Equal(t, metricsLen, scraperErr.Failed) } }) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_windows_test.go b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_windows_test.go index d29f48e15765..63ecf5c78980 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_windows_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/disk_scraper_windows_test.go @@ -73,7 +73,9 @@ func TestScrape_Error(t *testing.T) { isPartial := scrapererror.IsPartialScrapeError(err) assert.True(t, isPartial) if isPartial { - assert.Equal(t, metricsLen, err.(scrapererror.PartialScrapeError).Failed) + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + assert.Equal(t, metricsLen, scraperErr.Failed) } }) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go index b660e8df8cdf..5fa7927cc7a9 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/filesystem_scraper_test.go @@ -241,7 +241,9 @@ func TestScrape(t *testing.T) { isPartial := scrapererror.IsPartialScrapeError(err) assert.True(t, isPartial) if isPartial { - assert.Equal(t, metricsLen, err.(scrapererror.PartialScrapeError).Failed) + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + assert.Equal(t, metricsLen, scraperErr.Failed) } return diff --git a/receiver/hostmetricsreceiver/internal/scraper/loadscraper/load_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/loadscraper/load_scraper_test.go index 00cce24220aa..cd2bf79114c2 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/loadscraper/load_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/loadscraper/load_scraper_test.go @@ -102,7 +102,9 @@ func TestScrape(t *testing.T) { isPartial := scrapererror.IsPartialScrapeError(err) assert.True(t, isPartial) if isPartial { - assert.Equal(t, metricsLen, err.(scrapererror.PartialScrapeError).Failed) + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + assert.Equal(t, metricsLen, scraperErr.Failed) } return diff --git a/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/memory_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/memory_scraper_test.go index 9b4a06e55ea2..d31296e20cbc 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/memory_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/memory_scraper_test.go @@ -108,7 +108,9 @@ func TestScrape(t *testing.T) { isPartial := scrapererror.IsPartialScrapeError(err) assert.True(t, isPartial) if isPartial { - assert.Equal(t, metricsLen, err.(scrapererror.PartialScrapeError).Failed) + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + assert.Equal(t, metricsLen, scraperErr.Failed) } return diff --git a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_scraper_test.go index 6cfe73863af3..562558f5ce74 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_scraper_test.go @@ -141,7 +141,9 @@ func TestScrape(t *testing.T) { isPartial := scrapererror.IsPartialScrapeError(err) assert.True(t, isPartial) if isPartial { - assert.Equal(t, test.expectedErrCount, err.(scrapererror.PartialScrapeError).Failed) + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + assert.Equal(t, test.expectedErrCount, scraperErr.Failed) } return diff --git a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_others_test.go b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_others_test.go index e3d14a580072..e74996529163 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_others_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_others_test.go @@ -79,7 +79,9 @@ func TestScrape_Errors(t *testing.T) { isPartial := scrapererror.IsPartialScrapeError(err) assert.True(t, isPartial) if isPartial { - assert.Equal(t, test.expectedErrCount, err.(scrapererror.PartialScrapeError).Failed) + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + assert.Equal(t, test.expectedErrCount, scraperErr.Failed) } }) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_windows_test.go b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_windows_test.go index 5bf9db323c39..ee63177c4ff5 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_windows_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/paging_scraper_windows_test.go @@ -126,7 +126,9 @@ func TestScrape_Errors(t *testing.T) { isPartial := scrapererror.IsPartialScrapeError(err) assert.True(t, isPartial) if isPartial { - assert.Equal(t, test.expectedErrCount, err.(scrapererror.PartialScrapeError).Failed) + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + assert.Equal(t, test.expectedErrCount, scraperErr.Failed) } return diff --git a/receiver/hostmetricsreceiver/internal/scraper/processesscraper/processes_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/processesscraper/processes_scraper_test.go index 09be3bceb263..0daef784d786 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processesscraper/processes_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processesscraper/processes_scraper_test.go @@ -24,6 +24,7 @@ import ( "github.com/shirou/gopsutil/v3/load" "github.com/shirou/gopsutil/v3/process" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" @@ -73,12 +74,11 @@ func TestScrape(t *testing.T) { for _, test := range testCases { t.Run(test.name, func(t *testing.T) { - assert := assert.New(t) scraper := newProcessesScraper(context.Background(), componenttest.NewNopReceiverCreateSettings(), &Config{ Metrics: metadata.DefaultMetricsSettings(), }) err := scraper.start(context.Background(), componenttest.NewNopHost()) - assert.NoError(err, "Failed to initialize processes scraper: %v", err) + assert.NoError(t, err, "Failed to initialize processes scraper: %v", err) // Override scraper methods if we are mocking out for this test case if test.getMiscStats != nil { @@ -99,22 +99,24 @@ func TestScrape(t *testing.T) { } if (expectProcessesCountMetric || expectProcessesCreatedMetric) && test.expectedErr != "" { - assert.EqualError(err, test.expectedErr) + assert.EqualError(t, err, test.expectedErr) isPartial := scrapererror.IsPartialScrapeError(err) - assert.Truef(isPartial, "expected partial scrape error, have %+v", err) + assert.Truef(t, isPartial, "expected partial scrape error, have %+v", err) if isPartial { - assert.Equal(expectedMetricCount, err.(scrapererror.PartialScrapeError).Failed) + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + assert.Equal(t, expectedMetricCount, scraperErr.Failed) } return } if test.expectedErr == "" { - assert.NoErrorf(err, "Failed to scrape metrics: %v", err) + assert.NoErrorf(t, err, "Failed to scrape metrics: %v", err) } - assert.Equal(expectedMetricCount, md.MetricCount()) + assert.Equal(t, expectedMetricCount, md.MetricCount()) if expectedMetricCount > 0 { metrics := md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics() @@ -129,13 +131,11 @@ func TestScrape(t *testing.T) { } func validateRealData(t *testing.T, metrics pmetric.MetricSlice) { - assert := assert.New(t) - metricIndex := 0 if expectProcessesCountMetric { countMetric := metrics.At(metricIndex) metricIndex++ - assert.Equal("system.processes.count", countMetric.Name()) + assert.Equal(t, "system.processes.count", countMetric.Name()) assertContainsStatus := func(statusVal string) { points := countMetric.Sum().DataPoints() @@ -145,7 +145,7 @@ func validateRealData(t *testing.T, metrics pmetric.MetricSlice) { return } } - assert.Failf("missing-metric", "metric is missing %q status label", statusVal) + assert.Failf(t, "missing-metric", "metric is missing %q status label", statusVal) } assertContainsStatus(metadata.AttributeStatusRunning.String()) assertContainsStatus(metadata.AttributeStatusBlocked.String()) @@ -153,11 +153,11 @@ func validateRealData(t *testing.T, metrics pmetric.MetricSlice) { if expectProcessesCreatedMetric { createdMetric := metrics.At(metricIndex) - assert.Equal("system.processes.created", createdMetric.Name()) + assert.Equal(t, "system.processes.created", createdMetric.Name()) createdMetric = metrics.At(1) - assert.Equal("system.processes.created", createdMetric.Name()) - assert.Equal(1, createdMetric.Sum().DataPoints().Len()) - assert.Equal(0, createdMetric.Sum().DataPoints().At(0).Attributes().Len()) + assert.Equal(t, "system.processes.created", createdMetric.Name()) + assert.Equal(t, 1, createdMetric.Sum().DataPoints().Len()) + assert.Equal(t, 0, createdMetric.Sum().DataPoints().At(0).Attributes().Len()) } } @@ -198,23 +198,22 @@ func (f fakeProcess) Status() ([]string, error) { } func validateFakeData(t *testing.T, metrics pmetric.MetricSlice) { - assert := assert.New(t) metricIndex := 0 if expectProcessesCountMetric { countMetric := metrics.At(metricIndex) metricIndex++ - assert.Equal("system.processes.count", countMetric.Name()) + assert.Equal(t, "system.processes.count", countMetric.Name()) points := countMetric.Sum().DataPoints() attrs := map[string]int64{} for i := 0; i < points.Len(); i++ { point := points.At(i) val, ok := point.Attributes().Get("status") - assert.Truef(ok, "Missing status attribute in data point %d", i) + assert.Truef(t, ok, "Missing status attribute in data point %d", i) attrs[val.StringVal()] = point.IntVal() } - assert.Equal(attrs, map[string]int64{ + assert.Equal(t, attrs, map[string]int64{ metadata.AttributeStatusBlocked.String(): 3, metadata.AttributeStatusPaging.String(): 1, metadata.AttributeStatusRunning.String(): 2, @@ -227,8 +226,8 @@ func validateFakeData(t *testing.T, metrics pmetric.MetricSlice) { if expectProcessesCreatedMetric { createdMetric := metrics.At(metricIndex) - assert.Equal("system.processes.created", createdMetric.Name()) - assert.Equal(1, createdMetric.Sum().DataPoints().Len()) - assert.Equal(0, createdMetric.Sum().DataPoints().At(0).Attributes().Len()) + assert.Equal(t, "system.processes.created", createdMetric.Name()) + assert.Equal(t, 1, createdMetric.Sum().DataPoints().Len()) + assert.Equal(t, 0, createdMetric.Sum().DataPoints().At(0).Attributes().Len()) } } diff --git a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper.go b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper.go index c25576d9eb38..c90bc149b93b 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper.go @@ -16,6 +16,7 @@ package processscraper // import "github.com/open-telemetry/opentelemetry-collec import ( "context" + "errors" "fmt" "time" @@ -88,8 +89,8 @@ func (s *scraper) scrape(_ context.Context) (pmetric.Metrics, error) { data, err := s.getProcessMetadata() if err != nil { - partialErr, isPartial := err.(scrapererror.PartialScrapeError) - if !isPartial { + var partialErr scrapererror.PartialScrapeError + if !errors.As(err, &partialErr) { return pmetric.NewMetrics(), err } diff --git a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go index a8b5de5bd820..e0a25b1b6f1c 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_test.go @@ -65,7 +65,9 @@ func TestScrape(t *testing.T) { if err != nil { require.True(t, scrapererror.IsPartialScrapeError(err)) noProcessesScraped := md.ResourceMetrics().Len() - noProcessesErrored := err.(scrapererror.PartialScrapeError).Failed + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + noProcessesErrored := scraperErr.Failed require.Lessf(t, 0, noProcessesErrored, "Failed to scrape metrics - : error, but 0 failed process %v", err) require.Lessf(t, 0, noProcessesScraped, "Failed to scrape metrics - : 0 successful scrapes %v", err) } @@ -463,7 +465,9 @@ func TestScrapeMetrics_ProcessErrors(t *testing.T) { assert.True(t, isPartial) if isPartial { expectedFailures := getExpectedScrapeFailures(test.nameError, test.exeError, test.timesError, test.memoryInfoError, test.ioCountersError) - assert.Equal(t, expectedFailures, err.(scrapererror.PartialScrapeError).Failed) + var scraperErr scrapererror.PartialScrapeError + require.ErrorAs(t, err, &scraperErr) + assert.Equal(t, expectedFailures, scraperErr.Failed) } }) } diff --git a/receiver/iisreceiver/go.mod b/receiver/iisreceiver/go.mod index 6e814af1f557..4279086629ac 100644 --- a/receiver/iisreceiver/go.mod +++ b/receiver/iisreceiver/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/receiver/iisreceiver/go.sum b/receiver/iisreceiver/go.sum index 19f6c30fafcf..a732acc4b25a 100644 --- a/receiver/iisreceiver/go.sum +++ b/receiver/iisreceiver/go.sum @@ -180,10 +180,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/influxdbreceiver/go.mod b/receiver/influxdbreceiver/go.mod index f6c72881057a..abffd417a16f 100644 --- a/receiver/influxdbreceiver/go.mod +++ b/receiver/influxdbreceiver/go.mod @@ -7,7 +7,7 @@ require ( github.com/influxdata/influxdb-observability/influx2otel v0.2.21-0.20220517160208-05f925d616de github.com/influxdata/line-protocol/v2 v2.2.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -31,7 +31,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/rs/cors v1.8.2 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect diff --git a/receiver/influxdbreceiver/go.sum b/receiver/influxdbreceiver/go.sum index 7d9cf499914c..bf67e27cf974 100644 --- a/receiver/influxdbreceiver/go.sum +++ b/receiver/influxdbreceiver/go.sum @@ -206,10 +206,10 @@ github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8 github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/jaegerreceiver/config.go b/receiver/jaegerreceiver/config.go index d982bcdd523d..cdc934e43baa 100644 --- a/receiver/jaegerreceiver/config.go +++ b/receiver/jaegerreceiver/config.go @@ -176,11 +176,11 @@ func (cfg *Config) Unmarshal(componentParser *confmap.Conf) error { func checkPortFromEndpoint(endpoint string) error { _, portStr, err := net.SplitHostPort(endpoint) if err != nil { - return fmt.Errorf("endpoint is not formatted correctly: %s", err.Error()) + return fmt.Errorf("endpoint is not formatted correctly: %w", err) } port, err := strconv.ParseInt(portStr, 10, 0) if err != nil { - return fmt.Errorf("endpoint port is not a number: %s", err.Error()) + return fmt.Errorf("endpoint port is not a number: %w", err) } if port < 1 || port > 65535 { return fmt.Errorf("port number must be between 1 and 65535") diff --git a/receiver/jaegerreceiver/go.mod b/receiver/jaegerreceiver/go.mod index 7540e4ce50cd..4eacff1ae925 100644 --- a/receiver/jaegerreceiver/go.mod +++ b/receiver/jaegerreceiver/go.mod @@ -10,9 +10,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.53.0 github.com/stretchr/testify v1.7.2 github.com/uber/jaeger-lib v2.4.1+incompatible - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 google.golang.org/grpc v1.47.0 diff --git a/receiver/jaegerreceiver/go.sum b/receiver/jaegerreceiver/go.sum index 34ea2948e793..811220843317 100644 --- a/receiver/jaegerreceiver/go.sum +++ b/receiver/jaegerreceiver/go.sum @@ -505,12 +505,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= diff --git a/receiver/jmxreceiver/config_test.go b/receiver/jmxreceiver/config_test.go index 43f5c4055415..b49cef8ebf65 100644 --- a/receiver/jmxreceiver/config_test.go +++ b/receiver/jmxreceiver/config_test.go @@ -15,7 +15,6 @@ package jmxreceiver import ( - "os" "path/filepath" "testing" "time" @@ -346,9 +345,7 @@ func TestClassPathParse(t *testing.T) { for _, tc := range testCases { t.Run(tc.desc, func(t *testing.T) { - os.Unsetenv("CLASSPATH") - err := os.Setenv("CLASSPATH", tc.existingEnvVal) - require.NoError(t, err) + t.Setenv("CLASSPATH", tc.existingEnvVal) actual := tc.cfg.parseClasspath() require.Equal(t, tc.expected, actual) diff --git a/receiver/jmxreceiver/go.mod b/receiver/jmxreceiver/go.mod index 309337379bf3..9e9d091ca603 100644 --- a/receiver/jmxreceiver/go.mod +++ b/receiver/jmxreceiver/go.mod @@ -7,8 +7,8 @@ require ( github.com/shirou/gopsutil/v3 v3.22.5 github.com/stretchr/testify v1.7.2 github.com/testcontainers/testcontainers-go v0.13.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/zap v1.21.0 @@ -24,7 +24,7 @@ require ( github.com/containerd/containerd v1.5.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.15+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect diff --git a/receiver/jmxreceiver/go.sum b/receiver/jmxreceiver/go.sum index 86d1cc6e818a..7e0c73b1e034 100644 --- a/receiver/jmxreceiver/go.sum +++ b/receiver/jmxreceiver/go.sum @@ -286,8 +286,8 @@ github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.15+incompatible h1:dk9FewY/9Xwm4ay/HViEEHSQuM/kL4F+JaG6GQdgmGo= -github.com/docker/docker v20.10.15+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -833,10 +833,10 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= diff --git a/receiver/journaldreceiver/go.mod b/receiver/journaldreceiver/go.mod index 3d9d9d66b01f..22ee08a27a64 100644 --- a/receiver/journaldreceiver/go.mod +++ b/receiver/journaldreceiver/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 gopkg.in/yaml.v2 v2.4.0 ) @@ -28,7 +28,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/receiver/journaldreceiver/go.sum b/receiver/journaldreceiver/go.sum index 1aae729a6b69..00b7e8f45858 100644 --- a/receiver/journaldreceiver/go.sum +++ b/receiver/journaldreceiver/go.sum @@ -209,10 +209,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/k8sclusterreceiver/README.md b/receiver/k8sclusterreceiver/README.md index 2b0f96b4d0f5..4f8363f21808 100644 --- a/receiver/k8sclusterreceiver/README.md +++ b/receiver/k8sclusterreceiver/README.md @@ -136,7 +136,7 @@ type MetadataDelta struct { } ``` -See [here](collection/metadata.go) for details about the above types. +See [here](internal/collection/metadata.go) for details about the above types. ## Example diff --git a/receiver/k8sclusterreceiver/go.mod b/receiver/k8sclusterreceiver/go.mod index 10f38ef788ff..5dfa7cb6f9ce 100644 --- a/receiver/k8sclusterreceiver/go.mod +++ b/receiver/k8sclusterreceiver/go.mod @@ -13,9 +13,9 @@ require ( github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 github.com/pkg/errors v0.9.1 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.28.0 diff --git a/receiver/k8sclusterreceiver/go.sum b/receiver/k8sclusterreceiver/go.sum index ef9dfb18e4b2..0227bff1fdc3 100644 --- a/receiver/k8sclusterreceiver/go.sum +++ b/receiver/k8sclusterreceiver/go.sum @@ -389,12 +389,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/k8sclusterreceiver/receiver.go b/receiver/k8sclusterreceiver/receiver.go index 45ecad046875..bfc15aeef117 100644 --- a/receiver/k8sclusterreceiver/receiver.go +++ b/receiver/k8sclusterreceiver/receiver.go @@ -69,7 +69,7 @@ func (kr *kubernetesReceiver) Start(ctx context.Context, host component.Host) er // If the context times out, set initialSyncTimedOut and report a fatal error. Currently // this timeout is 10 minutes, which appears to be long enough. - if timedContextForInitialSync.Err() == context.DeadlineExceeded { + if errors.Is(timedContextForInitialSync.Err(), context.DeadlineExceeded) { kr.resourceWatcher.initialSyncTimedOut.Store(true) kr.settings.Logger.Error("Timed out waiting for initial cache sync.") host.ReportFatalError(fmt.Errorf("failed to start receiver: %v", kr.config.ID())) diff --git a/receiver/k8sclusterreceiver/watcher.go b/receiver/k8sclusterreceiver/watcher.go index 2a1063f7b0cc..ca677d22ccd2 100644 --- a/receiver/k8sclusterreceiver/watcher.go +++ b/receiver/k8sclusterreceiver/watcher.go @@ -274,7 +274,7 @@ func (rw *resourceWatcher) setupMetadataExporters( metadataExportersSet := utils.StringSliceToMap(metadataExportersFromConfig) if err := validateMetadataExporters(metadataExportersSet, exporters); err != nil { - return fmt.Errorf("failed to configure metadata_exporters: %v", err) + return fmt.Errorf("failed to configure metadata_exporters: %w", err) } for cfg, exp := range exporters { diff --git a/receiver/k8seventsreceiver/go.mod b/receiver/k8seventsreceiver/go.mod index f953b0b2e6a4..b33a8462d989 100644 --- a/receiver/k8seventsreceiver/go.mod +++ b/receiver/k8seventsreceiver/go.mod @@ -5,9 +5,9 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 k8s.io/api v0.24.1 k8s.io/apimachinery v0.24.1 diff --git a/receiver/k8seventsreceiver/go.sum b/receiver/k8seventsreceiver/go.sum index e5bbc4cb2297..890a32671977 100644 --- a/receiver/k8seventsreceiver/go.sum +++ b/receiver/k8seventsreceiver/go.sum @@ -388,12 +388,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/kafkametricsreceiver/go.mod b/receiver/kafkametricsreceiver/go.mod index 2d58d50b64c7..93f10911c667 100644 --- a/receiver/kafkametricsreceiver/go.mod +++ b/receiver/kafkametricsreceiver/go.mod @@ -3,12 +3,12 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkam go 1.17 require ( - github.com/Shopify/sarama v1.34.0 + github.com/Shopify/sarama v1.34.1 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) @@ -17,11 +17,11 @@ require ( github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect github.com/Microsoft/go-winio v0.5.1 // indirect github.com/apache/thrift v0.16.0 // indirect - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.0-beta.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/eapache/go-resiliency v1.2.0 // indirect @@ -65,7 +65,7 @@ require ( github.com/xdg-go/scram v1.1.1 // indirect github.com/xdg-go/stringprep v1.0.3 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/receiver/kafkametricsreceiver/go.sum b/receiver/kafkametricsreceiver/go.sum index ccd9b3d29094..b6ed0a41e004 100644 --- a/receiver/kafkametricsreceiver/go.sum +++ b/receiver/kafkametricsreceiver/go.sum @@ -1,23 +1,60 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/HdrHistogram/hdrhistogram-go v1.0.1 h1:GX8GAYDuhlFQnI2fRDHQhTlkHMz8bEn0jTI6LJU0mpw= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.5.1 h1:aPJp2QD7OOrhO5tQXqQoGSJc+DjDtWTGLOmNyAm6FgY= github.com/Microsoft/go-winio v0.5.1/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Shopify/sarama v1.34.0 h1:j4zTaFHFnfvuV2fdLZyXqIg0Tu4Mzl9f064Z5/H+o4o= -github.com/Shopify/sarama v1.34.0/go.mod h1:V2ceE9UupUf4/oP1Z38SI49fAnD0/MtkqDDHvolIeeQ= -github.com/Shopify/toxiproxy/v2 v2.3.0 h1:62YkpiP4bzdhKMH+6uC5E95y608k3zDwdzuBMsnn3uQ= -github.com/Shopify/toxiproxy/v2 v2.3.0/go.mod h1:KvQTtB6RjCJY4zqNJn7C7JDFgsG5uoHYDirfUfpIm0c= +github.com/Shopify/sarama v1.34.1 h1:pVCQO7BMAK3s1jWhgi5v1W6lwZ6Veiekfc2vsgRS06Y= +github.com/Shopify/sarama v1.34.1/go.mod h1:NZSNswsnStpq8TUdFaqnpXm2Do6KRzTIjdBdVlL1YRM= +github.com/Shopify/toxiproxy/v2 v2.4.0 h1:O1e4Jfvr/hefNTNu+8VtdEG5lSeamJRo4aKhMOKNM64= +github.com/Shopify/toxiproxy/v2 v2.4.0/go.mod h1:3ilnjng821bkozDRxNoo64oI/DKqM+rOyJzb564+bvg= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -30,11 +67,18 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21 github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -50,8 +94,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.0-beta.1+incompatible h1:9MjVa+OTMHm4C0kKZB68jPlDM9Cg75ta4i46Gxxxn8o= github.com/docker/distribution v2.8.0-beta.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -76,24 +120,45 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -108,11 +173,15 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -120,7 +189,19 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= @@ -152,6 +233,7 @@ github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoI github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jaegertracing/jaeger v1.35.1 h1:Jb7/5anKF70V4FQSJRJ3AYBcA/hJDfWy45kE/9nFSe8= github.com/jaegertracing/jaeger v1.35.1/go.mod h1:e7FBVZ14ptsRjwiHEnLyxvOa4bSnZA0BDFE1OcvNiHs= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= @@ -172,16 +254,25 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -192,6 +283,7 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -211,9 +303,13 @@ github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQB github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -228,24 +324,46 @@ github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhEC github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE= github.com/pierrec/lz4/v4 v4.1.14/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= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 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/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.2 h1:aIihoIOHCiLZHxyoNQ+ABL4NKhFTgKLBdMLyEAh98m0= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -275,17 +393,24 @@ github.com/xdg-go/scram v1.1.1 h1:VOMT+81stJgXW3CpHyqHN3AXDYIMsx56mEFrB37Mb/E= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= @@ -304,7 +429,10 @@ go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -312,52 +440,125 @@ golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 h1:NvGWuYG8dkDHFSKksI1P9faiVJ9rayE6l0+ouWVIDs8= golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -365,50 +566,145 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20220210224613-90d013bbcef8 h1:vVKdlvoWBphwdxWKrFZEuM0kGgGLxUOYcY4U/2Vjg44= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= @@ -423,28 +719,44 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools/v3 v3.1.0 h1:rVV8Tcg/8jHUkPUorwjaMTtemIMVXfIPKiOqnhEhakk= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/receiver/kafkareceiver/go.mod b/receiver/kafkareceiver/go.mod index acc92bc49372..10960a775c50 100644 --- a/receiver/kafkareceiver/go.mod +++ b/receiver/kafkareceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkar go 1.17 require ( - github.com/Shopify/sarama v1.34.0 + github.com/Shopify/sarama v1.34.1 github.com/apache/thrift v0.16.0 github.com/gogo/protobuf v1.3.2 github.com/jaegertracing/jaeger v1.35.1 @@ -14,14 +14,14 @@ require ( github.com/openzipkin/zipkin-go v0.4.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) require ( - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect diff --git a/receiver/kafkareceiver/go.sum b/receiver/kafkareceiver/go.sum index 806501f98c0c..c756d1cb402a 100644 --- a/receiver/kafkareceiver/go.sum +++ b/receiver/kafkareceiver/go.sum @@ -1,20 +1,57 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/HdrHistogram/hdrhistogram-go v1.0.1 h1:GX8GAYDuhlFQnI2fRDHQhTlkHMz8bEn0jTI6LJU0mpw= github.com/Shopify/sarama v1.30.0/go.mod h1:zujlQQx1kzHsh4jfV1USnptCQrHAEZ2Hk8fTKCulPVs= -github.com/Shopify/sarama v1.34.0 h1:j4zTaFHFnfvuV2fdLZyXqIg0Tu4Mzl9f064Z5/H+o4o= -github.com/Shopify/sarama v1.34.0/go.mod h1:V2ceE9UupUf4/oP1Z38SI49fAnD0/MtkqDDHvolIeeQ= +github.com/Shopify/sarama v1.34.1 h1:pVCQO7BMAK3s1jWhgi5v1W6lwZ6Veiekfc2vsgRS06Y= +github.com/Shopify/sarama v1.34.1/go.mod h1:NZSNswsnStpq8TUdFaqnpXm2Do6KRzTIjdBdVlL1YRM= github.com/Shopify/toxiproxy/v2 v2.1.6-0.20210914104332-15ea381dcdae/go.mod h1:/cvHQkZ1fst0EmZnA5dFtiQdWCNCFYzb+uE2vqVgvx0= -github.com/Shopify/toxiproxy/v2 v2.3.0 h1:62YkpiP4bzdhKMH+6uC5E95y608k3zDwdzuBMsnn3uQ= -github.com/Shopify/toxiproxy/v2 v2.3.0/go.mod h1:KvQTtB6RjCJY4zqNJn7C7JDFgsG5uoHYDirfUfpIm0c= +github.com/Shopify/toxiproxy/v2 v2.4.0 h1:O1e4Jfvr/hefNTNu+8VtdEG5lSeamJRo4aKhMOKNM64= +github.com/Shopify/toxiproxy/v2 v2.4.0/go.mod h1:3ilnjng821bkozDRxNoo64oI/DKqM+rOyJzb564+bvg= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.16.0 h1:qEy6UW60iVOlUy+b9ZR0d5WzUWYGOo4HfopoyBaNmoY= github.com/apache/thrift v0.16.0/go.mod h1:PHK3hniurgQaNMZYaCLEqXKsYK8upmhPbmdP2FXSqgU= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -27,6 +64,9 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21 github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -34,6 +74,10 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -69,26 +113,47 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -103,11 +168,15 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -115,7 +184,19 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= @@ -149,6 +230,7 @@ github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvh github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jaegertracing/jaeger v1.35.1 h1:Jb7/5anKF70V4FQSJRJ3AYBcA/hJDfWy45kE/9nFSe8= github.com/jaegertracing/jaeger v1.35.1/go.mod h1:e7FBVZ14ptsRjwiHEnLyxvOa4bSnZA0BDFE1OcvNiHs= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= @@ -169,16 +251,26 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGw github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= -github.com/klauspost/compress v1.15.0/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= @@ -189,6 +281,7 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -207,8 +300,12 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= @@ -231,28 +328,51 @@ github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE= github.com/pierrec/lz4/v4 v4.1.14/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= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= +github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM= 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/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.2 h1:aIihoIOHCiLZHxyoNQ+ABL4NKhFTgKLBdMLyEAh98m0= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -276,17 +396,24 @@ github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23n github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= @@ -305,7 +432,10 @@ go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -314,86 +444,203 @@ golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 h1:NvGWuYG8dkDHFSKksI1P9faiVJ9rayE6l0+ouWVIDs8= golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210917221730-978cfadd31cf/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -401,21 +648,75 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= @@ -431,24 +732,29 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= @@ -458,4 +764,12 @@ gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/receiver/kubeletstatsreceiver/go.mod b/receiver/kubeletstatsreceiver/go.mod index e95012429403..b54724e5862f 100644 --- a/receiver/kubeletstatsreceiver/go.mod +++ b/receiver/kubeletstatsreceiver/go.mod @@ -6,9 +6,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 k8s.io/api v0.24.1 k8s.io/apimachinery v0.24.1 diff --git a/receiver/kubeletstatsreceiver/go.sum b/receiver/kubeletstatsreceiver/go.sum index c22b9b29ae93..ec015b8a6fd9 100644 --- a/receiver/kubeletstatsreceiver/go.sum +++ b/receiver/kubeletstatsreceiver/go.sum @@ -449,12 +449,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= diff --git a/receiver/memcachedreceiver/config_test.go b/receiver/memcachedreceiver/config_test.go new file mode 100644 index 000000000000..1ce10997afa8 --- /dev/null +++ b/receiver/memcachedreceiver/config_test.go @@ -0,0 +1,47 @@ +// Copyright 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 memcachedreceiver + +import ( + "path/filepath" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/service/servicetest" +) + +func TestDefaultConfig(t *testing.T) { + cfg := NewFactory().CreateDefaultConfig().(*Config) + require.Equal(t, defaultEndpoint, cfg.Endpoint) + require.Equal(t, defaultTimeout, cfg.Timeout) + require.Equal(t, defaultCollectionInterval, cfg.CollectionInterval) +} + +func TestLoadConfig(t *testing.T) { + factories, err := componenttest.NopFactories() + require.Nil(t, err) + + factory := NewFactory() + factories.Receivers[typeStr] = factory + cfg, err := servicetest.LoadConfigAndValidate(filepath.Join("testdata", "config.yaml"), factories) + require.NoError(t, err) + require.NotNil(t, cfg) + + require.Equal(t, len(cfg.Receivers), 1) + + require.Equal(t, factory.CreateDefaultConfig(), cfg.Receivers[config.NewComponentID("memcached")]) +} diff --git a/receiver/memcachedreceiver/factory.go b/receiver/memcachedreceiver/factory.go index 658559f8b85a..18360d133543 100644 --- a/receiver/memcachedreceiver/factory.go +++ b/receiver/memcachedreceiver/factory.go @@ -28,7 +28,10 @@ import ( ) const ( - typeStr = "memcached" + typeStr = "memcached" + defaultEndpoint = "localhost:11211" + defaultTimeout = 10 * time.Second + defaultCollectionInterval = 10 * time.Second ) // NewFactory creates a factory for memcached receiver. @@ -43,11 +46,11 @@ func createDefaultConfig() config.Receiver { return &Config{ ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ ReceiverSettings: config.NewReceiverSettings(config.NewComponentID(typeStr)), - CollectionInterval: 10 * time.Second, + CollectionInterval: defaultCollectionInterval, }, - Timeout: 10 * time.Second, + Timeout: defaultTimeout, NetAddr: confignet.NetAddr{ - Endpoint: "localhost:11211", + Endpoint: defaultEndpoint, }, Metrics: metadata.DefaultMetricsSettings(), } diff --git a/receiver/memcachedreceiver/go.mod b/receiver/memcachedreceiver/go.mod index c4bc5e8592ee..886e581440b7 100644 --- a/receiver/memcachedreceiver/go.mod +++ b/receiver/memcachedreceiver/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -18,7 +18,7 @@ require ( github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.0-beta.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect diff --git a/receiver/memcachedreceiver/go.sum b/receiver/memcachedreceiver/go.sum index b50dc51b4d3f..35941a110424 100644 --- a/receiver/memcachedreceiver/go.sum +++ b/receiver/memcachedreceiver/go.sum @@ -42,8 +42,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.0-beta.1+incompatible h1:9MjVa+OTMHm4C0kKZB68jPlDM9Cg75ta4i46Gxxxn8o= github.com/docker/distribution v2.8.0-beta.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -216,10 +216,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/memcachedreceiver/testdata/config.yaml b/receiver/memcachedreceiver/testdata/config.yaml new file mode 100644 index 000000000000..55ead87b5409 --- /dev/null +++ b/receiver/memcachedreceiver/testdata/config.yaml @@ -0,0 +1,17 @@ +receivers: + memcached: + endpoint: "localhost:11211" + collection_interval: 10s + +processors: + nop: + +exporters: + nop: + +service: + pipelines: + metrics: + receivers: [memcached] + processors: [nop] + exporters: [nop] diff --git a/receiver/mongodbatlasreceiver/README.md b/receiver/mongodbatlasreceiver/README.md index 0500d3511a53..03442f6829c0 100644 --- a/receiver/mongodbatlasreceiver/README.md +++ b/receiver/mongodbatlasreceiver/README.md @@ -1,28 +1,41 @@ # MongoDB Atlas Receiver -Receives metrics from [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) -via their [monitoring APIs](https://docs.atlas.mongodb.com/reference/api/monitoring-and-logs/) +| Status | | +|--------------------------|---------------| +| Stability | [beta] | +| Supported pipeline types | metrics, logs | +| Distributions | [contrib] | -Supported pipeline types: metrics +Receives metrics from [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) +via their [monitoring APIs](https://docs.atlas.mongodb.com/reference/api/monitoring-and-logs/), +as well as alerts via a configured [webhook](https://www.mongodb.com/docs/atlas/tutorial/third-party-service-integrations/). ## Getting Started The MongoDB Atlas receiver takes the following parameters. `public_key` and -`private_key` are the only two required values and are obtained via the +`private_key` are the only two required values to receive metrics and are obtained via the "API Keys" tab of the MongoDB Atlas Project Access Manager. In the example below both values are being pulled from the environment. -- `public_key` -- `private_key` +- `public_key` (required for metrics) +- `private_key` (required for metrics) - `granularity` (default `PT1M` - See [MongoDB Atlas Documentation](https://docs.atlas.mongodb.com/reference/api/process-measurements/)) - `retry_on_failure` - `enabled` (default true) - `initial_interval` (default 5s) - `max_interval` (default 30s) - `max_elapsed_time` (default 5m) +- `alerts` + - `enabled` (default false) + - `secret` (required if enabled) + - `endpoint` (required if enabled) + - `tls` + - `key_file` + - `cert_file` Examples: +Receive metrics: ```yaml receivers: mongodbatlas: @@ -30,4 +43,15 @@ receivers: private_key: ${MONGODB_ATLAS_PRIVATE_KEY} ``` +Receive alerts: +```yaml +receivers: + mongodbatlas: + alerts: + enabled: true + secret: "some_secret" + endpoint: "0.0.0.0:7706" +``` +[beta]:https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/mongodbatlasreceiver/alerts.go b/receiver/mongodbatlasreceiver/alerts.go new file mode 100644 index 000000000000..6a1ec7e5ae6f --- /dev/null +++ b/receiver/mongodbatlasreceiver/alerts.go @@ -0,0 +1,317 @@ +// 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 mongodbatlasreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver" + +import ( + "bytes" + "context" + "crypto/hmac" + "crypto/sha1" // #nosec G505 -- SHA1 is the algorithm mongodbatlas uses, it must be used to calculate the HMAC signature + "crypto/tls" + "encoding/base64" + "encoding/json" + "errors" + "fmt" + "io" + "net" + "net/http" + "strconv" + "sync" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtls" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/internal/model" +) + +// maxContentLength is the maximum payload size we will accept from incoming requests. +// Requests are generally ~1000 bytes, so we overshoot that by an order of magnitude. +// This is to protect from overly large requests. +const ( + maxContentLength int64 = 16384 + signatureHeaderName string = "X-MMS-Signature" +) + +type alertsReceiver struct { + addr string + secret string + server *http.Server + tlsSettings *configtls.TLSServerSetting + consumer consumer.Logs + wg *sync.WaitGroup + logger *zap.Logger +} + +func newAlertsReceiver(logger *zap.Logger, cfg AlertConfig, consumer consumer.Logs) (*alertsReceiver, error) { + var tlsConfig *tls.Config + + if cfg.TLS != nil { + var err error + + tlsConfig, err = cfg.TLS.LoadTLSConfig() + if err != nil { + return nil, err + } + } + + recv := &alertsReceiver{ + addr: cfg.Endpoint, + secret: cfg.Secret, + tlsSettings: cfg.TLS, + consumer: consumer, + wg: &sync.WaitGroup{}, + logger: logger, + } + + s := &http.Server{ + TLSConfig: tlsConfig, + Handler: http.HandlerFunc(recv.handleRequest), + } + + recv.server = s + + return recv, nil +} + +func (a alertsReceiver) Start(ctx context.Context, host component.Host) error { + // We use a.server.Serve* over a.server.ListenAndServe* + // So that we can catch and return errors relating to binding to network interface on start. + var lc net.ListenConfig + + l, err := lc.Listen(ctx, "tcp", a.addr) + if err != nil { + return err + } + + a.wg.Add(1) + if a.tlsSettings != nil { + go func() { + defer a.wg.Done() + + a.logger.Debug("Starting ServeTLS", + zap.String("address", a.addr), + zap.String("certfile", a.tlsSettings.CertFile), + zap.String("keyfile", a.tlsSettings.KeyFile)) + + err := a.server.ServeTLS(l, a.tlsSettings.CertFile, a.tlsSettings.KeyFile) + + a.logger.Debug("Serve TLS done") + + if err != http.ErrServerClosed { + a.logger.Error("ServeTLS failed", zap.Error(err)) + host.ReportFatalError(err) + } + }() + } else { + go func() { + defer a.wg.Done() + + a.logger.Debug("Starting Serve", zap.String("address", a.addr)) + + err := a.server.Serve(l) + + a.logger.Debug("Serve done") + + if err != http.ErrServerClosed { + a.logger.Error("Serve failed", zap.Error(err)) + host.ReportFatalError(err) + } + }() + } + + return nil +} + +func (a alertsReceiver) handleRequest(rw http.ResponseWriter, req *http.Request) { + if req.ContentLength < 0 { + rw.WriteHeader(http.StatusLengthRequired) + a.logger.Debug("Got request with no Content-Length specified", zap.String("remote", req.RemoteAddr)) + return + } + + if req.ContentLength > maxContentLength { + rw.WriteHeader(http.StatusRequestEntityTooLarge) + a.logger.Debug("Got request with large Content-Length specified", + zap.String("remote", req.RemoteAddr), + zap.Int64("content-length", req.ContentLength), + zap.Int64("max-content-length", maxContentLength)) + return + } + + payloadSigHeader := req.Header.Get(signatureHeaderName) + if payloadSigHeader == "" { + rw.WriteHeader(http.StatusBadRequest) + a.logger.Debug("Got payload with no HMAC signature, dropping...") + return + } + + payload := make([]byte, req.ContentLength) + _, err := io.ReadFull(req.Body, payload) + if err != nil { + rw.WriteHeader(http.StatusBadRequest) + a.logger.Debug("Failed to read alerts payload", zap.Error(err), zap.String("remote", req.RemoteAddr)) + return + } + + if err = verifyHMACSignature(a.secret, payload, payloadSigHeader); err != nil { + rw.WriteHeader(http.StatusBadRequest) + a.logger.Debug("Got payload with invalid HMAC signature, dropping...", zap.Error(err), zap.String("remote", req.RemoteAddr)) + return + } + + logs, err := payloadToLogs(time.Now(), payload) + if err != nil { + rw.WriteHeader(http.StatusBadRequest) + a.logger.Error("Failed to convert log payload to log record", zap.Error(err)) + return + } + + if err := a.consumer.ConsumeLogs(req.Context(), *logs); err != nil { + rw.WriteHeader(http.StatusInternalServerError) + a.logger.Error("Failed to consumer alert as log", zap.Error(err)) + return + } + + rw.WriteHeader(http.StatusOK) +} + +func (a alertsReceiver) Shutdown(ctx context.Context) error { + a.logger.Debug("Shutting down server") + err := a.server.Shutdown(ctx) + if err != nil { + return err + } + + a.logger.Debug("Waiting for shutdown to complete.") + a.wg.Wait() + return nil +} + +func verifyHMACSignature(secret string, payload []byte, signatureHeader string) error { + b64Decoder := base64.NewDecoder(base64.StdEncoding, bytes.NewBufferString(signatureHeader)) + payloadSig, err := io.ReadAll(b64Decoder) + if err != nil { + return err + } + + h := hmac.New(sha1.New, []byte(secret)) + h.Write(payload) + calculatedSig := h.Sum(nil) + + if !hmac.Equal(calculatedSig, payloadSig) { + return errors.New("calculated signature does not equal header signature") + } + + return nil +} + +func payloadToLogs(now time.Time, payload []byte) (*plog.Logs, error) { + var alert model.Alert + + err := json.Unmarshal(payload, &alert) + if err != nil { + return nil, err + } + + logs := plog.NewLogs() + resourceLogs := logs.ResourceLogs().AppendEmpty() + logRecord := resourceLogs.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + + logRecord.SetObservedTimestamp(pcommon.NewTimestampFromTime(now)) + logRecord.SetTimestamp(timestampFromAlert(alert)) + logRecord.SetSeverityNumber(severityFromAlert(alert)) + logRecord.Body().SetStringVal(string(payload)) + + resourceAttrs := resourceLogs.Resource().Attributes() + resourceAttrs.InsertString("mongodbatlas.group.id", alert.GroupID) + resourceAttrs.InsertString("mongodbatlas.alert.config.id", alert.AlertConfigID) + insertStringToMapNotNil(resourceAttrs, "mongodbatlas.cluster.name", alert.ClusterName) + insertStringToMapNotNil(resourceAttrs, "mongodbatlas.replica_set.name", alert.ReplicaSetName) + + attrs := logRecord.Attributes() + // These attributes are always present + attrs.InsertString("event.domain", "mongodbatlas") + attrs.InsertString("event.name", alert.EventType) + attrs.InsertString("message", alert.HumanReadable) + attrs.InsertString("status", alert.Status) + attrs.InsertString("created", alert.Created) + attrs.InsertString("updated", alert.Updated) + attrs.InsertString("id", alert.ID) + + // These attributes are optional and may not be present, depending on the alert type. + insertStringToMapNotNil(attrs, "metric.name", alert.MetricName) + insertStringToMapNotNil(attrs, "type_name", alert.TypeName) + insertStringToMapNotNil(attrs, "user_alias", alert.UserAlias) + insertStringToMapNotNil(attrs, "last_notified", alert.LastNotified) + insertStringToMapNotNil(attrs, "resolved", alert.Resolved) + insertStringToMapNotNil(attrs, "acknowledgement.comment", alert.AcknowledgementComment) + insertStringToMapNotNil(attrs, "acknowledgement.username", alert.AcknowledgementUsername) + insertStringToMapNotNil(attrs, "acknowledgement.until", alert.AcknowledgedUntil) + + if alert.CurrentValue != nil { + attrs.InsertDouble("metric.value", alert.CurrentValue.Number) + attrs.InsertString("metric.units", alert.CurrentValue.Units) + } + + if alert.HostNameAndPort != nil { + host, portStr, err := net.SplitHostPort(*alert.HostNameAndPort) + if err != nil { + return nil, fmt.Errorf("failed to split host:port %s: %w", *alert.HostNameAndPort, err) + } + + port, err := strconv.ParseInt(portStr, 10, 64) + if err != nil { + return nil, fmt.Errorf("failed to parse port %s: %w", portStr, err) + } + + attrs.InsertString("net.peer.name", host) + attrs.InsertInt("net.peer.port", port) + + } + + return &logs, nil +} + +func timestampFromAlert(a model.Alert) pcommon.Timestamp { + if time, err := time.Parse(time.RFC3339, a.Updated); err == nil { + return pcommon.NewTimestampFromTime(time) + } + + return pcommon.Timestamp(0) +} + +// severityFromAlert maps the alert to a severity number. +// Currently, it just maps "OPEN" alerts to WARN, and everything else to INFO. +func severityFromAlert(a model.Alert) plog.SeverityNumber { + // Status is defined here: https://www.mongodb.com/docs/atlas/reference/api/alerts-get-alert/#response-elements + // It may also be "INFORMATIONAL" for single-fire alerts (events) + switch a.Status { + case "OPEN": + return plog.SeverityNumberWARN + default: + return plog.SeverityNumberINFO + } +} + +func insertStringToMapNotNil(m pcommon.Map, k string, v *string) { + if v != nil { + m.InsertString(k, *v) + } +} diff --git a/receiver/mongodbatlasreceiver/alerts_integration_test.go b/receiver/mongodbatlasreceiver/alerts_integration_test.go new file mode 100644 index 000000000000..a235c09f8368 --- /dev/null +++ b/receiver/mongodbatlasreceiver/alerts_integration_test.go @@ -0,0 +1,259 @@ +// 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. + +//go:build integration + +package mongodbatlasreceiver + +import ( + "bytes" + "context" + "crypto/hmac" + "crypto/sha1" // #nosec G505 -- SHA1 is the algorithm mongodbatlas uses, it must be used to calculate the HMAC signature + "crypto/tls" + "crypto/x509" + "encoding/base64" + "errors" + "fmt" + "io" + "net" + "net/http" + "os" + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtls" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/plog" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" +) + +var testPayloads = []string{ + "metric-threshold-closed.json", + "new-primary.json", +} + +const ( + testSecret = "some_secret" +) + +func TestAlertsReceiver(t *testing.T) { + for _, payloadName := range testPayloads { + t.Run(payloadName, func(t *testing.T) { + testAddr := testutil.GetAvailableLocalAddress(t) + sink := &consumertest.LogsSink{} + fact := NewFactory() + + _, testPort, err := net.SplitHostPort(testAddr) + require.NoError(t, err) + + recv, err := fact.CreateLogsReceiver( + context.Background(), + componenttest.NewNopReceiverCreateSettings(), + &Config{ + Alerts: AlertConfig{ + Enabled: true, + Secret: testSecret, + Endpoint: testAddr, + }, + }, + sink, + ) + require.NoError(t, err) + + err = recv.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + + defer func() { + require.NoError(t, recv.Shutdown(context.Background())) + }() + + payloadFile, err := os.Open(filepath.Join("testdata", "alerts", "sample-payloads", payloadName)) + require.NoError(t, err) + defer payloadFile.Close() + + payload, err := io.ReadAll(payloadFile) + require.NoError(t, err) + + req, err := http.NewRequest("POST", fmt.Sprintf("http://localhost:%s", testPort), bytes.NewBuffer(payload)) + require.NoError(t, err) + + b64HMAC, err := calculateHMACb64(testSecret, payload) + require.NoError(t, err) + + req.Header.Add(signatureHeaderName, b64HMAC) + + resp, err := http.DefaultClient.Do(req) + require.NoError(t, err) + + defer resp.Body.Close() + + require.Equal(t, resp.StatusCode, http.StatusOK) + + require.Eventually(t, func() bool { + return sink.LogRecordCount() > 0 + }, 2*time.Second, 10*time.Millisecond) + + logs := sink.AllLogs()[0] + + expectedLogs, err := readLogs(filepath.Join("testdata", "alerts", "golden", payloadName)) + require.NoError(t, err) + + require.NoError(t, compareLogs(*expectedLogs, logs)) + }) + } +} + +func TestAlertsReceiverTLS(t *testing.T) { + for _, payloadName := range testPayloads { + t.Run(payloadName, func(t *testing.T) { + testAddr := testutil.GetAvailableLocalAddress(t) + sink := &consumertest.LogsSink{} + fact := NewFactory() + + _, testPort, err := net.SplitHostPort(testAddr) + require.NoError(t, err) + + recv, err := fact.CreateLogsReceiver( + context.Background(), + componenttest.NewNopReceiverCreateSettings(), + &Config{ + Alerts: AlertConfig{ + Enabled: true, + Secret: testSecret, + Endpoint: testAddr, + TLS: &configtls.TLSServerSetting{ + TLSSetting: configtls.TLSSetting{ + CertFile: filepath.Join("testdata", "alerts", "cert", "server.crt"), + KeyFile: filepath.Join("testdata", "alerts", "cert", "server.key"), + }, + }, + }, + }, + sink, + ) + require.NoError(t, err) + + err = recv.Start(context.Background(), componenttest.NewNopHost()) + require.NoError(t, err) + + defer func() { + require.NoError(t, recv.Shutdown(context.Background())) + }() + + payloadFile, err := os.Open(filepath.Join("testdata", "alerts", "sample-payloads", payloadName)) + require.NoError(t, err) + defer payloadFile.Close() + + payload, err := io.ReadAll(payloadFile) + require.NoError(t, err) + + req, err := http.NewRequest("POST", fmt.Sprintf("https://localhost:%s", testPort), bytes.NewBuffer(payload)) + require.NoError(t, err) + + b64HMAC, err := calculateHMACb64(testSecret, payload) + require.NoError(t, err) + + req.Header.Add(signatureHeaderName, b64HMAC) + + client, err := clientWithCert(filepath.Join("testdata", "alerts", "cert", "ca.crt")) + require.NoError(t, err) + + resp, err := client.Do(req) + require.NoError(t, err) + + defer resp.Body.Close() + + require.Equal(t, resp.StatusCode, http.StatusOK) + + require.Eventually(t, func() bool { + return sink.LogRecordCount() > 0 + }, 2*time.Second, 10*time.Millisecond) + + logs := sink.AllLogs()[0] + + expectedLogs, err := readLogs(filepath.Join("testdata", "alerts", "golden", payloadName)) + require.NoError(t, err) + + require.NoError(t, compareLogs(*expectedLogs, logs)) + }) + } +} + +func calculateHMACb64(secret string, payload []byte) (string, error) { + h := hmac.New(sha1.New, []byte(secret)) + h.Write(payload) + b := h.Sum(nil) + + var buf bytes.Buffer + enc := base64.NewEncoder(base64.StdEncoding, &buf) + _, err := enc.Write(b) + if err != nil { + return "", err + } + + err = enc.Close() + if err != nil { + return "", err + } + + return buf.String(), nil +} + +func readLogs(path string) (*plog.Logs, error) { + f, err := os.Open(path) + if err != nil { + return nil, err + } + defer f.Close() + + b, err := io.ReadAll(f) + if err != nil { + return nil, err + } + + logs, err := plog.NewJSONUnmarshaler().UnmarshalLogs(b) + return &logs, err +} + +func clientWithCert(path string) (*http.Client, error) { + f, err := os.Open(path) + if err != nil { + return nil, err + } + defer f.Close() + + b, err := io.ReadAll(f) + if err != nil { + return nil, err + } + + roots := x509.NewCertPool() + ok := roots.AppendCertsFromPEM(b) + if !ok { + return nil, errors.New("failed to append certficate as root certificate") + } + + return &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{ + RootCAs: roots, + }, + }, + }, nil +} diff --git a/receiver/mongodbatlasreceiver/alerts_test.go b/receiver/mongodbatlasreceiver/alerts_test.go new file mode 100644 index 000000000000..1ef3bd65d190 --- /dev/null +++ b/receiver/mongodbatlasreceiver/alerts_test.go @@ -0,0 +1,579 @@ +// 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 mongodbatlasreceiver + +import ( + "bytes" + "errors" + "fmt" + "io" + "net/http" + "net/http/httptest" + "net/textproto" + "net/url" + "reflect" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/plog" + "go.uber.org/zap/zaptest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/internal/model" +) + +func TestPayloadToLogRecord(t *testing.T) { + now := time.Time{} + + testCases := []struct { + name string + payload string + expectedLogs func(string) plog.Logs + expectedErr string + }{ + { + name: "minimal record", + payload: `{ + "created": "2022-06-03T22:30:31Z", + "groupId": "some-group-id", + "humanReadable": "Some event happened", + "alertConfigId": "123", + "eventTypeName": "EVENT", + "id": "some-id", + "updated": "2022-06-03T22:30:31Z", + "status": "STATUS" + }`, + expectedLogs: func(payload string) plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + lr := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + + pcommon.NewMapFromRaw( + map[string]interface{}{ + "mongodbatlas.group.id": "some-group-id", + "mongodbatlas.alert.config.id": "123", + }, + ).CopyTo(rl.Resource().Attributes()) + + pcommon.NewMapFromRaw( + map[string]interface{}{ + "created": "2022-06-03T22:30:31Z", + "message": "Some event happened", + "event.domain": "mongodbatlas", + "event.name": "EVENT", + "updated": "2022-06-03T22:30:31Z", + "status": "STATUS", + "id": "some-id", + }, + ).CopyTo(lr.Attributes()) + + lr.SetObservedTimestamp(pcommon.NewTimestampFromTime(now)) + lr.SetTimestamp(pcommon.NewTimestampFromTime(time.Date(2022, time.June, 3, 22, 30, 31, 0, time.UTC))) + lr.SetSeverityNumber(plog.SeverityNumberINFO) + + lr.Body().SetStringVal(payload) + + return logs + }, + }, + + { + name: "optional fields", + payload: `{ + "created": "2022-06-03T22:30:31Z", + "groupId": "some-group-id", + "humanReadable": "Some event happened", + "alertConfigId": "123", + "eventTypeName": "EVENT", + "id": "some-id", + "updated": "2022-06-03T22:30:35Z", + "status": "STATUS", + "replicaSetName": "replica-set", + "metricName": "my-metric", + "typeName": "type-name", + "clusterName": "cluster-name", + "userAlias": "user-alias", + "lastNotified": "2022-06-03T22:30:33Z", + "resolved": "2022-06-03T22:30:34Z", + "acknowledgementComment": "Scheduled maintenance", + "acknowledgingUsername": "devops", + "acknowledgedUntil": "2022-06-03T22:32:34Z", + "hostnameAndPort": "my-host.mongodb.com:4923", + "currentValue": { + "number": 14, + "units": "RAW" + } + }`, + expectedLogs: func(payload string) plog.Logs { + logs := plog.NewLogs() + rl := logs.ResourceLogs().AppendEmpty() + lr := rl.ScopeLogs().AppendEmpty().LogRecords().AppendEmpty() + + pcommon.NewMapFromRaw( + map[string]interface{}{ + "mongodbatlas.group.id": "some-group-id", + "mongodbatlas.alert.config.id": "123", + "mongodbatlas.cluster.name": "cluster-name", + "mongodbatlas.replica_set.name": "replica-set", + }, + ).CopyTo(rl.Resource().Attributes()) + + pcommon.NewMapFromRaw( + map[string]interface{}{ + "acknowledgement.comment": "Scheduled maintenance", + "acknowledgement.until": "2022-06-03T22:32:34Z", + "acknowledgement.username": "devops", + "created": "2022-06-03T22:30:31Z", + "event.name": "EVENT", + "event.domain": "mongodbatlas", + "id": "some-id", + "last_notified": "2022-06-03T22:30:33Z", + "message": "Some event happened", + "metric.name": "my-metric", + "metric.units": "RAW", + "metric.value": float64(14), + "net.peer.name": "my-host.mongodb.com", + "net.peer.port": 4923, + "resolved": "2022-06-03T22:30:34Z", + "status": "STATUS", + "type_name": "type-name", + "updated": "2022-06-03T22:30:35Z", + "user_alias": "user-alias", + }, + ).CopyTo(lr.Attributes()) + + lr.SetObservedTimestamp(pcommon.NewTimestampFromTime(now)) + lr.SetTimestamp(pcommon.NewTimestampFromTime(time.Date(2022, time.June, 3, 22, 30, 35, 0, time.UTC))) + lr.SetSeverityNumber(plog.SeverityNumberINFO) + + lr.Body().SetStringVal(payload) + + return logs + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + logs, err := payloadToLogs(now, []byte(tc.payload)) + if tc.expectedErr != "" { + require.Error(t, err) + require.Nil(t, logs) + require.Contains(t, err.Error(), tc.expectedErr) + } else { + require.NoError(t, err) + require.NotNil(t, logs) + require.NoError(t, compareLogs(tc.expectedLogs(tc.payload), *logs)) + } + }) + } +} + +func TestSeverityFromAlert(t *testing.T) { + testCases := []struct { + alert model.Alert + s plog.SeverityNumber + }{ + { + alert: model.Alert{Status: "OPEN"}, + s: plog.SeverityNumberWARN, + }, + { + alert: model.Alert{Status: "TRACKING"}, + s: plog.SeverityNumberINFO, + }, + { + alert: model.Alert{Status: "CLOSED"}, + s: plog.SeverityNumberINFO, + }, + { + alert: model.Alert{Status: "INFORMATIONAL"}, + s: plog.SeverityNumberINFO, + }, + } + + for _, tc := range testCases { + t.Run(fmt.Sprintf("%s -> %s", tc.alert.Status, tc.s.String()), func(t *testing.T) { + s := severityFromAlert(tc.alert) + require.Equal(t, tc.s, s) + }) + } +} + +func TestVerifyHMACSignature(t *testing.T) { + testCases := []struct { + name string + secret string + payload []byte + signatureHeader string + expectedErr string + }{ + { + name: "Signature matches", + secret: "some_secret", + payload: []byte(`{"some_key": "some_value"}`), + signatureHeader: "n5O6j3X1o1iYgFLcbjjMHBIYkFU=", + }, + { + name: "Signature does not match", + secret: "a_different_secret", + payload: []byte(`{"some_key": "some_value"}`), + signatureHeader: "n5O6j3X1o1iYgFLcbjjMHBIYkFU=", + expectedErr: "calculated signature does not equal header signature", + }, + { + name: "Signature is not valid base64", + secret: "a_different_secret", + payload: []byte(`{"some_key": "some_value"}`), + signatureHeader: "%asd82kmnc~`", + expectedErr: "illegal base64 data", + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := verifyHMACSignature(tc.secret, tc.payload, tc.signatureHeader) + if tc.expectedErr != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expectedErr) + } else { + require.NoError(t, err) + } + + }) + } +} + +func TestHandleRequest(t *testing.T) { + testCases := []struct { + name string + request *http.Request + expectedStatusCode int + logExpected bool + consumerFailure bool + }{ + { + name: "No ContentLength set", + request: &http.Request{ + ContentLength: -1, + Method: "POST", + URL: &url.URL{}, + Body: io.NopCloser(bytes.NewBufferString(`{"id": "an-id"}`)), + Header: map[string][]string{ + textproto.CanonicalMIMEHeaderKey(signatureHeaderName): {"BGKR1L/1GfvINp8+rr9ISwm7VhQ="}, + }, + }, + logExpected: false, + consumerFailure: false, + expectedStatusCode: http.StatusLengthRequired, + }, + { + name: "ContentLength too large", + request: &http.Request{ + ContentLength: maxContentLength + 1, + Method: "POST", + URL: &url.URL{}, + Body: io.NopCloser(bytes.NewBufferString(`{"id": "an-id"}`)), + Header: map[string][]string{ + textproto.CanonicalMIMEHeaderKey(signatureHeaderName): {"BGKR1L/1GfvINp8+rr9ISwm7VhQ="}, + }, + }, + logExpected: false, + consumerFailure: false, + expectedStatusCode: http.StatusRequestEntityTooLarge, + }, + { + name: "ContentLength is incorrect for payload", + request: &http.Request{ + ContentLength: 1, + Method: "POST", + URL: &url.URL{}, + Body: io.NopCloser(bytes.NewBufferString(`{"id": "an-id"}`)), + Header: map[string][]string{ + textproto.CanonicalMIMEHeaderKey(signatureHeaderName): {"BGKR1L/1GfvINp8+rr9ISwm7VhQ="}, + }, + }, + logExpected: false, + consumerFailure: false, + expectedStatusCode: http.StatusBadRequest, + }, + { + name: "ContentLength is larger than actual payload", + request: &http.Request{ + ContentLength: 32, + Method: "POST", + URL: &url.URL{}, + Body: io.NopCloser(bytes.NewBufferString(`{"id": "an-id"}`)), + Header: map[string][]string{ + textproto.CanonicalMIMEHeaderKey(signatureHeaderName): {"BGKR1L/1GfvINp8+rr9ISwm7VhQ="}, + }, + }, + logExpected: false, + consumerFailure: false, + expectedStatusCode: http.StatusBadRequest, + }, + { + name: "No HMAC signature", + request: &http.Request{ + ContentLength: 15, + Method: "POST", + URL: &url.URL{}, + Body: io.NopCloser(bytes.NewBufferString(`{"id": "an-id"}`)), + }, + logExpected: false, + consumerFailure: false, + expectedStatusCode: http.StatusBadRequest, + }, + { + name: "Incorrect HMAC signature", + request: &http.Request{ + ContentLength: 15, + Method: "POST", + URL: &url.URL{}, + Body: io.NopCloser(bytes.NewBufferString(`{"id": "an-id"}`)), + Header: map[string][]string{ + textproto.CanonicalMIMEHeaderKey(signatureHeaderName): {"n5O6j3X1o1iYgFLcbjjMHBIYkFU="}, + }, + }, + logExpected: false, + consumerFailure: false, + expectedStatusCode: http.StatusBadRequest, + }, + { + name: "Invalid payload", + request: &http.Request{ + ContentLength: 14, + Method: "POST", + URL: &url.URL{}, + Body: io.NopCloser(bytes.NewBufferString(`{"id": "an-id"`)), + Header: map[string][]string{ + textproto.CanonicalMIMEHeaderKey(signatureHeaderName): {"P8OMdoVqNNE9iTFccTuwTY/J7vQ="}, + }, + }, + logExpected: false, + consumerFailure: false, + expectedStatusCode: http.StatusBadRequest, + }, + { + name: "Consumer fails", + request: &http.Request{ + ContentLength: 15, + Method: "POST", + URL: &url.URL{}, + Body: io.NopCloser(bytes.NewBufferString(`{"id": "an-id"}`)), + Header: map[string][]string{ + textproto.CanonicalMIMEHeaderKey(signatureHeaderName): {"BGKR1L/1GfvINp8+rr9ISwm7VhQ="}, + }, + }, + logExpected: false, + consumerFailure: true, + expectedStatusCode: http.StatusInternalServerError, + }, + { + name: "Request succeeds", + request: &http.Request{ + ContentLength: 15, + Method: "POST", + URL: &url.URL{}, + Body: io.NopCloser(bytes.NewBufferString(`{"id": "an-id"}`)), + Header: map[string][]string{ + textproto.CanonicalMIMEHeaderKey(signatureHeaderName): {"BGKR1L/1GfvINp8+rr9ISwm7VhQ="}, + }, + }, + logExpected: true, + consumerFailure: false, + expectedStatusCode: http.StatusOK, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + var consumer consumer.Logs + if tc.consumerFailure { + consumer = consumertest.NewErr(errors.New("consumer failed")) + } else { + consumer = &consumertest.LogsSink{} + } + + ar, err := newAlertsReceiver(zaptest.NewLogger(t), AlertConfig{ + Secret: "some_secret", + }, consumer) + + require.NoError(t, err, "Failed to create alerts receiver") + + rec := httptest.NewRecorder() + ar.handleRequest(rec, tc.request) + + assert.Equal(t, tc.expectedStatusCode, rec.Code, "Status codes are not equal") + + if !tc.consumerFailure { + if tc.logExpected { + assert.Equal(t, 1, consumer.(*consumertest.LogsSink).LogRecordCount(), "Did not receive log record") + } else { + assert.Equal(t, 0, consumer.(*consumertest.LogsSink).LogRecordCount(), "Received log record when it should have been dropped") + } + } + }) + } +} + +func compareLogs(expected, actual plog.Logs) error { + if expected.ResourceLogs().Len() != actual.ResourceLogs().Len() { + return fmt.Errorf("amount of ResourceLogs between Logs are not equal (expected: %d, actual: %d)", + expected.ResourceLogs().Len(), + actual.ResourceLogs().Len()) + } + + for i := 0; i < expected.ResourceLogs().Len(); i++ { + err := compareResourceLogs(expected.ResourceLogs().At(i), actual.ResourceLogs().At(i)) + if err != nil { + return fmt.Errorf("resource logs at index %d: %w", i, err) + } + } + + return nil +} + +func compareResourceLogs(expected, actual plog.ResourceLogs) error { + if expected.SchemaUrl() != actual.SchemaUrl() { + return fmt.Errorf("resource logs SchemaUrl doesn't match (expected: %s, actual: %s)", + expected.SchemaUrl(), + actual.SchemaUrl()) + } + + if !reflect.DeepEqual(expected.Resource().Attributes().AsRaw(), actual.Resource().Attributes().AsRaw()) { + return fmt.Errorf("resource logs Attributes doesn't match (expected: %+v, actual: %+v)", + expected.Resource().Attributes().AsRaw(), + actual.Resource().Attributes().AsRaw()) + } + + if expected.Resource().DroppedAttributesCount() != actual.Resource().DroppedAttributesCount() { + return fmt.Errorf("resource logs DroppedAttributesCount doesn't match (expected: %d, actual: %d)", + expected.Resource().DroppedAttributesCount(), + actual.Resource().DroppedAttributesCount()) + } + + if expected.ScopeLogs().Len() != actual.ScopeLogs().Len() { + return fmt.Errorf("amount of ScopeLogs between ResourceLogs are not equal (expected: %d, actual: %d)", + expected.ScopeLogs().Len(), + actual.ScopeLogs().Len()) + } + + for i := 0; i < expected.ScopeLogs().Len(); i++ { + err := compareScopeLogs(expected.ScopeLogs().At(i), actual.ScopeLogs().At(i)) + if err != nil { + return fmt.Errorf("scope logs at index %d: %w", i, err) + } + } + + return nil +} + +func compareScopeLogs(expected, actual plog.ScopeLogs) error { + if expected.SchemaUrl() != actual.SchemaUrl() { + return fmt.Errorf("log scope SchemaUrl doesn't match (expected: %s, actual: %s)", + expected.SchemaUrl(), + actual.SchemaUrl()) + } + + if expected.Scope().Name() != actual.Scope().Name() { + return fmt.Errorf("log scope Name doesn't match (expected: %s, actual: %s)", + expected.Scope().Name(), + actual.Scope().Name()) + } + + if expected.Scope().Version() != actual.Scope().Version() { + return fmt.Errorf("log scope Version doesn't match (expected: %s, actual: %s)", + expected.Scope().Version(), + actual.Scope().Version()) + } + + if expected.LogRecords().Len() != actual.LogRecords().Len() { + return fmt.Errorf("amount of log records between ScopeLogs are not equal (expected: %d, actual: %d)", + expected.LogRecords().Len(), + actual.LogRecords().Len()) + } + + for i := 0; i < expected.LogRecords().Len(); i++ { + err := compareLogRecord(expected.LogRecords().At(i), actual.LogRecords().At(i)) + if err != nil { + return fmt.Errorf("log record at index %d: %w", i, err) + } + } + + return nil +} + +func compareLogRecord(expected, actual plog.LogRecord) error { + if expected.Flags() != actual.Flags() { + return fmt.Errorf("log record Flags doesn't match (expected: %d, actual: %d)", + expected.Flags(), + actual.Flags()) + } + + if expected.DroppedAttributesCount() != actual.DroppedAttributesCount() { + return fmt.Errorf("log record DroppedAttributesCount doesn't match (expected: %d, actual: %d)", + expected.DroppedAttributesCount(), + actual.DroppedAttributesCount()) + } + + if expected.Timestamp() != actual.Timestamp() { + return fmt.Errorf("log record Timestamp doesn't match (expected: %d, actual: %d)", + expected.Timestamp(), + actual.Timestamp()) + } + + if expected.SeverityNumber() != actual.SeverityNumber() { + return fmt.Errorf("log record SeverityNumber doesn't match (expected: %d, actual: %d)", + expected.SeverityNumber(), + actual.SeverityNumber()) + } + + if expected.SeverityText() != actual.SeverityText() { + return fmt.Errorf("log record SeverityText doesn't match (expected: %s, actual: %s)", + expected.SeverityText(), + actual.SeverityText()) + } + + if expected.TraceID() != actual.TraceID() { + return fmt.Errorf("log record TraceID doesn't match (expected: %d, actual: %d)", + expected.TraceID(), + actual.TraceID()) + } + + if expected.SpanID() != actual.SpanID() { + return fmt.Errorf("log record SpanID doesn't match (expected: %d, actual: %d)", + expected.SpanID(), + actual.SpanID()) + } + + if !expected.Body().Equal(actual.Body()) { + return fmt.Errorf("log record Body doesn't match (expected: %s, actual: %s)", + expected.Body().AsString(), + actual.Body().AsString()) + } + + if !reflect.DeepEqual(expected.Attributes().AsRaw(), actual.Attributes().AsRaw()) { + return fmt.Errorf("log record Attributes doesn't match (expected: %#v, actual: %#v)", + expected.Attributes().AsRaw(), + actual.Attributes().AsRaw()) + } + + return nil +} diff --git a/receiver/mongodbatlasreceiver/config.go b/receiver/mongodbatlasreceiver/config.go index 730368d81c31..782674a8af67 100644 --- a/receiver/mongodbatlasreceiver/config.go +++ b/receiver/mongodbatlasreceiver/config.go @@ -15,9 +15,15 @@ package mongodbatlasreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver" import ( + "errors" + "fmt" + "net" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/config/configtls" "go.opentelemetry.io/collector/exporter/exporterhelper" "go.opentelemetry.io/collector/receiver/scraperhelper" + "go.uber.org/multierr" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/internal/metadata" ) @@ -26,10 +32,67 @@ var _ config.Receiver = (*Config)(nil) type Config struct { scraperhelper.ScraperControllerSettings `mapstructure:",squash"` - PublicKey string `mapstructure:"public_key"` - PrivateKey string `mapstructure:"private_key"` - Granularity string `mapstructure:"granularity"` - Metrics metadata.MetricsSettings `mapstructure:"metrics"` + PublicKey string `mapstructure:"public_key"` + PrivateKey string `mapstructure:"private_key"` + Granularity string `mapstructure:"granularity"` + Metrics metadata.MetricsSettings `mapstructure:"metrics"` + Alerts AlertConfig `mapstructure:"alerts"` + RetrySettings exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` +} + +type AlertConfig struct { + Enabled bool `mapstructure:"enabled"` + Endpoint string `mapstructure:"endpoint"` + Secret string `mapstructure:"secret"` + TLS *configtls.TLSServerSetting `mapstructure:"tls"` +} + +var ( + errNoEndpoint = errors.New("an endpoint must be specified") + errNoSecret = errors.New("a webhook secret must be specified") + errNoCert = errors.New("tls was configured, but no cert file was specified") + errNoKey = errors.New("tls was configured, but no key file was specified") +) + +func (c *Config) Validate() error { + var errs error + + errs = multierr.Append(errs, c.ScraperControllerSettings.Validate()) + errs = multierr.Append(errs, c.Alerts.validate()) + + return errs +} + +func (a *AlertConfig) validate() error { + var errs error + + if !a.Enabled { + // No need to further validate, receiving alerts is disabled. + return nil + } + + if a.Endpoint == "" { + errs = multierr.Append(errs, errNoEndpoint) + } + + _, _, err := net.SplitHostPort(a.Endpoint) + if err != nil { + errs = multierr.Append(errs, fmt.Errorf("failed to split endpoint into 'host:port' pair: %w", err)) + } + + if a.Secret == "" { + errs = multierr.Append(errs, errNoSecret) + } + + if a.TLS != nil { + if a.TLS.CertFile == "" { + errs = multierr.Append(errs, errNoCert) + } + + if a.TLS.KeyFile == "" { + errs = multierr.Append(errs, errNoKey) + } + } - RetrySettings exporterhelper.RetrySettings `mapstructure:"retry_on_failure"` + return errs } diff --git a/receiver/mongodbatlasreceiver/config_test.go b/receiver/mongodbatlasreceiver/config_test.go new file mode 100644 index 000000000000..e40967aa8a8c --- /dev/null +++ b/receiver/mongodbatlasreceiver/config_test.go @@ -0,0 +1,120 @@ +// 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 mongodbatlasreceiver + +import ( + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/config/configtls" +) + +func TestValidate(t *testing.T) { + testCases := []struct { + name string + input Config + expectedErr string + }{ + { + name: "Empty config", + input: Config{}, + }, + { + name: "Valid alerts config", + input: Config{ + Alerts: AlertConfig{ + Enabled: true, + Endpoint: "0.0.0.0:7706", + Secret: "some_secret", + }, + }, + }, + { + name: "Alerts missing endpoint", + input: Config{ + Alerts: AlertConfig{ + Enabled: true, + Secret: "some_secret", + }, + }, + expectedErr: errNoEndpoint.Error(), + }, + { + name: "Alerts missing secret", + input: Config{ + Alerts: AlertConfig{ + Enabled: true, + Endpoint: "0.0.0.0:7706", + }, + }, + expectedErr: errNoSecret.Error(), + }, + { + name: "Invalid endpoint", + input: Config{ + Alerts: AlertConfig{ + Enabled: true, + Endpoint: "7706", + Secret: "some_secret", + }, + }, + expectedErr: "failed to split endpoint into 'host:port' pair", + }, + { + name: "TLS config missing key", + input: Config{ + Alerts: AlertConfig{ + Enabled: true, + Endpoint: "0.0.0.0:7706", + Secret: "some_secret", + TLS: &configtls.TLSServerSetting{ + TLSSetting: configtls.TLSSetting{ + CertFile: "some_cert_file", + }, + }, + }, + }, + expectedErr: errNoKey.Error(), + }, + { + name: "TLS config missing cert", + input: Config{ + Alerts: AlertConfig{ + Enabled: true, + Endpoint: "0.0.0.0:7706", + Secret: "some_secret", + TLS: &configtls.TLSServerSetting{ + TLSSetting: configtls.TLSSetting{ + KeyFile: "some_key_file", + }, + }, + }, + }, + expectedErr: errNoCert.Error(), + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + err := tc.input.Validate() + if tc.expectedErr != "" { + require.Error(t, err) + require.Contains(t, err.Error(), tc.expectedErr) + } else { + require.NoError(t, err) + } + }) + } +} diff --git a/receiver/mongodbatlasreceiver/factory.go b/receiver/mongodbatlasreceiver/factory.go index 1fd7febe16bc..154e374f8506 100644 --- a/receiver/mongodbatlasreceiver/factory.go +++ b/receiver/mongodbatlasreceiver/factory.go @@ -28,8 +28,9 @@ import ( ) const ( - typeStr = "mongodbatlas" - defaultGranularity = "PT1M" // 1-minute, as per https://docs.atlas.mongodb.com/reference/api/process-measurements/ + typeStr = "mongodbatlas" + defaultGranularity = "PT1M" // 1-minute, as per https://docs.atlas.mongodb.com/reference/api/process-measurements/ + defaultAlertsEnabled = false ) // NewFactory creates a factory for MongoDB Atlas receiver @@ -37,7 +38,8 @@ func NewFactory() component.ReceiverFactory { return component.NewReceiverFactory( typeStr, createDefaultConfig, - component.WithMetricsReceiver(createMetricsReceiver)) + component.WithMetricsReceiver(createMetricsReceiver), + component.WithLogsReceiver(createLogsReceiver)) } func createMetricsReceiver( @@ -55,11 +57,29 @@ func createMetricsReceiver( return scraperhelper.NewScraperControllerReceiver(&cfg.ScraperControllerSettings, params, consumer, scraperhelper.AddScraper(ms)) } +func createLogsReceiver( + _ context.Context, + params component.ReceiverCreateSettings, + rConf config.Receiver, + consumer consumer.Logs, +) (component.LogsReceiver, error) { + cfg := rConf.(*Config) + recv, err := newAlertsReceiver(params.Logger, cfg.Alerts, consumer) + if err != nil { + return nil, fmt.Errorf("unable to create a MongoDB Atlas Receiver instance: %w", err) + } + + return recv, nil +} + func createDefaultConfig() config.Receiver { return &Config{ ScraperControllerSettings: scraperhelper.NewDefaultScraperControllerSettings(typeStr), Granularity: defaultGranularity, RetrySettings: exporterhelper.NewDefaultRetrySettings(), Metrics: metadata.DefaultMetricsSettings(), + Alerts: AlertConfig{ + Enabled: defaultAlertsEnabled, + }, } } diff --git a/receiver/mongodbatlasreceiver/go.mod b/receiver/mongodbatlasreceiver/go.mod index 9c8e78852043..478431f56d6a 100644 --- a/receiver/mongodbatlasreceiver/go.mod +++ b/receiver/mongodbatlasreceiver/go.mod @@ -8,15 +8,17 @@ require ( github.com/mongodb-forks/digest v1.0.4 github.com/pkg/errors v0.9.1 go.mongodb.org/atlas v0.16.0 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) require ( + github.com/benbjohnson/clock v1.3.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.2 // indirect + github.com/google/go-cmp v0.5.8 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect @@ -41,12 +43,12 @@ require ( google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect - gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) require ( + github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector/pdata v0.53.0 - go.uber.org/multierr v1.8.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.uber.org/multierr v1.8.0 ) diff --git a/receiver/mongodbatlasreceiver/go.sum b/receiver/mongodbatlasreceiver/go.sum index 832123090db6..fe1d15fc21ea 100644 --- a/receiver/mongodbatlasreceiver/go.sum +++ b/receiver/mongodbatlasreceiver/go.sum @@ -17,6 +17,7 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21 github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -89,8 +90,9 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= +github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -164,6 +166,8 @@ github.com/mongodb-forks/digest v1.0.4 h1:9FrGTc7MGAchgaQBcXBnEwUM/Oo8obW7OGWxns github.com/mongodb-forks/digest v1.0.4/go.mod h1:eHRfgovT+dvSFfltrOa27hy1oR/rcwyDdp5H1ZQxEMA= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 h1:jQDPrr2ndsDm3G3fpkD6kyNdr4L5Qc3EgWaAwQ8kNFQ= +github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0/go.mod h1:BcHyhO0QOAvn8eQJ3NZ5OaLx/Z7gum4mMwr2AfeWtfA= github.com/openlyinc/pointy v1.1.2 h1:LywVV2BWC5Sp5v7FoP4bUD+2Yn5k0VNeRbU5vq9jUMY= github.com/openlyinc/pointy v1.1.2/go.mod h1:w2Sytx+0FVuMKn37xpXIAyBNhFNBIJGR/v2m7ik1WtM= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= @@ -203,10 +207,10 @@ go.mongodb.org/atlas v0.16.0 h1:IqnDuK3XAZUgJ5lPHc4v4z4B8F6mvsS37O4ck7tOYVc= go.mongodb.org/atlas v0.16.0/go.mod h1:lQhRHIxc6jQHEK3/q9WLu/SdBkPj2fQYhjLGUF6Z3U8= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= @@ -296,7 +300,6 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -336,8 +339,7 @@ google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo= -gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/receiver/mongodbatlasreceiver/internal/model/alerts.go b/receiver/mongodbatlasreceiver/internal/model/alerts.go new file mode 100644 index 000000000000..94597c76004b --- /dev/null +++ b/receiver/mongodbatlasreceiver/internal/model/alerts.go @@ -0,0 +1,43 @@ +// 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 model // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/mongodbatlasreceiver/internal/model" + +// Alert represents an alert. It uses the format defined by mongodb atlas. +// See: https://www.mongodb.com/docs/atlas/reference/api/alerts-get-alert/#response-elements +type Alert struct { + Created string `json:"created"` + AlertConfigID string `json:"alertConfigId"` + GroupID string `json:"groupId"` + EventType string `json:"eventTypeName"` + ID string `json:"id"` + HumanReadable string `json:"humanReadable"` + Updated string `json:"updated"` + Status string `json:"status"` + ReplicaSetName *string `json:"replicaSetName"` + MetricName *string `json:"metricName"` + TypeName *string `json:"typeName"` + ClusterName *string `json:"clusterName"` + UserAlias *string `json:"userAlias"` + LastNotified *string `json:"lastNotified"` + Resolved *string `json:"resolved"` + AcknowledgementComment *string `json:"acknowledgementComment"` + AcknowledgementUsername *string `json:"acknowledgingUsername"` + AcknowledgedUntil *string `json:"acknowledgedUntil"` + CurrentValue *struct { + Number float64 `json:"number"` + Units string `json:"units"` + } `json:"currentValue"` + HostNameAndPort *string `json:"hostnameAndPort"` +} diff --git a/receiver/mongodbatlasreceiver/testdata/alerts/cert/ca.crt b/receiver/mongodbatlasreceiver/testdata/alerts/cert/ca.crt new file mode 100644 index 000000000000..f43c8329fdf0 --- /dev/null +++ b/receiver/mongodbatlasreceiver/testdata/alerts/cert/ca.crt @@ -0,0 +1,20 @@ +-----BEGIN CERTIFICATE----- +MIIDNjCCAh4CCQCNuQ+xJh/PFjANBgkqhkiG9w0BAQsFADBdMQswCQYDVQQGEwJB +VTESMBAGA1UECAwJQXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoM +CU15T3JnTmFtZTEVMBMGA1UEAwwMTXlDb21tb25OYW1lMB4XDTIyMDYxMDE4MDUz +MVoXDTMyMDYwNzE4MDUzMVowXTELMAkGA1UEBhMCQVUxEjAQBgNVBAgMCUF1c3Ry +YWxpYTEPMA0GA1UEBwwGU3lkbmV5MRIwEAYDVQQKDAlNeU9yZ05hbWUxFTATBgNV +BAMMDE15Q29tbW9uTmFtZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB +AMLaWbCxa0ZmLBGZYNg2vcMrcKEmPXfgHBC0zRKEphRcI7wlo/SMmjcRaSf6+WZ5 +Ft+O7xsQY/6IhXaNwSImlt5gOuLmciZYexFvL5d052Jhv7KggL6oTEenCt3RLWA9 +meY7exBE+SchKwNBXtM01M7mSuylwOiV4fykFVdS/+UuJYaZNgGVpz/9vTO9eCgK +tFgVVDYkDGS7Yl2RSN3Dn2vpSCXlIp3k3zbTqWBWev8gjeGenP4GYTgi6MnH7CeD +hX2vKPJq5VQteVIG+DkhnueJQOTeSxLnwrGWJruN23sXPac3u1COsDTj40f7YzKJ +szrwWvjEG91btbfwIlnT9q0CAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAsrcK4waz +uyB8Kv7xkv9Guu9TeGpthDXTKQt/wuW6mtV8+gkQ5e3NPua6O1BGBbScBmIKhqRC +NYXnk3eDW8Qm5dOSYUbfCbID6fmh1IH+E2/wa2DeALhKKpo4tuHIkuvaav625nm4 +BAB1grIPSdTBLRuNTRLtrrPqCrqrkRTAS3u25sUraEmdivF6jLMw90Qwbcienl8h +2eNXNHQufsQCodbJkw7BZVLIWBLU5VI70XvUB19Du2QiT92TyRdIBRjg8YMtQbqm +OMajL6ghp+LH1MUQSDCC8gL8vJUUljWJ9Rt0Mx0WT3xyyz9itNuRGkfJxJIE0tb4 +sf/X9dgiJfN5Dw== +-----END CERTIFICATE----- diff --git a/receiver/mongodbatlasreceiver/testdata/alerts/cert/client.crt b/receiver/mongodbatlasreceiver/testdata/alerts/cert/client.crt new file mode 100644 index 000000000000..df25dcd6d28f --- /dev/null +++ b/receiver/mongodbatlasreceiver/testdata/alerts/cert/client.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDazCCAlOgAwIBAgIJANNRhBeBrCOxMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV +BAYTAkFVMRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAG +A1UECgwJTXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwHhcNMjIwNjEw +MTgwNTMxWhcNMzIwNjA3MTgwNTMxWjBdMQswCQYDVQQGEwJBVTESMBAGA1UECAwJ +QXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoMCU15T3JnTmFtZTEV +MBMGA1UEAwwMTXlDb21tb25OYW1lMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAtvmvU7LYNJtapdMHL+xzrd3afitciPhzkqEffxH9bBmW7mQJ2BMcyMEq +Ux6RkTD3TiyUVDOQYppKi5C0vmgHxJ96Qg7tzFbJJMnNBUz18ojyB+dstbLDcdYU +UZWh7IAJhOM/toQ8J5/N6J+GaKcJbxPSw7w/TOv9eDUd0UYuSzy7rgO+YtddS8Am +aLKkhetKDeCJNxG4eCgKjTgZv9TR5OsWZtcPIOnvqSL8pwX2YHZ0H9zndcCwLbMo +Q5niDxnV51bY0M9vdXXDLE8TzLiv4M8/rb8ZKL4Z53E+m2esNh2TTLtWyeTAhj+r +lJ7mcs5FG3tmQ70GimctceiQdWQ7TwIDAQABoy4wLDAUBgNVHREEDTALgglsb2Nh +bGhvc3QwFAYDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBCwUAA4IBAQBQ +fSrEXLeha+eJjjpd4G0Y68GHajOrZ/j/wHaO5ZMWmQAKkfWaj5MLpjs8E/0kFyou +ivqcb9MeTlIzZ59w0yxTtCthhWpSaKjr+U61dtETqUHTDUhWmodZacm084IjuoCe +pcjBAIpFN72wofAIK9FU6WD/2ac3i59evE1PY0o1uzrja/BHvDFp3HKbX0+jZSso +TrrnbyyiJ7aEZmARGfV79/RhPRgmybT/pNNgVDSk2MrM+Cqro9lLSFLBLwn/Y4kC +clFi8aizk6VIPETPoAs4g4c+VTsTkLlXhNytxcWT047yz3AL0m8VbCvERmzavVyC +2BC1xhztDNYZZf92BVrU +-----END CERTIFICATE----- diff --git a/receiver/mongodbatlasreceiver/testdata/alerts/cert/client.key b/receiver/mongodbatlasreceiver/testdata/alerts/cert/client.key new file mode 100644 index 000000000000..737817b3dd46 --- /dev/null +++ b/receiver/mongodbatlasreceiver/testdata/alerts/cert/client.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAtvmvU7LYNJtapdMHL+xzrd3afitciPhzkqEffxH9bBmW7mQJ +2BMcyMEqUx6RkTD3TiyUVDOQYppKi5C0vmgHxJ96Qg7tzFbJJMnNBUz18ojyB+ds +tbLDcdYUUZWh7IAJhOM/toQ8J5/N6J+GaKcJbxPSw7w/TOv9eDUd0UYuSzy7rgO+ +YtddS8AmaLKkhetKDeCJNxG4eCgKjTgZv9TR5OsWZtcPIOnvqSL8pwX2YHZ0H9zn +dcCwLbMoQ5niDxnV51bY0M9vdXXDLE8TzLiv4M8/rb8ZKL4Z53E+m2esNh2TTLtW +yeTAhj+rlJ7mcs5FG3tmQ70GimctceiQdWQ7TwIDAQABAoIBABLMUhvqOtYkw8pX +hNyCkVvieAkQUWBtDgqZbQ/z/DI36s6xDmXZiNKDLeL+N/xPqIiqgc6owYOv0ErI +YhlRvMKRk9Dnkby1idKyvNJ3lqkFMsBnIT8Fj5jJYqsDEXCnstKpOil5KmjzvQbS +JM/poUl9IuEjHOm9MPxBkL+oUyc9eGNAggOQqGVCRUB8ogKofpv/kgegP4Sh9g2I +Hr2iVG2MJPXWaLz91zTHeR3hrCbnmGCaJrfNfTBAYwP7fkxA/3/orPdWVoWKwn2S +PVE8QCsrIstN/GNGqSvCDHrem6gdwkc3mVha9s5OtCH8PWkqROnDn6MiGQTQH0HK +cKa/irkCgYEA75aoZnQbOzcA7aYw+dg1MWdREO7QIYYXgVpRctBdUR274L2OTayp +wEKG11xHT6FSoQLlVxc+RIeb7ImmYdBa+53JKirmDiinaJTLHtW40vnhjJ6A+lYl +MXABFvIOcBvkC5ozYXktBTPSD2kpxaEQ1mOEJvNRrEdqn5rjChate70CgYEAw4JH +GxhX1VtAedy1NIi8K2ojG2NHcIKa1S948vz2Ohm1LcDhse0PxqpgdKE2zHE0gWWk +9/rigGsioTE0so6xoWkRFwRiS123C5u1RnccZt3n4jCO2iVBLNBJU2O6PwCoidPX +vpDZOQLny4TBnN5gFha7xCIUu8CuTYKzdRAdnfsCgYEAwRgoQuJirBfJfL9Li6Fw +RY/iKwZ94fbjbNIxAJrkCqMvL5M2ZG27JgO4D0wFAS2gnbnqwoUuHyc4SKwr13uI +SHBDl+OZJGIpgkUha4mOeyL/YEjC5H+XXD/L8QVHE5227o7pyC5UVXQNYXQ9QVVt +b4wnDwldkr7ANUAsqY3bZfUCgYAGEuIKoXL5GeCi6IxomWbfImj8zNTHVgdhYBwt +0FYF8A6E4V0hne/DiD9+4BNHvqyW6IV7frvSqYFl6JVuhqhWD2GMiYJUPREWtzum +eMTVHUe66y9E76tarQ3aHVsH4glaXs5xCSb2cnSpCfLJ4M6zYPlsWnKycoX3unvA +w0NoSQKBgBe0gMurZOtcAHmyHxDtTuWoPDKanNqIMgMRQGLCBUqaoTKpkJl0n3ie +Dg50YbFR0tLGJ3WiXoFHApNLg+TKpjxDP21Xeitq+wkK1634XnwMv7GIcb77kveH +VW/H7LwoHVIOxAP1g5yrtTjPFd/pVJP/NuNQwUePO8cbbs+55mzh +-----END RSA PRIVATE KEY----- diff --git a/receiver/mongodbatlasreceiver/testdata/alerts/cert/server.crt b/receiver/mongodbatlasreceiver/testdata/alerts/cert/server.crt new file mode 100644 index 000000000000..1534a979bac3 --- /dev/null +++ b/receiver/mongodbatlasreceiver/testdata/alerts/cert/server.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDazCCAlOgAwIBAgIJANNRhBeBrCOwMA0GCSqGSIb3DQEBCwUAMF0xCzAJBgNV +BAYTAkFVMRIwEAYDVQQIDAlBdXN0cmFsaWExDzANBgNVBAcMBlN5ZG5leTESMBAG +A1UECgwJTXlPcmdOYW1lMRUwEwYDVQQDDAxNeUNvbW1vbk5hbWUwHhcNMjIwNjEw +MTgwNTMxWhcNMzIwNjA3MTgwNTMxWjBdMQswCQYDVQQGEwJBVTESMBAGA1UECAwJ +QXVzdHJhbGlhMQ8wDQYDVQQHDAZTeWRuZXkxEjAQBgNVBAoMCU15T3JnTmFtZTEV +MBMGA1UEAwwMTXlDb21tb25OYW1lMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAtgVDDILlvIPoglF0a0kzGbD4JsgJGz0qnz0XFsWuXiJXbAHti7G3KKUm +ahFWr0dsLcA5jHzUBEH92sX13egJsUaItScmpzCk3eoLp48MHVfpQX4V/xFnnDNB +jQDyTQwDnToDz+kfGumWNkrz7wRc/27DPBm4zLkfrOgAXiYQZrp51IzJ3PnkeSzm +M/L/XyQOcM9px2oh5CjSir1EEtHRGPybmfsRNk7pxhVLrn+8RQ+S/NDh8IkqlUbM +MuETlRGVD3C9WWLLJNyaHvFnDQj9XpuLbfVDtF98kF6Bx7/2DoOb0O4MTY2Cdyco ++3sQbzopU1QXMOkOW2owFlW0IbHHwQIDAQABoy4wLDAUBgNVHREEDTALgglsb2Nh +bGhvc3QwFAYDVR0RBA0wC4IJbG9jYWxob3N0MA0GCSqGSIb3DQEBCwUAA4IBAQAP +USEfSFzHbn0XN9NlY5XYxoxRjosYNyUJJijxHPfE2npzl1gMeIpj5ferPfZ+ECVb +Xa3ujXz6wG+VMs6OFHDBAYoI+J51KYt0e+hY3dW6e8nhBDLcZCyk3omSnmkap0qi +zxmQc1UptPyIh6kg4feU5GAtHxqvhbs4L8pWk7uMxJSQf11sldSR30J5xqxl5MqH +bMuGHmyyi/YNq4LnXQrca95TE4tAyuwaiPznEAOiSWeo1Ycb71AxS7csN9imSSpd +WlNYS6wpk0nkmAY3rTE3xYZErx8Xx2cCpOZtHlojZ3FTB7eSbzLd72vShkLXyCiu +USxpgyRzvZcBcdoIBt6Q +-----END CERTIFICATE----- diff --git a/receiver/mongodbatlasreceiver/testdata/alerts/cert/server.key b/receiver/mongodbatlasreceiver/testdata/alerts/cert/server.key new file mode 100644 index 000000000000..be24af546c2e --- /dev/null +++ b/receiver/mongodbatlasreceiver/testdata/alerts/cert/server.key @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEowIBAAKCAQEAtgVDDILlvIPoglF0a0kzGbD4JsgJGz0qnz0XFsWuXiJXbAHt +i7G3KKUmahFWr0dsLcA5jHzUBEH92sX13egJsUaItScmpzCk3eoLp48MHVfpQX4V +/xFnnDNBjQDyTQwDnToDz+kfGumWNkrz7wRc/27DPBm4zLkfrOgAXiYQZrp51IzJ +3PnkeSzmM/L/XyQOcM9px2oh5CjSir1EEtHRGPybmfsRNk7pxhVLrn+8RQ+S/NDh +8IkqlUbMMuETlRGVD3C9WWLLJNyaHvFnDQj9XpuLbfVDtF98kF6Bx7/2DoOb0O4M +TY2Cdyco+3sQbzopU1QXMOkOW2owFlW0IbHHwQIDAQABAoIBAApSGg8njOc3g4OA +It3CdMdMJYXtabbFrRkCWcDMzKpBwDs7kMCO/xeq5Za2DPg7UIL3l0vD+DGVnFM/ +TkWa1pHasf2zjpmERJTgpHCHx+QSDAPOpmikD//nWBwqpZKAz+OmWnj7euwHuqCx +d0tiL/O70A4kVzokdQtUzFCKT/vDFn6u5RGJA81DS2m82hWqaSIe/ilGcsCSgB17 +c1IodYMZKESAR33nR1Xm3JOPauDtntZIgpxJsZ+Iczr5FUvOjsPxi32qQ+35rX7X +lNt3HIfnoBJ0tEjWEuIFNY2cbSHc8l8UcHK/FHGIt0w9dbdsdpgOuNkp4oj18Tez +Gz299wECgYEA6cB7x4j0A1nM5YXBE47XiWZH6DqlazO72/6ipG0HyQyzzx71Sp+1 +hssXHWh8jgboGfBQb5Nb0atQDGZg9nNHYxTQyuYfHUPxautpKaMwiqtfyF+SFcDu +wgozPgSZSP3ah5rMp+H3YXj+bD/eYcMmowdI2Gi6ZFWY64g1AqFwfGkCgYEAx1hP +lFkdfGJmS0mYcZCb9xalP2VSE59BGdIgoXc73NCUElwfINLBzzI66PCWcKFSwLPQ +kxnrFH0/lWbLmaBIxym5nRRZVsiO6BHWy/JAnKdflkVybB9eSPwawpqBsvhEe0Ve +Ux2iTz7WSTSIbmeWAOM9D2SD1aQ8CXicfr0SZZkCgYEAp2k0/XZHlPLGvYeq/W/r +TDuVumvuNzYJEIlxQKPZ1JMlYGzCrtxtbQmdF3HS6wFlT9Z+NTrrouG35fmY7kkn +0n2BACAKHrKff7z0R17aECam5eIUxUG1fgFCK+OtSMqOrVofwwkiXIwEY9DmW0wi +Kta3xE5VWDC54c5ecPDgmCkCgYADjw4MpfKiz9bnrS6tiFlgdeUJVrO6afNtlJTE +jS5iaM7b7Q0ZNuoC2vC2S+VDqX2itxMYLTRHL109O5KS8YubEqGfrkdSB06V0gu1 +pGOG6G4Kbr72MzEpuGZ55uw917TRRpHChhrps0N8FxYAcpT4+xWR+sdnvwDbYm3Y +zWNQsQKBgDACaZshHHq+KlUydelR4ZdHimepr0LfmGmm2D2wHSKMDxN005csNeQe +0QPld3O8R07pmc19RZmx7fvl3ePVUyQQiNHug5s7nyb9lEhhtSJGSRgCWK4X1EbJ +NinIjz45NBDLqDwcdxhuEOL+Z6gK82ZegbMkocPTdtzHzm6DhOA/ +-----END RSA PRIVATE KEY----- diff --git a/receiver/mongodbatlasreceiver/testdata/alerts/golden/metric-threshold-closed.json b/receiver/mongodbatlasreceiver/testdata/alerts/golden/metric-threshold-closed.json new file mode 100644 index 000000000000..ff76541d10e4 --- /dev/null +++ b/receiver/mongodbatlasreceiver/testdata/alerts/golden/metric-threshold-closed.json @@ -0,0 +1,167 @@ +{ + "resourceLogs": [ + { + "resource": { + "attributes": [ + { + "key": "mongodbatlas.group.id", + "value": { + "stringValue": "REDACTED-group" + } + }, + { + "key": "mongodbatlas.alert.config.id", + "value": { + "stringValue": "REDACTED-alert" + } + }, + { + "key": "mongodbatlas.cluster.name", + "value": { + "stringValue": "Cluster0" + } + }, + { + "key": "mongodbatlas.replica_set.name", + "value": { + "stringValue": "REDACTED-shard-0" + } + } + ] + }, + "scopeLogs": [ + { + "scope": {}, + "logRecords": [ + { + "timeUnixNano": "1654288714000000000", + "observedTimeUnixNano": "1654883723701540000", + "severityNumber": "SEVERITY_NUMBER_INFO", + "body": { + "stringValue": "{\n \"replicaSetName\": \"REDACTED-shard-0\",\n \"metricName\": \"CONNECTIONS\",\n \"acknowledgedUntil\": \"2022-06-03T20:45:56Z\",\n \"created\": \"2022-06-03T19:43:40Z\",\n \"acknowledgingUsername\": \"REDACTED@gmail.com\",\n \"groupId\": \"REDACTED-group\",\n \"typeName\": \"HOST_METRIC\",\n \"hostnameAndPort\": \"REDACTED-shard-00-02.f1eir.mongodb.net:27017\",\n \"humanReadable\": \"Project: Project 0\\n\\nOrganization: REDACTED\u0026#x27;s Org - 2022-05-31\\n\\n----------------------------------------\\n\\nCLOSED\\nConnections has gone above 0 \\ncluster0-shard-00-02.f1eir.mongodb.net\\nCreated: 2022/06/03 19:43 GMT\\nReplica Set: REDACTED-shard-0\\nType: Secondary\\nCurrent Value: 0 \\n\\n----------------------------------------\\n\\n\",\n \"acknowledgementComment\": \"Test\",\n \"alertConfigId\": \"REDACTED-alert\",\n \"clusterName\": \"Cluster0\",\n \"userAlias\": \"cluster0-shard-00-02.f1eir.mongodb.net\",\n \"eventTypeName\": \"OUTSIDE_METRIC_THRESHOLD\",\n \"links\": [\n {\n \"rel\": \"self\",\n \"href\": \"https://cloud.mongodb.com/api/atlas/v1.0/groups/REDACTED-group/alerts/629a646c75d64f1902578ff7\"\n }\n ],\n \"id\": \"629a646c75d64f1902578ff7\",\n \"lastNotified\": \"2022-06-03T19:45:57Z\",\n \"updated\": \"2022-06-03T20:38:34Z\",\n \"currentValue\": {\n \"number\": 0,\n \"units\": \"RAW\"\n },\n \"resolved\": \"2022-06-03T20:38:34Z\",\n \"status\": \"CLOSED\"\n}\n" + }, + "attributes": [ + { + "key": "event.domain", + "value": { + "stringValue": "mongodbatlas" + } + }, + { + "key": "event.name", + "value": { + "stringValue": "OUTSIDE_METRIC_THRESHOLD" + } + }, + { + "key": "message", + "value": { + "stringValue": "Project: Project 0\n\nOrganization: REDACTED\u0026#x27;s Org - 2022-05-31\n\n----------------------------------------\n\nCLOSED\nConnections has gone above 0 \ncluster0-shard-00-02.f1eir.mongodb.net\nCreated: 2022/06/03 19:43 GMT\nReplica Set: REDACTED-shard-0\nType: Secondary\nCurrent Value: 0 \n\n----------------------------------------\n\n" + } + }, + { + "key": "status", + "value": { + "stringValue": "CLOSED" + } + }, + { + "key": "created", + "value": { + "stringValue": "2022-06-03T19:43:40Z" + } + }, + { + "key": "updated", + "value": { + "stringValue": "2022-06-03T20:38:34Z" + } + }, + { + "key": "id", + "value": { + "stringValue": "629a646c75d64f1902578ff7" + } + }, + { + "key": "metric.name", + "value": { + "stringValue": "CONNECTIONS" + } + }, + { + "key": "type_name", + "value": { + "stringValue": "HOST_METRIC" + } + }, + { + "key": "user_alias", + "value": { + "stringValue": "cluster0-shard-00-02.f1eir.mongodb.net" + } + }, + { + "key": "last_notified", + "value": { + "stringValue": "2022-06-03T19:45:57Z" + } + }, + { + "key": "resolved", + "value": { + "stringValue": "2022-06-03T20:38:34Z" + } + }, + { + "key": "acknowledgement.comment", + "value": { + "stringValue": "Test" + } + }, + { + "key": "acknowledgement.username", + "value": { + "stringValue": "REDACTED@gmail.com" + } + }, + { + "key": "acknowledgement.until", + "value": { + "stringValue": "2022-06-03T20:45:56Z" + } + }, + { + "key": "metric.value", + "value": { + "doubleValue": 0 + } + }, + { + "key": "metric.units", + "value": { + "stringValue": "RAW" + } + }, + { + "key": "net.peer.name", + "value": { + "stringValue": "REDACTED-shard-00-02.f1eir.mongodb.net" + } + }, + { + "key": "net.peer.port", + "value": { + "intValue": "27017" + } + } + ], + "traceId": "", + "spanId": "" + } + ] + } + ] + } + ] +} diff --git a/receiver/mongodbatlasreceiver/testdata/alerts/golden/new-primary.json b/receiver/mongodbatlasreceiver/testdata/alerts/golden/new-primary.json new file mode 100644 index 000000000000..fdab12665ecf --- /dev/null +++ b/receiver/mongodbatlasreceiver/testdata/alerts/golden/new-primary.json @@ -0,0 +1,113 @@ +{ + "resourceLogs": [ + { + "resource": { + "attributes": [ + { + "key": "mongodbatlas.group.id", + "value": { + "stringValue": "REDACTED-group" + } + }, + { + "key": "mongodbatlas.alert.config.id", + "value": { + "stringValue": "REDACTED-alert" + } + }, + { + "key": "mongodbatlas.cluster.name", + "value": { + "stringValue": "Cluster0" + } + }, + { + "key": "mongodbatlas.replica_set.name", + "value": { + "stringValue": "REDACTED-shard-0" + } + } + ] + }, + "scopeLogs": [ + { + "scope": {}, + "logRecords": [ + { + "timeUnixNano": "1654295431000000000", + "observedTimeUnixNano": "1654883723716283000", + "severityNumber": "SEVERITY_NUMBER_INFO", + "body": { + "stringValue": "{\n \"replicaSetName\": \"REDACTED-shard-0\",\n \"created\": \"2022-06-03T22:30:31Z\",\n \"groupId\": \"REDACTED-group\",\n \"typeName\": \"REPLICA_SET\",\n \"hostnameAndPort\": \"REDACTED-shard-00-02.f1eir.mongodb.net:27017\",\n \"humanReadable\": \"Project: Project 0\\n\\nOrganization: REDACTED\u0026#x27;s Org - 2022-05-31\\n\\n----------------------------------------\\n\\nINFORMATIONAL\\nReplica set elected a new primary\\nREDACTED-shard-0\\nCreated: 2022/06/03 22:30 GMT\\nReplica Set: REDACTED-shard-0\\nCurrent Member State\\nDOWN: 1 member\\nSECONDARY: 1 member\\nPRIMARY: 1 member\\n\\n----------------------------------------\\n\\n\",\n \"alertConfigId\": \"REDACTED-alert\",\n \"clusterName\": \"Cluster0\",\n \"eventTypeName\": \"PRIMARY_ELECTED\",\n \"links\": [\n {\n \"rel\": \"self\",\n \"href\": \"https://cloud.mongodb.com/api/atlas/v1.0/groups/REDACTED-group/alerts/629a8b871dfc48492150a766\"\n }\n ],\n \"id\": \"629a8b871dfc48492150a766\",\n \"updated\": \"2022-06-03T22:30:31Z\",\n \"status\": \"INFORMATIONAL\"\n}\n" + }, + "attributes": [ + { + "key": "event.domain", + "value": { + "stringValue": "mongodbatlas" + } + }, + { + "key": "event.name", + "value": { + "stringValue": "PRIMARY_ELECTED" + } + }, + { + "key": "message", + "value": { + "stringValue": "Project: Project 0\n\nOrganization: REDACTED\u0026#x27;s Org - 2022-05-31\n\n----------------------------------------\n\nINFORMATIONAL\nReplica set elected a new primary\nREDACTED-shard-0\nCreated: 2022/06/03 22:30 GMT\nReplica Set: REDACTED-shard-0\nCurrent Member State\nDOWN: 1 member\nSECONDARY: 1 member\nPRIMARY: 1 member\n\n----------------------------------------\n\n" + } + }, + { + "key": "status", + "value": { + "stringValue": "INFORMATIONAL" + } + }, + { + "key": "created", + "value": { + "stringValue": "2022-06-03T22:30:31Z" + } + }, + { + "key": "updated", + "value": { + "stringValue": "2022-06-03T22:30:31Z" + } + }, + { + "key": "id", + "value": { + "stringValue": "629a8b871dfc48492150a766" + } + }, + { + "key": "type_name", + "value": { + "stringValue": "REPLICA_SET" + } + }, + { + "key": "net.peer.name", + "value": { + "stringValue": "REDACTED-shard-00-02.f1eir.mongodb.net" + } + }, + { + "key": "net.peer.port", + "value": { + "intValue": "27017" + } + } + ], + "traceId": "", + "spanId": "" + } + ] + } + ] + } + ] +} diff --git a/receiver/mongodbatlasreceiver/testdata/alerts/sample-payloads/metric-threshold-closed.json b/receiver/mongodbatlasreceiver/testdata/alerts/sample-payloads/metric-threshold-closed.json new file mode 100644 index 000000000000..4abe4c9f5d2c --- /dev/null +++ b/receiver/mongodbatlasreceiver/testdata/alerts/sample-payloads/metric-threshold-closed.json @@ -0,0 +1,31 @@ +{ + "replicaSetName": "REDACTED-shard-0", + "metricName": "CONNECTIONS", + "acknowledgedUntil": "2022-06-03T20:45:56Z", + "created": "2022-06-03T19:43:40Z", + "acknowledgingUsername": "REDACTED@gmail.com", + "groupId": "REDACTED-group", + "typeName": "HOST_METRIC", + "hostnameAndPort": "REDACTED-shard-00-02.f1eir.mongodb.net:27017", + "humanReadable": "Project: Project 0\n\nOrganization: REDACTED's Org - 2022-05-31\n\n----------------------------------------\n\nCLOSED\nConnections has gone above 0 \ncluster0-shard-00-02.f1eir.mongodb.net\nCreated: 2022/06/03 19:43 GMT\nReplica Set: REDACTED-shard-0\nType: Secondary\nCurrent Value: 0 \n\n----------------------------------------\n\n", + "acknowledgementComment": "Test", + "alertConfigId": "REDACTED-alert", + "clusterName": "Cluster0", + "userAlias": "cluster0-shard-00-02.f1eir.mongodb.net", + "eventTypeName": "OUTSIDE_METRIC_THRESHOLD", + "links": [ + { + "rel": "self", + "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/REDACTED-group/alerts/629a646c75d64f1902578ff7" + } + ], + "id": "629a646c75d64f1902578ff7", + "lastNotified": "2022-06-03T19:45:57Z", + "updated": "2022-06-03T20:38:34Z", + "currentValue": { + "number": 0, + "units": "RAW" + }, + "resolved": "2022-06-03T20:38:34Z", + "status": "CLOSED" +} diff --git a/receiver/mongodbatlasreceiver/testdata/alerts/sample-payloads/new-primary.json b/receiver/mongodbatlasreceiver/testdata/alerts/sample-payloads/new-primary.json new file mode 100644 index 000000000000..ec9667c9f210 --- /dev/null +++ b/receiver/mongodbatlasreceiver/testdata/alerts/sample-payloads/new-primary.json @@ -0,0 +1,20 @@ +{ + "replicaSetName": "REDACTED-shard-0", + "created": "2022-06-03T22:30:31Z", + "groupId": "REDACTED-group", + "typeName": "REPLICA_SET", + "hostnameAndPort": "REDACTED-shard-00-02.f1eir.mongodb.net:27017", + "humanReadable": "Project: Project 0\n\nOrganization: REDACTED's Org - 2022-05-31\n\n----------------------------------------\n\nINFORMATIONAL\nReplica set elected a new primary\nREDACTED-shard-0\nCreated: 2022/06/03 22:30 GMT\nReplica Set: REDACTED-shard-0\nCurrent Member State\nDOWN: 1 member\nSECONDARY: 1 member\nPRIMARY: 1 member\n\n----------------------------------------\n\n", + "alertConfigId": "REDACTED-alert", + "clusterName": "Cluster0", + "eventTypeName": "PRIMARY_ELECTED", + "links": [ + { + "rel": "self", + "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/REDACTED-group/alerts/629a8b871dfc48492150a766" + } + ], + "id": "629a8b871dfc48492150a766", + "updated": "2022-06-03T22:30:31Z", + "status": "INFORMATIONAL" +} diff --git a/receiver/mongodbreceiver/go.mod b/receiver/mongodbreceiver/go.mod index b74341450828..1eba95874fbe 100644 --- a/receiver/mongodbreceiver/go.mod +++ b/receiver/mongodbreceiver/go.mod @@ -4,40 +4,62 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 ) require ( github.com/hashicorp/go-version v1.5.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 + github.com/testcontainers/testcontainers-go v0.13.0 go.mongodb.org/mongo-driver v1.9.1 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) require ( + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.4.17 // indirect + github.com/Microsoft/hcsshim v0.8.23 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/containerd/cgroups v1.0.1 // indirect + github.com/containerd/containerd v1.5.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/docker v20.10.11+incompatible // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.4.0 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/go-stack/stack v1.8.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/go-cmp v0.5.8 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.15.6 // indirect github.com/knadh/koanf v1.4.1 // indirect github.com/kr/text v0.2.0 // indirect + github.com/magiconair/properties v1.8.6 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/moby/sys/mount v0.2.0 // indirect + github.com/moby/sys/mountinfo v0.5.0 // indirect + github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/opencontainers/runc v1.0.2 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.6.1 // indirect - github.com/stretchr/objx v0.1.1 // indirect + github.com/sirupsen/logrus v1.8.1 // indirect + github.com/stretchr/objx v0.2.0 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.1 // indirect github.com/xdg-go/stringprep v1.0.3 // indirect diff --git a/receiver/mongodbreceiver/go.sum b/receiver/mongodbreceiver/go.sum index 466042b4268d..97d8a439e4a0 100644 --- a/receiver/mongodbreceiver/go.sum +++ b/receiver/mongodbreceiver/go.sum @@ -1,10 +1,79 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17 h1:iT12IBVClFevaf8PuVyi3UmZOVh4OqnaLxDTW2O6j3w= +github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= +github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= +github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= +github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= +github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= +github.com/Microsoft/hcsshim v0.8.23 h1:47MSwtKGXet80aIn+7h4YI6fwPmwIghAnsx2aOUrG2M= +github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= +github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= +github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -17,10 +86,38 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21 github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= +github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= +github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= +github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -29,10 +126,150 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= +github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= +github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= +github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= +github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= +github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= +github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= +github.com/containerd/cgroups v1.0.1 h1:iJnMvco9XGvKUvNQkv88bE4uJXxRQH18efbKo9w5vHQ= +github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= +github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= +github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= +github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= +github.com/containerd/containerd v1.5.9 h1:rs6Xg1gtIxaeyG+Smsb/0xaSDu1VgFhOCKBXxMxbsF4= +github.com/containerd/containerd v1.5.9/go.mod h1:fvQqCfadDGga5HZyn3j4+dx56qj2I9YwBrlSdalvJYQ= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= +github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= +github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= +github.com/containerd/continuity v0.1.0 h1:UFRRY5JemiAhPZrr/uE0n8fMTLcZsUvySPr1+D7pgr8= +github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= +github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= +github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= +github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= +github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= +github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= +github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= +github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= +github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= +github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= +github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= +github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= +github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= +github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= +github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= +github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= +github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= +github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= +github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= +github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= +github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= +github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= +github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= +github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= +github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= +github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v20.10.11+incompatible h1:OqzI/g/W54LczvhnccGqniFoQghHx3pklbLuhfXpqGo= +github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= +github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -40,31 +277,83 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= +github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= +github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -79,11 +368,14 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -93,14 +385,46 @@ github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8 github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v1.7.2 h1:zoNxOV7WjqXptQOVngLmcSQgXmgk4NMz1HibBchjl/I= +github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= @@ -119,28 +443,75 @@ github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoI github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -153,51 +524,206 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM= +github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM= +github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c h1:nXxl5PrvVm2L/wCy8dQu6DMTwH4oIuGN8GJDAlqDdVE= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= +github.com/opencontainers/runc v1.0.2 h1:opHZMaswlyxz1OuGpBE53Dwe4/xF7EZTY0A2L/FpCOg= +github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= +github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/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= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= +github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/testcontainers/testcontainers-go v0.13.0 h1:OUujSlEGsXVo/ykPVZk3KanBNGN0TYb/7oKIPVn15JA= +github.com/testcontainers/testcontainers-go v0.13.0/go.mod h1:z1abufU633Eb/FmSBTzV6ntZAC1eZBYPtaFsn4nPuDk= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= +github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= 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= @@ -206,19 +732,36 @@ github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23n github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg-go/stringprep v1.0.3 h1:kdwGpVNwPFtjs98xCGkHjQtGKh86rDcRZN17QEMCOIs= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d h1:splanxYIlg+5LfHAM6xpdFEAYOk8iySO56hMFq6uLyA= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= go.mongodb.org/mongo-driver v1.9.1 h1:m078y9v7sBItkt1aaoe2YlvWEXcD263e1a4E1fBrJ1c= go.mongodb.org/mongo-driver v1.9.1/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= @@ -227,45 +770,110 @@ go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1 go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o= go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 h1:NvGWuYG8dkDHFSKksI1P9faiVJ9rayE6l0+ouWVIDs8= golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20211108170745-6635138e15ea/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -273,64 +881,207 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= @@ -345,26 +1096,90 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/gotestsum v1.7.0/go.mod h1:V1m4Jw3eBerhI/A6qCxUE07RnCg7ACkKj9BYcAm09V8= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= +k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= +k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= +k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= +k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= +k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= +k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= +k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= +k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= +k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= +k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= +k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= +k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= +k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/receiver/mongodbreceiver/integration_test.go b/receiver/mongodbreceiver/integration_test.go new file mode 100644 index 000000000000..e04c3b110e2c --- /dev/null +++ b/receiver/mongodbreceiver/integration_test.go @@ -0,0 +1,146 @@ +// 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. + +//go:build integration +// +build integration + +package mongodbreceiver + +import ( + "context" + "net" + "path/filepath" + "testing" + "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest/golden" + "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" + + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +var ( + containerRequest4_0 = testcontainers.ContainerRequest{ + FromDockerfile: testcontainers.FromDockerfile{ + Context: filepath.Join("testdata", "integration"), + Dockerfile: "Dockerfile.mongodb.4_0", + }, + ExposedPorts: []string{"27017:27017"}, + WaitingFor: wait.ForListeningPort("27017").WithStartupTimeout(2 * time.Minute), + } + containerRequest5_0 = testcontainers.ContainerRequest{ + FromDockerfile: testcontainers.FromDockerfile{ + Context: filepath.Join("testdata", "integration"), + Dockerfile: "Dockerfile.mongodb.5_0", + }, + ExposedPorts: []string{"27018:27017"}, + WaitingFor: wait.ForListeningPort("27017").WithStartupTimeout(2 * time.Minute), + } +) + +func TestMongodbIntegration(t *testing.T) { + t.Run("Running mongodb 4.0", func(t *testing.T) { + t.Parallel() + container := getContainer(t, containerRequest4_0) + defer func() { + require.NoError(t, container.Terminate(context.Background())) + }() + hostname, err := container.Host(context.Background()) + require.NoError(t, err) + + f := NewFactory() + cfg := f.CreateDefaultConfig().(*Config) + cfg.Hosts = []confignet.NetAddr{ + { + Endpoint: net.JoinHostPort(hostname, "27017"), + }, + } + + consumer := new(consumertest.MetricsSink) + settings := componenttest.NewNopReceiverCreateSettings() + rcvr, err := f.CreateMetricsReceiver(context.Background(), settings, cfg, consumer) + require.NoError(t, err, "failed creating metrics receiver") + + require.NoError(t, rcvr.Start(context.Background(), componenttest.NewNopHost())) + require.Eventuallyf(t, func() bool { + return len(consumer.AllMetrics()) > 0 + }, 2*time.Minute, 1*time.Second, "failed to receive more than 0 metrics") + require.NoError(t, rcvr.Shutdown(context.Background())) + + actualMetrics := consumer.AllMetrics()[0] + + expectedFile := filepath.Join("testdata", "integration", "expected.4_0.json") + expectedMetrics, err := golden.ReadMetrics(expectedFile) + require.NoError(t, err) + + err = scrapertest.CompareMetrics(expectedMetrics, actualMetrics, scrapertest.IgnoreMetricValues()) + require.NoError(t, err) + }) + t.Run("Running mongodb 5.0", func(t *testing.T) { + t.Parallel() + container := getContainer(t, containerRequest5_0) + defer func() { + require.NoError(t, container.Terminate(context.Background())) + }() + hostname, err := container.Host(context.Background()) + require.NoError(t, err) + + f := NewFactory() + cfg := f.CreateDefaultConfig().(*Config) + cfg.Hosts = []confignet.NetAddr{ + { + Endpoint: net.JoinHostPort(hostname, "27018"), + }, + } + + consumer := new(consumertest.MetricsSink) + settings := componenttest.NewNopReceiverCreateSettings() + rcvr, err := f.CreateMetricsReceiver(context.Background(), settings, cfg, consumer) + require.NoError(t, err, "failed creating metrics receiver") + + require.NoError(t, rcvr.Start(context.Background(), componenttest.NewNopHost())) + require.Eventuallyf(t, func() bool { + return len(consumer.AllMetrics()) > 0 + }, 2*time.Minute, 1*time.Second, "failed to receive more than 0 metrics") + require.NoError(t, rcvr.Shutdown(context.Background())) + + actualMetrics := consumer.AllMetrics()[0] + + expectedFile := filepath.Join("testdata", "integration", "expected.5_0.json") + expectedMetrics, err := golden.ReadMetrics(expectedFile) + require.NoError(t, err) + + scrapertest.CompareMetrics(expectedMetrics, actualMetrics, scrapertest.IgnoreMetricValues()) + }) +} + +func getContainer(t *testing.T, req testcontainers.ContainerRequest) testcontainers.Container { + require.NoError(t, req.Validate()) + container, err := testcontainers.GenericContainer( + context.Background(), + testcontainers.GenericContainerRequest{ + ContainerRequest: req, + Started: true, + }) + require.NoError(t, err) + + err = container.Start(context.Background()) + require.NoError(t, err) + return container +} diff --git a/receiver/mongodbreceiver/testdata/integration/Dockerfile.mongodb.4_0 b/receiver/mongodbreceiver/testdata/integration/Dockerfile.mongodb.4_0 new file mode 100644 index 000000000000..25b0013edb12 --- /dev/null +++ b/receiver/mongodbreceiver/testdata/integration/Dockerfile.mongodb.4_0 @@ -0,0 +1,3 @@ +FROM mongo:4.0 + +EXPOSE 27017 diff --git a/receiver/mongodbreceiver/testdata/integration/Dockerfile.mongodb.5_0 b/receiver/mongodbreceiver/testdata/integration/Dockerfile.mongodb.5_0 new file mode 100644 index 000000000000..e78220d60e6d --- /dev/null +++ b/receiver/mongodbreceiver/testdata/integration/Dockerfile.mongodb.5_0 @@ -0,0 +1,3 @@ +FROM mongo:5.0 + +EXPOSE 27017 diff --git a/receiver/mongodbreceiver/testdata/integration/expected.4_0.json b/receiver/mongodbreceiver/testdata/integration/expected.4_0.json new file mode 100644 index 000000000000..4e3a469f33dd --- /dev/null +++ b/receiver/mongodbreceiver/testdata/integration/expected.4_0.json @@ -0,0 +1,1056 @@ +{ + "resourceMetrics": [ + { + "resource": {}, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "The number of cache operations of the instance.", + "name": "mongodb.cache.operations", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "miss" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "288", + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "hit" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ], + "isMonotonic": true + }, + "unit": "{operations}" + }, + { + "description": "The time the global lock has been held.", + "name": "mongodb.global_lock.time", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "60365", + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ], + "isMonotonic": true + }, + "unit": "ms" + }, + { + "description": "The number of operations executed.", + "name": "mongodb.operation.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "insert" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "1", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "query" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "update" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "delete" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "getmore" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "21", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "command" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ], + "isMonotonic": true + }, + "unit": "{operations}" + } + ], + "scope": { + "name": "otelcol/mongodbreceiver", + "version": "latest" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "The number of collections.", + "name": "mongodb.collection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{collections}" + }, + { + "description": "The number of connections.", + "name": "mongodb.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + }, + { + "key": "type", + "value": { + "stringValue": "active" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "838857", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + }, + { + "key": "type", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "3", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + }, + { + "key": "type", + "value": { + "stringValue": "current" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "The size of the collection. Data compression does not affect this value.", + "name": "mongodb.data.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "59", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of extents.", + "name": "mongodb.extent.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{extents}" + }, + { + "description": "The number of indexes.", + "name": "mongodb.index.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{indexes}" + }, + { + "description": "Sum of the space allocated to all indexes in the database, including free index space.", + "name": "mongodb.index.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "16384", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "By" + }, + { + "description": "The amount of memory used.", + "name": "mongodb.memory.usage", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "84934656", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + }, + { + "key": "type", + "value": { + "stringValue": "resident" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "1053818880", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + }, + { + "key": "type", + "value": { + "stringValue": "virtual" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of objects.", + "name": "mongodb.object.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{objects}" + }, + { + "description": "The total amount of storage allocated to this collection.", + "name": "mongodb.storage.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "16384", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ], + "isMonotonic": true + }, + "unit": "By" + } + ], + "scope": { + "name": "otelcol/mongodbreceiver", + "version": "latest" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "The number of collections.", + "name": "mongodb.collection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{collections}" + }, + { + "description": "The number of connections.", + "name": "mongodb.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + }, + { + "key": "type", + "value": { + "stringValue": "active" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "838857", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + }, + { + "key": "type", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "3", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + }, + { + "key": "type", + "value": { + "stringValue": "current" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "The size of the collection. Data compression does not affect this value.", + "name": "mongodb.data.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of extents.", + "name": "mongodb.extent.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{extents}" + }, + { + "description": "The number of indexes.", + "name": "mongodb.index.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "2", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{indexes}" + }, + { + "description": "Sum of the space allocated to all indexes in the database, including free index space.", + "name": "mongodb.index.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "8192", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "By" + }, + { + "description": "The amount of memory used.", + "name": "mongodb.memory.usage", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "84934656", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + }, + { + "key": "type", + "value": { + "stringValue": "resident" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "1053818880", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + }, + { + "key": "type", + "value": { + "stringValue": "virtual" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of objects.", + "name": "mongodb.object.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{objects}" + }, + { + "description": "The total amount of storage allocated to this collection.", + "name": "mongodb.storage.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "4096", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ], + "isMonotonic": true + }, + "unit": "By" + } + ], + "scope": { + "name": "otelcol/mongodbreceiver", + "version": "latest" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "The number of collections.", + "name": "mongodb.collection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{collections}" + }, + { + "description": "The number of connections.", + "name": "mongodb.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + }, + { + "key": "type", + "value": { + "stringValue": "active" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "838857", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + }, + { + "key": "type", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "3", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + }, + { + "key": "type", + "value": { + "stringValue": "current" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "The size of the collection. Data compression does not affect this value.", + "name": "mongodb.data.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1467", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of extents.", + "name": "mongodb.extent.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{extents}" + }, + { + "description": "The number of indexes.", + "name": "mongodb.index.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{indexes}" + }, + { + "description": "Sum of the space allocated to all indexes in the database, including free index space.", + "name": "mongodb.index.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "16384", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "By" + }, + { + "description": "The amount of memory used.", + "name": "mongodb.memory.usage", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "84934656", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + }, + { + "key": "type", + "value": { + "stringValue": "resident" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + }, + { + "asInt": "1053818880", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + }, + { + "key": "type", + "value": { + "stringValue": "virtual" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of objects.", + "name": "mongodb.object.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ] + }, + "unit": "{objects}" + }, + { + "description": "The total amount of storage allocated to this collection.", + "name": "mongodb.storage.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "16384", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655218029063505000", + "timeUnixNano": "1655218089081590000" + } + ], + "isMonotonic": true + }, + "unit": "By" + } + ], + "scope": { + "name": "otelcol/mongodbreceiver", + "version": "latest" + } + } + ] + } + ] +} diff --git a/receiver/mongodbreceiver/testdata/integration/expected.5_0.json b/receiver/mongodbreceiver/testdata/integration/expected.5_0.json new file mode 100644 index 000000000000..012ecec649d9 --- /dev/null +++ b/receiver/mongodbreceiver/testdata/integration/expected.5_0.json @@ -0,0 +1,987 @@ +{ + "resourceMetrics": [ + { + "resource": {}, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "The number of cache operations of the instance.", + "name": "mongodb.cache.operations", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "miss" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "255", + "attributes": [ + { + "key": "type", + "value": { + "stringValue": "hit" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ], + "isMonotonic": true + }, + "unit": "{operations}" + }, + { + "description": "The time the global lock has been held.", + "name": "mongodb.global_lock.time", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "60891", + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ], + "isMonotonic": true + }, + "unit": "ms" + }, + { + "description": "The number of operations executed.", + "name": "mongodb.operation.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "update" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "delete" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "getmore" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "21", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "command" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "insert" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "0", + "attributes": [ + { + "key": "operation", + "value": { + "stringValue": "query" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ], + "isMonotonic": true + }, + "unit": "{operations}" + } + ], + "scope": { + "name": "otelcol/mongodbreceiver", + "version": "latest" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "The number of collections.", + "name": "mongodb.collection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{collections}" + }, + { + "description": "The number of connections.", + "name": "mongodb.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "838857", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + }, + { + "key": "type", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "3", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + }, + { + "key": "type", + "value": { + "stringValue": "current" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "2", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + }, + { + "key": "type", + "value": { + "stringValue": "active" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "The size of the collection. Data compression does not affect this value.", + "name": "mongodb.data.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "59", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of indexes.", + "name": "mongodb.index.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{indexes}" + }, + { + "description": "Sum of the space allocated to all indexes in the database, including free index space.", + "name": "mongodb.index.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "20480", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "By" + }, + { + "description": "The amount of memory used.", + "name": "mongodb.memory.usage", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "110100480", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + }, + { + "key": "type", + "value": { + "stringValue": "resident" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "1570766848", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + }, + { + "key": "type", + "value": { + "stringValue": "virtual" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of objects.", + "name": "mongodb.object.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{objects}" + }, + { + "description": "The total amount of storage allocated to this collection.", + "name": "mongodb.storage.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "20480", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "admin" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ], + "isMonotonic": true + }, + "unit": "By" + } + ], + "scope": { + "name": "otelcol/mongodbreceiver", + "version": "latest" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "The number of collections.", + "name": "mongodb.collection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{collections}" + }, + { + "description": "The number of connections.", + "name": "mongodb.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "838857", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + }, + { + "key": "type", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "3", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + }, + { + "key": "type", + "value": { + "stringValue": "current" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "2", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + }, + { + "key": "type", + "value": { + "stringValue": "active" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "The size of the collection. Data compression does not affect this value.", + "name": "mongodb.data.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of indexes.", + "name": "mongodb.index.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "2", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{indexes}" + }, + { + "description": "Sum of the space allocated to all indexes in the database, including free index space.", + "name": "mongodb.index.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "8192", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "By" + }, + { + "description": "The amount of memory used.", + "name": "mongodb.memory.usage", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "110100480", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + }, + { + "key": "type", + "value": { + "stringValue": "resident" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "1570766848", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + }, + { + "key": "type", + "value": { + "stringValue": "virtual" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of objects.", + "name": "mongodb.object.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{objects}" + }, + { + "description": "The total amount of storage allocated to this collection.", + "name": "mongodb.storage.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "4096", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "config" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ], + "isMonotonic": true + }, + "unit": "By" + } + ], + "scope": { + "name": "otelcol/mongodbreceiver", + "version": "latest" + } + } + ] + }, + { + "resource": { + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "The number of collections.", + "name": "mongodb.collection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{collections}" + }, + { + "description": "The number of connections.", + "name": "mongodb.connection.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "2", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + }, + { + "key": "type", + "value": { + "stringValue": "active" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "838857", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + }, + { + "key": "type", + "value": { + "stringValue": "available" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "3", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + }, + { + "key": "type", + "value": { + "stringValue": "current" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{connections}" + }, + { + "description": "The size of the collection. Data compression does not affect this value.", + "name": "mongodb.data.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "2050", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of indexes.", + "name": "mongodb.index.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{indexes}" + }, + { + "description": "Sum of the space allocated to all indexes in the database, including free index space.", + "name": "mongodb.index.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "20480", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "By" + }, + { + "description": "The amount of memory used.", + "name": "mongodb.memory.usage", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "110100480", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + }, + { + "key": "type", + "value": { + "stringValue": "resident" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + }, + { + "asInt": "1570766848", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + }, + { + "key": "type", + "value": { + "stringValue": "virtual" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "By" + }, + { + "description": "The number of objects.", + "name": "mongodb.object.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "1", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ] + }, + "unit": "{objects}" + }, + { + "description": "The total amount of storage allocated to this collection.", + "name": "mongodb.storage.size", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "20480", + "attributes": [ + { + "key": "database", + "value": { + "stringValue": "local" + } + } + ], + "startTimeUnixNano": "1655220107119723000", + "timeUnixNano": "1655220167129638000" + } + ], + "isMonotonic": true + }, + "unit": "By" + } + ], + "scope": { + "name": "otelcol/mongodbreceiver", + "version": "latest" + } + } + ] + } + ] +} diff --git a/receiver/mysqlreceiver/go.mod b/receiver/mysqlreceiver/go.mod index fe920b97e5bd..bc0840ecd5c4 100644 --- a/receiver/mysqlreceiver/go.mod +++ b/receiver/mysqlreceiver/go.mod @@ -6,13 +6,13 @@ require ( github.com/go-sql-driver/mysql v1.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) require ( github.com/testcontainers/testcontainers-go v0.13.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( @@ -24,7 +24,7 @@ require ( github.com/containerd/containerd v1.5.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.15+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect diff --git a/receiver/mysqlreceiver/go.sum b/receiver/mysqlreceiver/go.sum index 208f6cec9fd0..674a5b163e6a 100644 --- a/receiver/mysqlreceiver/go.sum +++ b/receiver/mysqlreceiver/go.sum @@ -253,8 +253,8 @@ github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.15+incompatible h1:dk9FewY/9Xwm4ay/HViEEHSQuM/kL4F+JaG6GQdgmGo= -github.com/docker/docker v20.10.15+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -733,10 +733,10 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/nginxreceiver/config_test.go b/receiver/nginxreceiver/config_test.go new file mode 100644 index 000000000000..4e0e1a0c7b6e --- /dev/null +++ b/receiver/nginxreceiver/config_test.go @@ -0,0 +1,40 @@ +// Copyright 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 nginxreceiver + +import ( + "path/filepath" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/service/servicetest" +) + +func TestLoadConfig(t *testing.T) { + factories, err := componenttest.NopFactories() + require.Nil(t, err) + + factory := NewFactory() + factories.Receivers[typeStr] = factory + cfg, err := servicetest.LoadConfigAndValidate(filepath.Join("testdata", "config.yaml"), factories) + require.NoError(t, err) + require.NotNil(t, cfg) + + require.Equal(t, len(cfg.Receivers), 1) + + require.Equal(t, factory.CreateDefaultConfig(), cfg.Receivers[config.NewComponentID("nginx")]) +} diff --git a/receiver/nginxreceiver/go.mod b/receiver/nginxreceiver/go.mod index fa628dec305b..64281ad1255f 100644 --- a/receiver/nginxreceiver/go.mod +++ b/receiver/nginxreceiver/go.mod @@ -8,8 +8,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/stretchr/testify v1.7.2 github.com/testcontainers/testcontainers-go v0.13.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 // indirect @@ -24,7 +24,7 @@ require ( github.com/containerd/containerd v1.5.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.15+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect diff --git a/receiver/nginxreceiver/go.sum b/receiver/nginxreceiver/go.sum index d8e9932e5746..996720e6ce52 100644 --- a/receiver/nginxreceiver/go.sum +++ b/receiver/nginxreceiver/go.sum @@ -253,8 +253,8 @@ github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.15+incompatible h1:dk9FewY/9Xwm4ay/HViEEHSQuM/kL4F+JaG6GQdgmGo= -github.com/docker/docker v20.10.15+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -750,10 +750,10 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/nginxreceiver/testdata/config.yaml b/receiver/nginxreceiver/testdata/config.yaml new file mode 100644 index 000000000000..aed0e8cc5447 --- /dev/null +++ b/receiver/nginxreceiver/testdata/config.yaml @@ -0,0 +1,17 @@ +receivers: + nginx: + endpoint: "http://localhost:80/status" + collection_interval: 10s + +processors: + nop: + +exporters: + nop: + +service: + pipelines: + metrics: + receivers: [nginx] + processors: [nop] + exporters: [nop] diff --git a/receiver/nsxtreceiver/README.md b/receiver/nsxtreceiver/README.md index e976f5bbde57..31337d635989 100644 --- a/receiver/nsxtreceiver/README.md +++ b/receiver/nsxtreceiver/README.md @@ -1,8 +1,13 @@ # NSX-T Receiver +| Status | | +| ------------------------ |-----------| +| Stability | [alpha] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | + This receiver fetches metrics important to run virtual networking using NSX-T. The receiver ingests metrics via the [NSX Rest API](https://docs.vmware.com/en/VMware-NSX-Data-Center-for-vSphere/6.4/nsx_64_api.pdf). -Supported pipeline types: `metrics` > :construction: This receiver is in **ALPHA**. Configuration fields and metric data model are subject to change. @@ -64,3 +69,6 @@ The full list of settings exposed for this receiver are documented [here](./conf ## Metrics Details about the metrics produced by this receiver can be found in [metadata.yaml](./metadata.yaml) + +[alpha]: https://github.com/open-telemetry/opentelemetry-collector#alpha +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib \ No newline at end of file diff --git a/receiver/nsxtreceiver/go.mod b/receiver/nsxtreceiver/go.mod index 162d81667f2f..bf1525f98eb5 100644 --- a/receiver/nsxtreceiver/go.mod +++ b/receiver/nsxtreceiver/go.mod @@ -3,8 +3,8 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/nsxtre go 1.17 require ( - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require github.com/rogpeppe/go-internal v1.8.1 // indirect diff --git a/receiver/nsxtreceiver/go.sum b/receiver/nsxtreceiver/go.sum index d5299a87a1eb..065fb2c8dbc3 100644 --- a/receiver/nsxtreceiver/go.sum +++ b/receiver/nsxtreceiver/go.sum @@ -194,10 +194,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/opencensusreceiver/README.md b/receiver/opencensusreceiver/README.md index 518eec387799..64e075b7e145 100644 --- a/receiver/opencensusreceiver/README.md +++ b/receiver/opencensusreceiver/README.md @@ -1,10 +1,14 @@ # OpenCensus Receiver +| Status | | +| ------------------------ |--------------------------| +| Stability | [beta] | +| Supported pipeline types | traces, metrics | +| Distributions | [core], [contrib] | + Receives data via gRPC or HTTP using [OpenCensus]( https://opencensus.io/) format. -Supported pipeline types: traces, metrics - ## Getting Started All that is required to enable the OpenCensus receiver is to include it in the @@ -51,3 +55,7 @@ receivers: # Origins can have wildcards with *, use * by itself to match any origin. - https://*.example.com ``` + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol \ No newline at end of file diff --git a/receiver/opencensusreceiver/go.mod b/receiver/opencensusreceiver/go.mod index 2df02c3c8285..8f9f5f3ba3b5 100644 --- a/receiver/opencensusreceiver/go.mod +++ b/receiver/opencensusreceiver/go.mod @@ -12,7 +12,7 @@ require ( github.com/rs/cors v1.8.2 github.com/soheilhy/cmux v0.1.5 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 go.opentelemetry.io/otel v1.7.0 go.opentelemetry.io/otel/trace v1.7.0 @@ -21,7 +21,7 @@ require ( ) require ( - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.opentelemetry.io/otel/sdk v1.7.0 ) @@ -45,7 +45,7 @@ require ( github.com/mostynb/go-grpc-compression v1.1.16 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.8.0 // indirect diff --git a/receiver/opencensusreceiver/go.sum b/receiver/opencensusreceiver/go.sum index ee2d606f582c..fd281ae5f7b3 100644 --- a/receiver/opencensusreceiver/go.sum +++ b/receiver/opencensusreceiver/go.sum @@ -332,12 +332,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/opencensusreceiver/internal/ocmetrics/opencensus.go b/receiver/opencensusreceiver/internal/ocmetrics/opencensus.go index f14abcc78be9..e570e1ecac83 100644 --- a/receiver/opencensusreceiver/internal/ocmetrics/opencensus.go +++ b/receiver/opencensusreceiver/internal/ocmetrics/opencensus.go @@ -95,7 +95,7 @@ func (ocr *Receiver) Export(mes agentmetricspb.MetricsService_ExportServer) erro recv, err = mes.Recv() if err != nil { - if err == io.EOF { + if errors.Is(err, io.EOF) { // Do not return EOF as an error so that grpc-gateway calls get an empty // response with HTTP status code 200 rather than a 500 error with EOF. return nil diff --git a/receiver/opencensusreceiver/internal/ocmetrics/opencensus_test.go b/receiver/opencensusreceiver/internal/ocmetrics/opencensus_test.go index 89cd4c19d048..78b2d3d00422 100644 --- a/receiver/opencensusreceiver/internal/ocmetrics/opencensus_test.go +++ b/receiver/opencensusreceiver/internal/ocmetrics/opencensus_test.go @@ -19,6 +19,7 @@ import ( "bytes" "context" "encoding/json" + "errors" "fmt" "io" "net" @@ -256,8 +257,8 @@ func TestExportProtocolViolations_nodelessFirstMessage(t *testing.T) { } if err = metricsClient.Send(&agentmetricspb.ExportMetricsServiceRequest{Node: n1}); err == nil { t.Errorf("Iteration #%d: Unexpectedly succeeded in sending a message upstream. Connection must be in terminal state", i) - } else if g, w := err, io.EOF; g != w { - t.Errorf("Iteration #%d:\nGot error %q\nWant error %q", i, g, w) + } else if !errors.Is(err, io.EOF) { + t.Errorf("Iteration #%d:\nGot error %q\nWant error %q", i, err, io.EOF) } } diff --git a/receiver/opencensusreceiver/internal/octrace/opencensus.go b/receiver/opencensusreceiver/internal/octrace/opencensus.go index 988dd2faf607..8050087d36ee 100644 --- a/receiver/opencensusreceiver/internal/octrace/opencensus.go +++ b/receiver/opencensusreceiver/internal/octrace/opencensus.go @@ -105,7 +105,7 @@ func (ocr *Receiver) Export(tes agenttracepb.TraceService_ExportServer) error { recv, err = tes.Recv() if err != nil { - if err == io.EOF { + if errors.Is(err, io.EOF) { // Do not return EOF as an error so that grpc-gateway calls get an empty // response with HTTP status code 200 rather than a 500 error with EOF. return nil diff --git a/receiver/opencensusreceiver/internal/octrace/opencensus_test.go b/receiver/opencensusreceiver/internal/octrace/opencensus_test.go index 54154404cd49..74460b1a6ba8 100644 --- a/receiver/opencensusreceiver/internal/octrace/opencensus_test.go +++ b/receiver/opencensusreceiver/internal/octrace/opencensus_test.go @@ -19,6 +19,7 @@ import ( "bytes" "context" "encoding/json" + "errors" "io" "net" "strings" @@ -269,8 +270,8 @@ func TestExportProtocolViolations_nodelessFirstMessage(t *testing.T) { } if err = traceClient.Send(&agenttracepb.ExportTraceServiceRequest{Node: n1}); err == nil { t.Errorf("Iteration #%d: Unexpectedly succeeded in sending a message upstream. Connection must be in terminal state", i) - } else if g, w := err, io.EOF; g != w { - t.Errorf("Iteration #%d:\nGot error %q\nWant error %q", i, g, w) + } else if !errors.Is(err, io.EOF) { + t.Errorf("Iteration #%d:\nGot error %q\nWant error %q", i, err, io.EOF) } } diff --git a/receiver/opencensusreceiver/opencensus.go b/receiver/opencensusreceiver/opencensus.go index 5a28ab9ca69b..0c492530ee3d 100644 --- a/receiver/opencensusreceiver/opencensus.go +++ b/receiver/opencensusreceiver/opencensus.go @@ -76,7 +76,7 @@ func newOpenCensusReceiver( // TODO: (@odeke-em) use options to enable address binding changes. ln, err := net.Listen(transport, addr) if err != nil { - return nil, fmt.Errorf("failed to bind to address %q: %v", addr, err) + return nil, fmt.Errorf("failed to bind to address %q: %w", addr, err) } ocr := &ocReceiver{ diff --git a/receiver/opencensusreceiver/opencensus_test.go b/receiver/opencensusreceiver/opencensus_test.go index 6d78fe6835f2..159b3f85888b 100644 --- a/receiver/opencensusreceiver/opencensus_test.go +++ b/receiver/opencensusreceiver/opencensus_test.go @@ -20,6 +20,7 @@ package opencensusreceiver import ( "bytes" "context" + "errors" "fmt" "io" "io/ioutil" @@ -404,7 +405,7 @@ func TestOCReceiverTrace_HandleNextConsumerResponse(t *testing.T) { if err == nil { for { if _, err = stream.Recv(); err != nil { - if err == io.EOF { + if errors.Is(err, io.EOF) { err = nil } break @@ -553,7 +554,7 @@ func TestOCReceiverMetrics_HandleNextConsumerResponse(t *testing.T) { if err == nil { for { if _, err = stream.Recv(); err != nil { - if err == io.EOF { + if errors.Is(err, io.EOF) { err = nil } break diff --git a/receiver/podmanreceiver/README.md b/receiver/podmanreceiver/README.md index a13e35f6c326..f907781d3fc8 100644 --- a/receiver/podmanreceiver/README.md +++ b/receiver/podmanreceiver/README.md @@ -1,12 +1,15 @@ # Podman Stats Receiver +| Status | | +| ------------------------ |-------------------| +| Stability | [unmaintained] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | The Podman Stats receiver queries the Podman service API to fetch stats for all running containers on a configured interval. These stats are for container resource usage of cpu, memory, network, and the [blkio controller](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). -Supported pipeline types: metrics - > :information_source: Requires Podman API version 3.3.1+ and Windows is not supported. @@ -84,3 +87,6 @@ Recommended build tags to use when including this receiver in your build: - `containers_image_openpgp` - `exclude_graphdriver_btrfs` - `exclude_graphdriver_devicemapper` + +[unmaintained]: https://github.com/open-telemetry/opentelemetry-collector#unmaintained +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/podmanreceiver/go.mod b/receiver/podmanreceiver/go.mod index 6545571f70f3..e092ab6d3849 100644 --- a/receiver/podmanreceiver/go.mod +++ b/receiver/podmanreceiver/go.mod @@ -4,9 +4,9 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 ) diff --git a/receiver/podmanreceiver/go.sum b/receiver/podmanreceiver/go.sum index 2b6b8f413f77..8332c082eaf5 100644 --- a/receiver/podmanreceiver/go.sum +++ b/receiver/podmanreceiver/go.sum @@ -188,12 +188,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/podmanreceiver/podman_connection.go b/receiver/podmanreceiver/podman_connection.go index fd4dfb797308..385f115a902b 100644 --- a/receiver/podmanreceiver/podman_connection.go +++ b/receiver/podmanreceiver/podman_connection.go @@ -196,7 +196,8 @@ func publicKey(path string, passphrase []byte) (ssh.Signer, error) { signer, err := ssh.ParsePrivateKey(key) if err != nil { - if _, ok := err.(*ssh.PassphraseMissingError); !ok { + pmErr := &ssh.PassphraseMissingError{} + if !errors.As(err, &pmErr) { return nil, err } return ssh.ParsePrivateKeyWithPassphrase(key, passphrase) diff --git a/receiver/postgresqlreceiver/README.md b/receiver/postgresqlreceiver/README.md index 362c40f1038e..7345fe1ff251 100644 --- a/receiver/postgresqlreceiver/README.md +++ b/receiver/postgresqlreceiver/README.md @@ -1,8 +1,12 @@ # PostgreSQL Receiver -This receiver queries the PostgreSQL [statistics collector](https://www.postgresql.org/docs/9.6/monitoring-stats.html). +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | -Supported pipeline types: `metrics` +This receiver queries the PostgreSQL [statistics collector](https://www.postgresql.org/docs/9.6/monitoring-stats.html). > :construction: This receiver is in **BETA**. Configuration fields and metric data model are subject to change. @@ -58,3 +62,6 @@ The full list of settings exposed for this receiver are documented [here](./conf ## Metrics Details about the metrics produced by this receiver can be found in [metadata.yaml](./metadata.yaml) + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib \ No newline at end of file diff --git a/receiver/postgresqlreceiver/go.mod b/receiver/postgresqlreceiver/go.mod index afb64eb00d30..f00a60a5be1a 100644 --- a/receiver/postgresqlreceiver/go.mod +++ b/receiver/postgresqlreceiver/go.mod @@ -6,14 +6,14 @@ require ( github.com/lib/pq v1.10.6 github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) require ( github.com/testcontainers/testcontainers-go v0.13.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( @@ -25,7 +25,7 @@ require ( github.com/containerd/containerd v1.5.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.15+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect diff --git a/receiver/postgresqlreceiver/go.sum b/receiver/postgresqlreceiver/go.sum index 4b33d9f80208..37783e1bf366 100644 --- a/receiver/postgresqlreceiver/go.sum +++ b/receiver/postgresqlreceiver/go.sum @@ -253,8 +253,8 @@ github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.15+incompatible h1:dk9FewY/9Xwm4ay/HViEEHSQuM/kL4F+JaG6GQdgmGo= -github.com/docker/docker v20.10.15+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -736,10 +736,10 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/prometheusexecreceiver/README.md b/receiver/prometheusexecreceiver/README.md index 7c587c79c4bc..aacdf85a74f7 100644 --- a/receiver/prometheusexecreceiver/README.md +++ b/receiver/prometheusexecreceiver/README.md @@ -9,7 +9,7 @@ plug-and-play solution to getting metrics from those third-party services that sometimes simply don't natively export metrics or speak any instrumentation protocols (MySQL, Apache, Nginx, JVM, etc.) while taking advantage of the large [Prometheus -exporters]((https://prometheus.io/docs/instrumenting/exporters/)) ecosystem. +exporters](https://prometheus.io/docs/instrumenting/exporters/) ecosystem. Through the configuration file, you can indicate which binaries to run (usually [Prometheus diff --git a/receiver/prometheusexecreceiver/go.mod b/receiver/prometheusexecreceiver/go.mod index c976f402357a..210596e42c95 100644 --- a/receiver/prometheusexecreceiver/go.mod +++ b/receiver/prometheusexecreceiver/go.mod @@ -7,10 +7,10 @@ require ( github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.53.0 github.com/prometheus/common v0.34.0 - github.com/prometheus/prometheus v0.36.0 + github.com/prometheus/prometheus v0.36.1 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -30,7 +30,7 @@ require ( github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.3.10 // indirect - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 // indirect @@ -38,7 +38,7 @@ require ( github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.80.0 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/emicklei/go-restful v2.9.5+incompatible // indirect @@ -110,7 +110,7 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/vultr/govultr/v2 v2.17.0 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect @@ -119,7 +119,7 @@ require ( go.uber.org/multierr v1.8.0 // indirect golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect @@ -127,9 +127,9 @@ require ( golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect - google.golang.org/api v0.82.0 // indirect + google.golang.org/api v0.83.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 // indirect + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/receiver/prometheusexecreceiver/go.sum b/receiver/prometheusexecreceiver/go.sum index 7e1d1027f5a0..68286cda73fc 100644 --- a/receiver/prometheusexecreceiver/go.sum +++ b/receiver/prometheusexecreceiver/go.sum @@ -105,8 +105,8 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -158,8 +158,8 @@ github.com/digitalocean/godo v1.80.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5 github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -586,8 +586,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= -github.com/prometheus/prometheus v0.36.0/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -651,12 +651,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= @@ -785,8 +785,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -819,8 +819,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1029,8 +1029,8 @@ google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1114,8 +1114,8 @@ google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= diff --git a/receiver/prometheusexecreceiver/subprocessmanager/manager.go b/receiver/prometheusexecreceiver/subprocessmanager/manager.go index 145cfae1f8b1..a367e11d0242 100644 --- a/receiver/prometheusexecreceiver/subprocessmanager/manager.go +++ b/receiver/prometheusexecreceiver/subprocessmanager/manager.go @@ -17,6 +17,7 @@ package subprocessmanager // import "github.com/open-telemetry/opentelemetry-col import ( "bufio" "context" + "errors" "fmt" "io" "os" @@ -88,7 +89,7 @@ func (proc *SubprocessConfig) Run(ctx context.Context, logger *zap.Logger) (time func (proc *SubprocessConfig) pipeSubprocessOutput(reader *bufio.Reader, logger *zap.Logger, isStdout bool) { for { line, err := reader.ReadString('\n') - if err != nil && err != io.EOF { + if err != nil && !errors.Is(err, io.EOF) { logger.Info("subprocess logging failed", zap.String("error", err.Error())) break } @@ -103,7 +104,7 @@ func (proc *SubprocessConfig) pipeSubprocessOutput(reader *bufio.Reader, logger } // Leave this function when error is EOF (stderr/stdout pipe was closed) - if err == io.EOF { + if errors.Is(err, io.EOF) { break } } diff --git a/receiver/prometheusreceiver/README.md b/receiver/prometheusreceiver/README.md index 342f696cd85a..6a8064aab05e 100644 --- a/receiver/prometheusreceiver/README.md +++ b/receiver/prometheusreceiver/README.md @@ -1,16 +1,14 @@ # Prometheus Receiver +| Status | | +| ------------------------ |-------------------| +| Stability | [beta] | +| Supported pipeline types | metrics | +| Distributions | [core], [contrib] | + Receives metric data in [Prometheus](https://prometheus.io/) format. See the [Design](DESIGN.md) for additional information on this receiver. -Supported pipeline types: metrics - -## ❗️ Important note - -Starting from version 0.49.0, the receiver consumes 30% more memory when there is a lot of target churn. -The issue is currently being investigated and will be fixed in one of the new releases. More details: -https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/9278. - ## ⚠️ Warning Note: This component is currently work in progress. It has several limitations @@ -85,3 +83,7 @@ receivers: ``` [sc]: https://github.com/prometheus/prometheus/blob/v2.28.1/docs/configuration/configuration.md#scrape_config + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol \ No newline at end of file diff --git a/receiver/prometheusreceiver/config.go b/receiver/prometheusreceiver/config.go index 8c371008bed7..985fc7648b1f 100644 --- a/receiver/prometheusreceiver/config.go +++ b/receiver/prometheusreceiver/config.go @@ -75,10 +75,10 @@ func checkFile(fn string) error { func checkTLSConfig(tlsConfig commonconfig.TLSConfig) error { if err := checkFile(tlsConfig.CertFile); err != nil { - return fmt.Errorf("error checking client cert file %q - %v", tlsConfig.CertFile, err) + return fmt.Errorf("error checking client cert file %q: %w", tlsConfig.CertFile, err) } if err := checkFile(tlsConfig.KeyFile); err != nil { - return fmt.Errorf("error checking client key file %q - %v", tlsConfig.KeyFile, err) + return fmt.Errorf("error checking client key file %q: %w", tlsConfig.KeyFile, err) } if len(tlsConfig.CertFile) > 0 && len(tlsConfig.KeyFile) == 0 { return fmt.Errorf("client cert file %q specified without client key file", tlsConfig.CertFile) @@ -108,11 +108,11 @@ func checkSDFile(filename string) error { switch ext := filepath.Ext(filename); strings.ToLower(ext) { case ".json": if err := json.Unmarshal(content, &targetGroups); err != nil { - return fmt.Errorf("Error in unmarshaling json file extension - %v", err) + return fmt.Errorf("error in unmarshaling json file extension: %w", err) } case ".yml", ".yaml": if err := yaml.UnmarshalStrict(content, &targetGroups); err != nil { - return fmt.Errorf("Error in unmarshaling yaml file extension - %v", err) + return fmt.Errorf("error in unmarshaling yaml file extension: %w", err) } default: return fmt.Errorf("invalid file extension: %q", ext) @@ -172,7 +172,7 @@ func (cfg *Config) Validate() error { if sc.HTTPClientConfig.Authorization != nil { if err := checkFile(sc.HTTPClientConfig.Authorization.CredentialsFile); err != nil { - return fmt.Errorf("error checking authorization credentials file %q - %s", sc.HTTPClientConfig.Authorization.CredentialsFile, err) + return fmt.Errorf("error checking authorization credentials file %q: %w", sc.HTTPClientConfig.Authorization.CredentialsFile, err) } } @@ -196,7 +196,7 @@ func (cfg *Config) Validate() error { for _, f := range files { err = checkSDFile(f) if err != nil { - return fmt.Errorf("checking SD file %q: %v", file, err) + return fmt.Errorf("checking SD file %q: %w", file, err) } } continue @@ -219,7 +219,7 @@ func (cfg *Config) Unmarshal(componentParser *confmap.Conf) error { err := componentParser.UnmarshalExact(cfg) if err != nil { - return fmt.Errorf("prometheus receiver failed to parse config: %s", err) + return fmt.Errorf("prometheus receiver failed to parse config: %w", err) } // Unmarshal prometheus's config values. Since prometheus uses `yaml` tags, so use `yaml`. @@ -229,12 +229,12 @@ func (cfg *Config) Unmarshal(componentParser *confmap.Conf) error { } out, err := yaml.Marshal(promCfg.ToStringMap()) if err != nil { - return fmt.Errorf("prometheus receiver failed to marshal config to yaml: %s", err) + return fmt.Errorf("prometheus receiver failed to marshal config to yaml: %w", err) } err = yaml.UnmarshalStrict(out, &cfg.PrometheusConfig) if err != nil { - return fmt.Errorf("prometheus receiver failed to unmarshal yaml to prometheus config: %s", err) + return fmt.Errorf("prometheus receiver failed to unmarshal yaml to prometheus config: %w", err) } return nil diff --git a/receiver/prometheusreceiver/go.mod b/receiver/prometheusreceiver/go.mod index aa0beb2d7d0f..44bc10bada0b 100644 --- a/receiver/prometheusreceiver/go.mod +++ b/receiver/prometheusreceiver/go.mod @@ -8,11 +8,11 @@ require ( github.com/golang/snappy v0.0.4 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter v0.53.0 github.com/prometheus/common v0.34.0 - github.com/prometheus/prometheus v0.36.0 + github.com/prometheus/prometheus v0.36.1 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/zap v1.21.0 google.golang.org/protobuf v1.28.0 @@ -37,7 +37,7 @@ require ( github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.3.10 // indirect - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect @@ -46,7 +46,7 @@ require ( github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.80.0 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/emicklei/go-restful v2.9.5+incompatible // indirect @@ -151,7 +151,7 @@ require ( go.uber.org/multierr v1.8.0 // indirect golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect @@ -159,9 +159,9 @@ require ( golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect - google.golang.org/api v0.82.0 // indirect + google.golang.org/api v0.83.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 // indirect + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect google.golang.org/grpc v1.47.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/receiver/prometheusreceiver/go.sum b/receiver/prometheusreceiver/go.sum index 9d513888f86a..124a2c1bd77a 100644 --- a/receiver/prometheusreceiver/go.sum +++ b/receiver/prometheusreceiver/go.sum @@ -107,8 +107,8 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -163,8 +163,8 @@ github.com/digitalocean/godo v1.80.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5 github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -526,7 +526,6 @@ github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3Rllmb github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/mostynb/go-grpc-compression v1.1.16 h1:D9tGUINmcII049pxOj9dl32Fzhp26TrDVQXECoKJqQg= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= @@ -603,8 +602,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= -github.com/prometheus/prometheus v0.36.0/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= @@ -681,13 +680,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/contrib/zpages v0.32.0 h1:AVKTx5ppWDaem7A61HFsO1T3CK/t6kFRQoZQMj0/TW4= @@ -821,8 +819,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -855,8 +853,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1068,8 +1066,8 @@ google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1153,8 +1151,8 @@ google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= diff --git a/receiver/prometheusreceiver/internal/otlp_metricfamily.go b/receiver/prometheusreceiver/internal/otlp_metricfamily.go index d19f57ec933f..32ad1c40a0ee 100644 --- a/receiver/prometheusreceiver/internal/otlp_metricfamily.go +++ b/receiver/prometheusreceiver/internal/otlp_metricfamily.go @@ -287,6 +287,10 @@ func (mf *metricFamily) loadMetricGroupOrCreate(groupKey string, ls labels.Label func (mf *metricFamily) Add(metricName string, ls labels.Labels, t int64, v float64) error { groupKey := mf.getGroupKey(ls) mg := mf.loadMetricGroupOrCreate(groupKey, ls, t) + if mg.ts != t { + mf.droppedTimeseries++ + return fmt.Errorf("inconsistent timestamps on metric points for metric %v", metricName) + } switch mf.mtype { case pmetric.MetricDataTypeHistogram, pmetric.MetricDataTypeSummary: switch { diff --git a/receiver/prometheusreceiver/internal/otlp_metricfamily_test.go b/receiver/prometheusreceiver/internal/otlp_metricfamily_test.go index 26b57557459b..eaaf2a89cebc 100644 --- a/receiver/prometheusreceiver/internal/otlp_metricfamily_test.go +++ b/receiver/prometheusreceiver/internal/otlp_metricfamily_test.go @@ -104,6 +104,7 @@ func TestMetricGroupData_toDistributionUnitTest(t *testing.T) { labels labels.Labels scrapes []*scrape want func() pmetric.HistogramDataPoint + wantErr bool intervalStartTimeMs int64 }{ { @@ -114,9 +115,9 @@ func TestMetricGroupData_toDistributionUnitTest(t *testing.T) { scrapes: []*scrape{ {at: 11, value: 66, metric: "histogram_count"}, {at: 11, value: 1004.78, metric: "histogram_sum"}, - {at: 13, value: 33, metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "0.75"}}, - {at: 13, value: 55, metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "2.75"}}, - {at: 13, value: 66, metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "+Inf"}}, + {at: 11, value: 33, metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "0.75"}}, + {at: 11, value: 55, metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "2.75"}}, + {at: 11, value: 66, metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "+Inf"}}, }, want: func() pmetric.HistogramDataPoint { point := pmetric.NewHistogramDataPoint() @@ -140,9 +141,9 @@ func TestMetricGroupData_toDistributionUnitTest(t *testing.T) { scrapes: []*scrape{ {at: 11, value: math.Float64frombits(value.StaleNaN), metric: "histogram_stale_count"}, {at: 11, value: math.Float64frombits(value.StaleNaN), metric: "histogram_stale_sum"}, - {at: 13, value: math.Float64frombits(value.StaleNaN), metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "0.75"}}, - {at: 13, value: math.Float64frombits(value.StaleNaN), metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "2.75"}}, - {at: 13, value: math.Float64frombits(value.StaleNaN), metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "+Inf"}}, + {at: 11, value: math.Float64frombits(value.StaleNaN), metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "0.75"}}, + {at: 11, value: math.Float64frombits(value.StaleNaN), metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "2.75"}}, + {at: 11, value: math.Float64frombits(value.StaleNaN), metric: "histogram_bucket", extraLabel: labels.Label{Name: "le", Value: "+Inf"}}, }, want: func() pmetric.HistogramDataPoint { point := pmetric.NewHistogramDataPoint() @@ -157,20 +158,43 @@ func TestMetricGroupData_toDistributionUnitTest(t *testing.T) { return point }, }, + { + name: "histogram with inconsistent timestamps", + metricName: "histogram_inconsistent_ts", + intervalStartTimeMs: 11, + labels: labels.Labels{{Name: "a", Value: "A"}, {Name: "le", Value: "0.75"}, {Name: "b", Value: "B"}}, + scrapes: []*scrape{ + {at: 11, value: math.Float64frombits(value.StaleNaN), metric: "histogram_stale_count"}, + {at: 12, value: math.Float64frombits(value.StaleNaN), metric: "histogram_stale_sum"}, + {at: 13, value: math.Float64frombits(value.StaleNaN), metric: "value"}, + }, + wantErr: true, + }, } for _, tt := range tests { tt := tt t.Run(tt.name, func(t *testing.T) { mp := newMetricFamily(tt.metricName, mc, zap.NewNop()) - for _, tv := range tt.scrapes { + for i, tv := range tt.scrapes { var lbls labels.Labels if tv.extraLabel.Name != "" { lbls = labels.NewBuilder(tt.labels).Set(tv.extraLabel.Name, tv.extraLabel.Value).Labels() } else { lbls = tt.labels.Copy() } - require.NoError(t, mp.Add(tv.metric, lbls, tv.at, tv.value)) + err := mp.Add(tv.metric, lbls, tv.at, tv.value) + if tt.wantErr { + if i != 0 { + require.Error(t, err) + } + } else { + require.NoError(t, err) + } + } + if tt.wantErr { + // Don't check the result if we got an error + return } require.Equal(t, 1, len(mp.groups), "Expecting exactly 1 groupKey") @@ -209,18 +233,26 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) { name string labelsScrapes []*labelsScrapes want func() pmetric.SummaryDataPoint + wantErr bool }{ { name: "summary", labelsScrapes: []*labelsScrapes{ + { + labels: labels.Labels{ + {Name: "a", Value: "A"}, {Name: "b", Value: "B"}, + }, + scrapes: []*scrape{ + {at: 14, value: 10, metric: "summary_count"}, + {at: 14, value: 15, metric: "summary_sum"}, + }, + }, { labels: labels.Labels{ {Name: "a", Value: "A"}, {Name: "quantile", Value: "0.0"}, {Name: "b", Value: "B"}, }, scrapes: []*scrape{ - {at: 10, value: 10, metric: "summary_count"}, - {at: 10, value: 12, metric: "summary_sum"}, - {at: 10, value: 8, metric: "value"}, + {at: 14, value: 8, metric: "value"}, }, }, { @@ -228,9 +260,7 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) { {Name: "a", Value: "A"}, {Name: "quantile", Value: "0.75"}, {Name: "b", Value: "B"}, }, scrapes: []*scrape{ - {at: 11, value: 10, metric: "summary_count"}, - {at: 11, value: 1004.78, metric: "summary_sum"}, - {at: 11, value: 33.7, metric: "value"}, + {at: 14, value: 33.7, metric: "value"}, }, }, { @@ -238,9 +268,7 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) { {Name: "a", Value: "A"}, {Name: "quantile", Value: "0.50"}, {Name: "b", Value: "B"}, }, scrapes: []*scrape{ - {at: 12, value: 10, metric: "summary_count"}, - {at: 12, value: 13, metric: "summary_sum"}, - {at: 12, value: 27, metric: "value"}, + {at: 14, value: 27, metric: "value"}, }, }, { @@ -248,9 +276,7 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) { {Name: "a", Value: "A"}, {Name: "quantile", Value: "0.90"}, {Name: "b", Value: "B"}, }, scrapes: []*scrape{ - {at: 13, value: 10, metric: "summary_count"}, - {at: 13, value: 14, metric: "summary_sum"}, - {at: 13, value: 56, metric: "value"}, + {at: 14, value: 56, metric: "value"}, }, }, { @@ -258,8 +284,6 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) { {Name: "a", Value: "A"}, {Name: "quantile", Value: "0.99"}, {Name: "b", Value: "B"}, }, scrapes: []*scrape{ - {at: 14, value: 10, metric: "summary_count"}, - {at: 14, value: 15, metric: "summary_sum"}, {at: 14, value: 82, metric: "value"}, }, }, @@ -300,9 +324,9 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) { {Name: "a", Value: "A"}, {Name: "quantile", Value: "0.0"}, {Name: "b", Value: "B"}, }, scrapes: []*scrape{ - {at: 10, value: 10, metric: "summary_stale_count"}, - {at: 10, value: 12, metric: "summary_stale_sum"}, - {at: 10, value: 8, metric: "value"}, + {at: 14, value: 10, metric: "summary_stale_count"}, + {at: 14, value: 12, metric: "summary_stale_sum"}, + {at: 14, value: 8, metric: "value"}, }, }, { @@ -310,9 +334,9 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) { {Name: "a", Value: "A"}, {Name: "quantile", Value: "0.75"}, {Name: "b", Value: "B"}, }, scrapes: []*scrape{ - {at: 11, value: 10, metric: "summary_stale_count"}, - {at: 11, value: 1004.78, metric: "summary_stale_sum"}, - {at: 11, value: 33.7, metric: "value"}, + {at: 14, value: 10, metric: "summary_stale_count"}, + {at: 14, value: 1004.78, metric: "summary_stale_sum"}, + {at: 14, value: 33.7, metric: "value"}, }, }, { @@ -320,9 +344,9 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) { {Name: "a", Value: "A"}, {Name: "quantile", Value: "0.50"}, {Name: "b", Value: "B"}, }, scrapes: []*scrape{ - {at: 12, value: 10, metric: "summary_stale_count"}, - {at: 12, value: 13, metric: "summary_stale_sum"}, - {at: 12, value: 27, metric: "value"}, + {at: 14, value: 10, metric: "summary_stale_count"}, + {at: 14, value: 13, metric: "summary_stale_sum"}, + {at: 14, value: 27, metric: "value"}, }, }, { @@ -330,9 +354,9 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) { {Name: "a", Value: "A"}, {Name: "quantile", Value: "0.90"}, {Name: "b", Value: "B"}, }, scrapes: []*scrape{ - {at: 13, value: 10, metric: "summary_stale_count"}, - {at: 13, value: 14, metric: "summary_stale_sum"}, - {at: 13, value: 56, metric: "value"}, + {at: 14, value: 10, metric: "summary_stale_count"}, + {at: 14, value: 14, metric: "summary_stale_sum"}, + {at: 14, value: 56, metric: "value"}, }, }, { @@ -373,6 +397,21 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) { return point }, }, + { + name: "summary with inconsistent timestamps", + labelsScrapes: []*labelsScrapes{ + { + labels: labels.Labels{ + {Name: "a", Value: "A"}, {Name: "b", Value: "B"}, + }, + scrapes: []*scrape{ + {at: 11, value: 10, metric: "summary_count"}, + {at: 14, value: 15, metric: "summary_sum"}, + }, + }, + }, + wantErr: true, + }, } for _, tt := range tests { @@ -380,10 +419,22 @@ func TestMetricGroupData_toSummaryUnitTest(t *testing.T) { t.Run(tt.name, func(t *testing.T) { mp := newMetricFamily(tt.name, mc, zap.NewNop()) for _, lbs := range tt.labelsScrapes { - for _, scrape := range lbs.scrapes { - require.NoError(t, mp.Add(scrape.metric, lbs.labels.Copy(), scrape.at, scrape.value)) + for i, scrape := range lbs.scrapes { + err := mp.Add(scrape.metric, lbs.labels.Copy(), scrape.at, scrape.value) + if tt.wantErr { + // The first scrape won't have an error + if i != 0 { + require.Error(t, err) + } + } else { + require.NoError(t, err) + } } } + if tt.wantErr { + // Don't check the result if we got an error + return + } require.Equal(t, 1, len(mp.groups), "Expecting exactly 1 groupKey") // Get the lone group key. diff --git a/receiver/prometheusreceiver/internal/otlp_metricsbuilder_test.go b/receiver/prometheusreceiver/internal/otlp_metricsbuilder_test.go index e0abfc8a2386..7d1995fa86d7 100644 --- a/receiver/prometheusreceiver/internal/otlp_metricsbuilder_test.go +++ b/receiver/prometheusreceiver/internal/otlp_metricsbuilder_test.go @@ -15,6 +15,7 @@ package internal import ( + "errors" "testing" "github.com/prometheus/common/model" @@ -1217,12 +1218,12 @@ func Test_OTLPMetricBuilder_baddata(t *testing.T) { t.Run("empty-metric-name", func(t *testing.T) { b := newMetricBuilder(newMockMetadataCache(testMetadata), true, "", zap.NewNop(), 0) b.startTime = 1.0 // set to a non-zero value - if err := b.AddDataPoint(labels.FromStrings("a", "b"), startTs, 123); err != errMetricNameNotFound { + if err := b.AddDataPoint(labels.FromStrings("a", "b"), startTs, 123); !errors.Is(err, errMetricNameNotFound) { t.Error("expecting errMetricNameNotFound error, but get nil") return } - if _, _, _, err := b.Build(); err != errNoDataToBuild { + if _, _, _, err := b.Build(); !errors.Is(err, errNoDataToBuild) { t.Error("expecting errNoDataToBuild error, but get nil") } }) @@ -1230,7 +1231,7 @@ func Test_OTLPMetricBuilder_baddata(t *testing.T) { t.Run("histogram-datapoint-no-bucket-label", func(t *testing.T) { b := newMetricBuilder(newMockMetadataCache(testMetadata), true, "", zap.NewNop(), 0) b.startTime = 1.0 // set to a non-zero value - if err := b.AddDataPoint(createLabels("hist_test", "k", "v"), startTs, 123); err != errEmptyBoundaryLabel { + if err := b.AddDataPoint(createLabels("hist_test", "k", "v"), startTs, 123); !errors.Is(err, errEmptyBoundaryLabel) { t.Error("expecting errEmptyBoundaryLabel error, but get nil") } }) @@ -1238,7 +1239,7 @@ func Test_OTLPMetricBuilder_baddata(t *testing.T) { t.Run("summary-datapoint-no-quantile-label", func(t *testing.T) { b := newMetricBuilder(newMockMetadataCache(testMetadata), true, "", zap.NewNop(), 0) b.startTime = 1.0 // set to a non-zero value - if err := b.AddDataPoint(createLabels("summary_test", "k", "v"), startTs, 123); err != errEmptyBoundaryLabel { + if err := b.AddDataPoint(createLabels("summary_test", "k", "v"), startTs, 123); !errors.Is(err, errEmptyBoundaryLabel) { t.Error("expecting errEmptyBoundaryLabel error, but get nil") } }) diff --git a/receiver/rabbitmqreceiver/README.md b/receiver/rabbitmqreceiver/README.md index 55db3fda268e..6d60e4365a95 100644 --- a/receiver/rabbitmqreceiver/README.md +++ b/receiver/rabbitmqreceiver/README.md @@ -1,8 +1,12 @@ # RabbitMQ Receiver -This receiver fetches stats from a RabbitMQ node using the [RabbitMQ Management Plugin](https://www.rabbitmq.com/management.html). +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | -Supported pipeline types: `metrics` +This receiver fetches stats from a RabbitMQ node using the [RabbitMQ Management Plugin](https://www.rabbitmq.com/management.html). > :construction: This receiver is in **BETA**. Configuration fields and metric data model are subject to change. ## Prerequisites @@ -41,3 +45,6 @@ The full list of settings exposed for this receiver are documented [here](./conf ## Metrics Details about the metrics produced by this receiver can be found in [metadata.yaml](./metadata.yaml) + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib \ No newline at end of file diff --git a/receiver/rabbitmqreceiver/go.mod b/receiver/rabbitmqreceiver/go.mod index 8505c391c1a4..e5001187e516 100644 --- a/receiver/rabbitmqreceiver/go.mod +++ b/receiver/rabbitmqreceiver/go.mod @@ -5,36 +5,58 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + github.com/testcontainers/testcontainers-go v0.13.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) require ( + github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect + github.com/Microsoft/go-winio v0.4.17 // indirect + github.com/Microsoft/hcsshim v0.8.23 // indirect + github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/containerd/cgroups v1.0.1 // indirect + github.com/containerd/containerd v1.5.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect + github.com/docker/distribution v2.7.1+incompatible // indirect + github.com/docker/docker v20.10.11+incompatible // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.4.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/go-logr/logr v1.2.3 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/golang/snappy v0.0.4 // indirect + github.com/google/uuid v1.3.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/klauspost/compress v1.15.6 // indirect github.com/knadh/koanf v1.4.1 // indirect github.com/kr/text v0.2.0 // indirect + github.com/magiconair/properties v1.8.6 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/moby/sys/mount v0.2.0 // indirect + github.com/moby/sys/mountinfo v0.5.0 // indirect + github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/opencontainers/runc v1.0.2 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.6.1 // indirect github.com/rs/cors v1.8.2 // indirect - github.com/stretchr/objx v0.1.1 // indirect + github.com/sirupsen/logrus v1.8.1 // indirect + github.com/stretchr/objx v0.2.0 // indirect go.opencensus.io v0.23.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 // indirect go.opentelemetry.io/otel v1.7.0 // indirect diff --git a/receiver/rabbitmqreceiver/go.sum b/receiver/rabbitmqreceiver/go.sum index 0bb99a58471c..4ea448d62d00 100644 --- a/receiver/rabbitmqreceiver/go.sum +++ b/receiver/rabbitmqreceiver/go.sum @@ -1,10 +1,79 @@ +bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= +github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= +github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest v14.2.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= +github.com/Azure/go-autorest/autorest v0.11.1/go.mod h1:JFgpikqFJ/MleTTxwepExTKnFUKKszPS8UavbQYUMuw= +github.com/Azure/go-autorest/autorest/adal v0.9.0/go.mod h1:/c022QCutn2P7uY+/oQWWNcK9YU+MH96NgK+jErpbcg= +github.com/Azure/go-autorest/autorest/adal v0.9.5/go.mod h1:B7KF7jKIeC9Mct5spmyCB/A8CG/sEz1vwIRGv/bbw7A= +github.com/Azure/go-autorest/autorest/date v0.3.0/go.mod h1:BI0uouVdmngYNUzGWeSYnokU+TrmwEsOqdt8Y6sso74= +github.com/Azure/go-autorest/autorest/mocks v0.4.0/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/autorest/mocks v0.4.1/go.mod h1:LTp+uSrOhSkaKrUy935gNZuuIPPVsHlr9DSOxSayd+k= +github.com/Azure/go-autorest/logger v0.2.0/go.mod h1:T9E3cAhj2VqvPOtCYAvby9aBXkZmbF5NWuPV8+WeEW8= +github.com/Azure/go-autorest/tracing v0.6.0/go.mod h1:+vhtPC754Xsa23ID7GlGsrdKBpUA79WCAKPPZVC2DeU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= +github.com/Microsoft/go-winio v0.4.16-0.20201130162521-d1ffc52c7331/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/go-winio v0.4.17 h1:iT12IBVClFevaf8PuVyi3UmZOVh4OqnaLxDTW2O6j3w= +github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= +github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= +github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= +github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2ow3VK6a9Lg= +github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= +github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= +github.com/Microsoft/hcsshim v0.8.23 h1:47MSwtKGXet80aIn+7h4YI6fwPmwIghAnsx2aOUrG2M= +github.com/Microsoft/hcsshim v0.8.23/go.mod h1:4zegtUJth7lAvFyc6cH2gGQ5B3OFQim01nnU2M8jKDg= +github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= +github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= +github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= +github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -17,10 +86,38 @@ github.com/aws/aws-sdk-go-v2/service/sts v1.7.2/go.mod h1:8EzeIqfWt2wWT4rJVu3f21 github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A= +github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= +github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= +github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= +github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= +github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= +github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= +github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= +github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= +github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= +github.com/checkpoint-restore/go-criu/v5 v5.0.0/go.mod h1:cfwC0EG7HMUenopBsUf9d89JlCLQIfgVcNsNN0t6T2M= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= +github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= +github.com/cilium/ebpf v0.2.0/go.mod h1:To2CFviqOWL/M0gIMsvSMlqe7em/l1ALkX1PyjrX2Qs= +github.com/cilium/ebpf v0.4.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= +github.com/cilium/ebpf v0.6.2/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -29,10 +126,150 @@ github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= +github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= +github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE= +github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU= +github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/aufs v1.0.0/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU= +github.com/containerd/btrfs v0.0.0-20201111183144-404b9149801e/go.mod h1:jg2QkJcsabfHugurUvvPhS3E08Oxiuh5W/g1ybB4e0E= +github.com/containerd/btrfs v0.0.0-20210316141732-918d888fb676/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/btrfs v1.0.0/go.mod h1:zMcX3qkXTAi9GI50+0HOeuV8LU2ryCE/V2vG/ZBiTss= +github.com/containerd/cgroups v0.0.0-20190717030353-c4b9ac5c7601/go.mod h1:X9rLEHIqSf/wfK8NsPqxJmeZgW4pcfzdXITDrUSJ6uI= +github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= +github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= +github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= +github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= +github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= +github.com/containerd/cgroups v1.0.1 h1:iJnMvco9XGvKUvNQkv88bE4uJXxRQH18efbKo9w5vHQ= +github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= +github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= +github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= +github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= +github.com/containerd/console v1.0.2/go.mod h1:ytZPjGgY2oeTkAONYafi2kSj0aYggsf8acV1PGKCbzQ= +github.com/containerd/containerd v1.2.10/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.1-0.20191213020239-082f7e3aed57/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.0-beta.2.0.20200729163537-40b22ef07410/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.4.9/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= +github.com/containerd/containerd v1.5.0-beta.1/go.mod h1:5HfvG1V2FsKesEGQ17k5/T7V960Tmcumvqn8Mc+pCYQ= +github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo/uBBoBORwEx6ardVcmKU= +github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= +github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= +github.com/containerd/containerd v1.5.9 h1:rs6Xg1gtIxaeyG+Smsb/0xaSDu1VgFhOCKBXxMxbsF4= +github.com/containerd/containerd v1.5.9/go.mod h1:fvQqCfadDGga5HZyn3j4+dx56qj2I9YwBrlSdalvJYQ= +github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20190815185530-f2a389ac0a02/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20191127005431-f65d91d395eb/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= +github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= +github.com/containerd/continuity v0.0.0-20201208142359-180525291bb7/go.mod h1:kR3BEg7bDFaEddKm54WSmrol1fKWDU1nKYkgrcgZT7Y= +github.com/containerd/continuity v0.0.0-20210208174643-50096c924a4e/go.mod h1:EXlVlkqNba9rJe3j7w3Xa924itAMLgZH4UD/Q4PExuQ= +github.com/containerd/continuity v0.1.0 h1:UFRRY5JemiAhPZrr/uE0n8fMTLcZsUvySPr1+D7pgr8= +github.com/containerd/continuity v0.1.0/go.mod h1:ICJu0PwR54nI0yPEnJ6jcS+J7CZAUXrLh8lPo2knzsM= +github.com/containerd/fifo v0.0.0-20180307165137-3d5202aec260/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= +github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= +github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= +github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= +github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= +github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= +github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20190911050354-e029b79d8cda/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= +github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= +github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/go-runc v1.0.0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= +github.com/containerd/imgcrypt v1.0.1/go.mod h1:mdd8cEPW7TPgNG4FpuP3sGBiQ7Yi/zak9TYCG3juvb0= +github.com/containerd/imgcrypt v1.0.4-0.20210301171431-0ae5c75f59ba/go.mod h1:6TNsg0ctmizkrOgXRNQjAPFWpMYRWuiB6dSF4Pfa5SA= +github.com/containerd/imgcrypt v1.1.1-0.20210312161619-7ed62a527887/go.mod h1:5AZJNI6sLHJljKuI9IHnw1pWqo/F0nGDOuR9zgTs7ow= +github.com/containerd/imgcrypt v1.1.1/go.mod h1:xpLnwiQmEUJPvQoAapeb2SNCxz7Xr6PJrXQb0Dpc4ms= +github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= +github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= +github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= +github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= +github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/ttrpc v1.0.2/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= +github.com/containerd/ttrpc v1.1.0/go.mod h1:XX4ZTnoOId4HklF4edwc4DcqskFZuvXB1Evzy5KFQpQ= +github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= +github.com/containerd/typeurl v0.0.0-20190911142611-5eb25027c9fd/go.mod h1:GeKYzf2pQcqv7tJ0AoCuuhtnqhva5LNU3U+OyKxxJpk= +github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= +github.com/containerd/typeurl v1.0.2/go.mod h1:9trJWW2sRlGub4wZJRTW83VtbOLS6hwcDZXTn6oPz9s= +github.com/containerd/zfs v0.0.0-20200918131355-0a33824f23a2/go.mod h1:8IgZOBdv8fAgXddBT4dBXJPtxyRsejFIpXoklgxgEjw= +github.com/containerd/zfs v0.0.0-20210301145711-11e8f1707f62/go.mod h1:A9zfAbMlQwE+/is6hi0Xw8ktpL+6glmqZYtevJgaB8Y= +github.com/containerd/zfs v0.0.0-20210315114300-dde8f0fda960/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= +github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +github.com/containernetworking/plugins v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= +github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= +github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= +github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= +github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20161114122254-48702e0da86b/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= +github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= +github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= +github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= +github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= +github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= +github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= +github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= +github.com/dnephin/pflag v1.0.7/go.mod h1:uxE91IoWURlOiTUIA8Mq5ZZkAv3dPUfZNaT80Zm7OQE= +github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= +github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= +github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= +github.com/docker/docker v20.10.11+incompatible h1:OqzI/g/W54LczvhnccGqniFoQghHx3pklbLuhfXpqGo= +github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= +github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= +github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= +github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= +github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= +github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= +github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= +github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= +github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= +github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -40,31 +277,84 @@ github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.m github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= +github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= +github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-ldap/ldap v3.0.2+incompatible/go.mod h1:qfd9rJvER9Q0/D/Sqn1DfHRoBp40uXYvFoEVrNEPqRc= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= +github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0= github.com/go-logr/logr v1.2.3/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= +github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= +github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-redis/redis v6.15.9+incompatible h1:K0pv1D7EQUjfyoMql+r/jZqCLizCGKFlFgcHWWmHQjg= +github.com/go-redis/redis v6.15.9+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= +github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.2-0.20181118220953-042da051cf31/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= +github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= +github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= +github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= +github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= +github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= @@ -79,11 +369,15 @@ github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiu github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -91,14 +385,46 @@ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= +github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= +github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= +github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/mux v1.7.2 h1:zoNxOV7WjqXptQOVngLmcSQgXmgk4NMz1HibBchjl/I= +github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= +github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.8.0/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-retryablehttp v0.5.4/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= @@ -115,27 +441,74 @@ github.com/hashicorp/vault/api v1.0.4/go.mod h1:gDcqh3WGcR1cpF5AJz/B1UFheUEneMoI github.com/hashicorp/vault/sdk v0.1.13/go.mod h1:B+hVj7TpuQY1Y/GPbCpffmgd+tSEwvhkWnjtSYCaS2M= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= +github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= +github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= +github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= github.com/klauspost/compress v1.15.6/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= +github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= +github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs= +github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -148,59 +521,231 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= +github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= +github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM= +github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM= +github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.4.1/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= +github.com/moby/sys/mountinfo v0.5.0 h1:2Ks8/r6lopsxWi9m58nlwjaeSzUX9iiL1vj5qB/9ObI= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= +github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGqsZeMYowQ= +github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= +github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= +github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= +github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c h1:nXxl5PrvVm2L/wCy8dQu6DMTwH4oIuGN8GJDAlqDdVE= +github.com/morikuni/aec v0.0.0-20170113033406-39771216ff4c/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= +github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= +github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= +github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= +github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= +github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0-rc1.0.20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= +github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= +github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= +github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= +github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= +github.com/opencontainers/runc v1.0.0-rc93/go.mod h1:3NOsor4w32B2tC0Zbl8Knk4Wg84SM2ImC1fxBuqJ/H0= +github.com/opencontainers/runc v1.0.2 h1:opHZMaswlyxz1OuGpBE53Dwe4/xF7EZTY0A2L/FpCOg= +github.com/opencontainers/runc v1.0.2/go.mod h1:aTaHFFwQXuA71CiyxOdFFIorAoemI04suvGRQFzWTD0= +github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2-0.20190207185410-29686dbc5559/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20200929063507-e6143ca7d51d/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= +github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= +github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= +github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= +github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/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= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= +github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= +github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= +github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= +github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= +github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= +github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= +github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= +github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= +github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= +github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= +github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= +github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= +github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= +github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= +github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= +github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= +github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/testcontainers/testcontainers-go v0.13.0 h1:OUujSlEGsXVo/ykPVZk3KanBNGN0TYb/7oKIPVn15JA= +github.com/testcontainers/testcontainers-go v0.13.0/go.mod h1:z1abufU633Eb/FmSBTzV6ntZAC1eZBYPtaFsn4nPuDk= +github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= +github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= +github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= +github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= +github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= +github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= +github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= +github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= +github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= +github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= +go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3CSBatqGNg7GRmsnfLWtoW60w4eDYfh7vHDg= +go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= @@ -211,42 +756,107 @@ go.opentelemetry.io/otel/sdk v1.7.0 h1:4OmStpcKVOfvDOgCt7UriAPtKolwIhxpnSNI/yK+1 go.opentelemetry.io/otel/trace v1.7.0 h1:O37Iogk1lEkMRXewVtZ1BBTVn5JEp8GrJvP92bJqC6o= go.opentelemetry.io/otel/trace v1.7.0/go.mod h1:fzLSB9nqR2eXzxPXb2JW9IKE+ScyXA48yyE4TNvoHqU= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= +go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI= go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8= go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.21.0 h1:WefMeulhovoZ2sYXz7st6K0sLj7bBhpiFaud4r4zST8= go.uber.org/zap v1.21.0/go.mod h1:wjWOCqI0f2ZZrJF/UufIOkiC8ii6tm1iqIsLo76RfJw= +golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= +golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= +golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= +golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20211108170745-6635138e15ea/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -254,61 +864,205 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200817155316-9781c653f443/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200922070232-aee5d888a860/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201112073958-5cba982894dd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201202213521-69691e467435/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad h1:ntjMns5wyP/fN65tdBD4g8J5w8n015+iIIs9rtjXkY0= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20181227161524-e6919f6577db/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +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 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= +golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa h1:I0YcKz0I7OAhddo7ya8kMnvprhcWM045PmkBdMO9zN0= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= +google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.22.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= +google.golang.org/grpc v1.24.0/go.mod h1:XDChyiUovWa60DnaeDeZmSW86xtLtjtZbwvSiRnRtcA= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= +google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= @@ -323,26 +1077,90 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/asn1-ber.v1 v1.0.0-20181015200546-f715ec2f112d/go.mod h1:cuepJuh7vyXfUyUwEgHQXw849cJrilpS5NeIjOWESAw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= +gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= +gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= +gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/square/go-jose.v2 v2.3.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= +gotest.tools/gotestsum v1.7.0/go.mod h1:V1m4Jw3eBerhI/A6qCxUE07RnCg7ACkKj9BYcAm09V8= +gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= +gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0= +gotest.tools/v3 v3.0.3/go.mod h1:Z7Lb0S5l+klDB31fvDQX8ss/FlKDxtlFlw3Oa8Ymbl8= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= +k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= +k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= +k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= +k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= +k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= +k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= +k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= +k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= +k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= +k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= +k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= +k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= +k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= +k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= +k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= +k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= +k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= +k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= +k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= +k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= +k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= +k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= +k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= +sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= +sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= diff --git a/receiver/rabbitmqreceiver/integration_test.go b/receiver/rabbitmqreceiver/integration_test.go new file mode 100644 index 000000000000..81a30cae4147 --- /dev/null +++ b/receiver/rabbitmqreceiver/integration_test.go @@ -0,0 +1,104 @@ +// 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. + +//go:build integration +// +build integration + +package rabbitmqreceiver + +import ( + "context" + "fmt" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest" + "path/filepath" + "testing" + "time" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest/golden" + "github.com/stretchr/testify/require" + "github.com/testcontainers/testcontainers-go" + "github.com/testcontainers/testcontainers-go/wait" + + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer/consumertest" +) + +var ( + containerRequest3_9 = testcontainers.ContainerRequest{ + FromDockerfile: testcontainers.FromDockerfile{ + Context: filepath.Join("testdata", "integration"), + Dockerfile: "Dockerfile.rabbitmq.3_9", + }, + ExposedPorts: []string{"15672:15672"}, + Hostname: "localhost", + WaitingFor: wait.ForListeningPort("15672"). + WithStartupTimeout(2 * time.Minute), + } +) + +func TestRabbitmqIntegration(t *testing.T) { + t.Run("Running rabbitmq 3.9", func(t *testing.T) { + t.Parallel() + container := getContainer(t, containerRequest3_9) + defer func() { + require.NoError(t, container.Terminate(context.Background())) + }() + hostname, err := container.Host(context.Background()) + require.NoError(t, err) + + f := NewFactory() + cfg := f.CreateDefaultConfig().(*Config) + cfg.Endpoint = fmt.Sprintf("http://%s:15672", hostname) + cfg.Username = "otelu" + cfg.Password = "otelp" + + consumer := new(consumertest.MetricsSink) + settings := componenttest.NewNopReceiverCreateSettings() + rcvr, err := f.CreateMetricsReceiver(context.Background(), settings, cfg, consumer) + require.NoError(t, err, "failed creating metrics receiver") + + require.NoError(t, rcvr.Start(context.Background(), componenttest.NewNopHost())) + require.Eventuallyf(t, func() bool { + return len(consumer.AllMetrics()) > 0 + }, 2*time.Minute, 1*time.Second, "failed to receive more than 0 metrics") + require.NoError(t, rcvr.Shutdown(context.Background())) + + actualMetrics := consumer.AllMetrics()[0] + + expectedFile := filepath.Join("testdata", "integration", "expected.3_9.json") + expectedMetrics, err := golden.ReadMetrics(expectedFile) + require.NoError(t, err) + + scrapertest.CompareMetrics(expectedMetrics, actualMetrics, scrapertest.IgnoreMetricValues()) + }) +} + +func getContainer(t *testing.T, req testcontainers.ContainerRequest) testcontainers.Container { + require.NoError(t, req.Validate()) + container, err := testcontainers.GenericContainer( + context.Background(), + testcontainers.GenericContainerRequest{ + ContainerRequest: req, + Started: true, + }) + require.NoError(t, err) + + code, err := container.Exec(context.Background(), []string{"./setup.sh"}) + require.NoError(t, err) + require.Equal(t, 0, code) + + err = container.Start(context.Background()) + require.NoError(t, err) + return container +} diff --git a/receiver/rabbitmqreceiver/testdata/integration/Dockerfile.rabbitmq.3_9 b/receiver/rabbitmqreceiver/testdata/integration/Dockerfile.rabbitmq.3_9 new file mode 100644 index 000000000000..b43858ed59c6 --- /dev/null +++ b/receiver/rabbitmqreceiver/testdata/integration/Dockerfile.rabbitmq.3_9 @@ -0,0 +1,6 @@ +FROM rabbitmq:3.9-management + +COPY scripts/setup.sh /setup.sh +RUN chmod +x /setup.sh + +EXPOSE 15672 diff --git a/receiver/rabbitmqreceiver/testdata/integration/expected.3_9.json b/receiver/rabbitmqreceiver/testdata/integration/expected.3_9.json new file mode 100644 index 000000000000..79e3e72611f4 --- /dev/null +++ b/receiver/rabbitmqreceiver/testdata/integration/expected.3_9.json @@ -0,0 +1,137 @@ +{ + "resourceMetrics": [ + { + "resource": { + "attributes": [ + { + "key": "rabbitmq.queue.name", + "value": { + "stringValue": "some_outgoing_queue" + } + }, + { + "key": "rabbitmq.node.name", + "value": { + "stringValue": "rabbit@localhost" + } + }, + { + "key": "rabbitmq.vhost.name", + "value": { + "stringValue": "/" + } + } + ] + }, + "scopeMetrics": [ + { + "metrics": [ + { + "description": "The number of consumers currently reading from the queue.", + "name": "rabbitmq.consumer.count", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1655390748348440000", + "timeUnixNano": "1655390758349976000" + } + ] + }, + "unit": "{consumers}" + }, + { + "description": "The number of messages acknowledged by consumers.", + "name": "rabbitmq.message.acknowledged", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1655390748348440000", + "timeUnixNano": "1655390758349976000" + } + ], + "isMonotonic": true + }, + "unit": "{messages}" + }, + { + "description": "The total number of messages currently in the queue.", + "name": "rabbitmq.message.current", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "unacknowledged" + } + } + ], + "startTimeUnixNano": "1655390748348440000", + "timeUnixNano": "1655390758349976000" + }, + { + "asInt": "10", + "attributes": [ + { + "key": "state", + "value": { + "stringValue": "ready" + } + } + ], + "startTimeUnixNano": "1655390748348440000", + "timeUnixNano": "1655390758349976000" + } + ] + }, + "unit": "{messages}" + }, + { + "description": "The number of messages delivered to consumers.", + "name": "rabbitmq.message.delivered", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "0", + "startTimeUnixNano": "1655390748348440000", + "timeUnixNano": "1655390758349976000" + } + ], + "isMonotonic": true + }, + "unit": "{messages}" + }, + { + "description": "The number of messages published to a queue.", + "name": "rabbitmq.message.published", + "sum": { + "aggregationTemporality": "AGGREGATION_TEMPORALITY_CUMULATIVE", + "dataPoints": [ + { + "asInt": "20", + "startTimeUnixNano": "1655390748348440000", + "timeUnixNano": "1655390758349976000" + } + ], + "isMonotonic": true + }, + "unit": "{messages}" + } + ], + "scope": { + "name": "otelcol/rabbitmqreceiver", + "version": "latest" + } + } + ] + } + ] +} diff --git a/receiver/rabbitmqreceiver/testdata/integration/scripts/setup.sh b/receiver/rabbitmqreceiver/testdata/integration/scripts/setup.sh new file mode 100644 index 000000000000..5022780b8577 --- /dev/null +++ b/receiver/rabbitmqreceiver/testdata/integration/scripts/setup.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +set -e + +USER='otelu' +ROOT_PASS='otelp' + +echo "creating user: ${USER} . . ." +rabbitmqctl add_user ${USER} ${ROOT_PASS} > /dev/null + +echo "Configuring ${USER} permissions. . ." +rabbitmqctl set_user_tags ${USER} administrator > /dev/null +rabbitmqctl set_permissions -p / ${USER} ".*" ".*" ".*" > /dev/null + +echo "create exchange and queue. . ." +rabbitmqadmin -u ${USER} -p ${ROOT_PASS} declare exchange --vhost=/ name=some_exchange type=direct > /dev/null +rabbitmqadmin -u ${USER} -p ${ROOT_PASS} declare queue --vhost=/ name=some_outgoing_queue durable=true > /dev/null +rabbitmqadmin -u ${USER} -p ${ROOT_PASS} declare binding source="some_exchange" destination_type="queue" destination="some_outgoing_queue" routing_key="some_routing_key" > /dev/null + +echo "push message to the queue. . ." +for((i=1;i<=20;i++)); +do +rabbitmqadmin publish exchange="some_exchange" routing_key="some_routing_key" payload="Hello World" > /dev/null; +done + +echo "get message from the queue. . ." +for((i=1;i<=10;i++)); +do +rabbitmqadmin get queue=some_outgoing_queue ackmode=ack_requeue_false > /dev/null; +done diff --git a/receiver/receivercreator/config.go b/receiver/receivercreator/config.go index fcfe789ff357..a8359ed0db0b 100644 --- a/receiver/receivercreator/config.go +++ b/receiver/receivercreator/config.go @@ -99,13 +99,13 @@ func (cfg *Config) Unmarshal(componentParser *confmap.Conf) error { receiversCfg, err := componentParser.Sub(receiversConfigKey) if err != nil { - return fmt.Errorf("unable to extract key %v: %v", receiversConfigKey, err) + return fmt.Errorf("unable to extract key %v: %w", receiversConfigKey, err) } for subreceiverKey := range receiversCfg.ToStringMap() { subreceiverSection, err := receiversCfg.Sub(subreceiverKey) if err != nil { - return fmt.Errorf("unable to extract subreceiver key %v: %v", subreceiverKey, err) + return fmt.Errorf("unable to extract subreceiver key %v: %w", subreceiverKey, err) } cfgSection := cast.ToStringMap(subreceiverSection.Get(configKey)) subreceiver, err := newReceiverTemplate(subreceiverKey, cfgSection) @@ -115,12 +115,12 @@ func (cfg *Config) Unmarshal(componentParser *confmap.Conf) error { // Unmarshals receiver_creator configuration like rule. if err = subreceiverSection.Unmarshal(&subreceiver); err != nil { - return fmt.Errorf("failed to deserialize sub-receiver %q: %s", subreceiverKey, err) + return fmt.Errorf("failed to deserialize sub-receiver %q: %w", subreceiverKey, err) } subreceiver.rule, err = newRule(subreceiver.Rule) if err != nil { - return fmt.Errorf("subreceiver %q rule is invalid: %v", subreceiverKey, err) + return fmt.Errorf("subreceiver %q rule is invalid: %w", subreceiverKey, err) } cfg.receiverTemplates[subreceiverKey] = subreceiver diff --git a/receiver/receivercreator/config_expansion.go b/receiver/receivercreator/config_expansion.go index c60a5a4d5934..0f4a1eba8167 100644 --- a/receiver/receivercreator/config_expansion.go +++ b/receiver/receivercreator/config_expansion.go @@ -118,7 +118,7 @@ func expandMap(cfg map[string]interface{}, env observer.EndpointEnv) (map[string case string: res, err := evalBackticksInConfigValue(val, env) if err != nil { - return nil, fmt.Errorf("failed evaluating config expression for key %q: %v", k, err) + return nil, fmt.Errorf("failed evaluating config expression for key %q: %w", k, err) } resolved[k] = res default: diff --git a/receiver/receivercreator/go.mod b/receiver/receivercreator/go.mod index 65f55f561d10..a49be69a8f27 100644 --- a/receiver/receivercreator/go.mod +++ b/receiver/receivercreator/go.mod @@ -9,9 +9,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/opencensus v0.53.0 github.com/spf13/cast v1.5.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/receiver/receivercreator/go.sum b/receiver/receivercreator/go.sum index 4d5ee610d125..1c49069fd88d 100644 --- a/receiver/receivercreator/go.sum +++ b/receiver/receivercreator/go.sum @@ -65,7 +65,6 @@ github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+Ce github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0 h1:t/LhUZLVitR1Ow2YOnduCsavhwFUklBMoGVYUCqmCqk= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -98,7 +97,6 @@ github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go. github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= @@ -162,7 +160,6 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -238,7 +235,6 @@ github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7V github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.15.6 h1:6D9PcO8QWu0JyaQ2zUMmu16T1T+zjjEpP91guRsvDfY= github.com/knadh/koanf v1.4.1 h1:Z0VGW/uo8NJmjd+L1Dc3S5frq6c62w5xQ9Yf4Mg3wFQ= github.com/knadh/koanf v1.4.1/go.mod h1:1cfH5223ZeZUOs8FU2UdTmaNfHpqgtjV0+NHjRO43gs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -283,7 +279,6 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mostynb/go-grpc-compression v1.1.16 h1:D9tGUINmcII049pxOj9dl32Fzhp26TrDVQXECoKJqQg= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/npillmayer/nestext v0.1.3/go.mod h1:h2lrijH8jpicr25dFY+oAJLyzlya6jhnuG+zWp9L0Uk= @@ -335,7 +330,6 @@ github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= -github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/ryanuber/go-glob v1.0.0/go.mod h1:807d1WSdnB0XRJzKNil9Om6lcp/3a0v4qIHxIXzX/Yc= @@ -383,14 +377,12 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/zpages v0.32.0 h1:AVKTx5ppWDaem7A61HFsO1T3CK/t6kFRQoZQMj0/TW4= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= diff --git a/receiver/receivercreator/observerhandler.go b/receiver/receivercreator/observerhandler.go index 9a9ce409dc73..a8d05fa1ec6c 100644 --- a/receiver/receivercreator/observerhandler.go +++ b/receiver/receivercreator/observerhandler.go @@ -58,7 +58,7 @@ func (obs *observerHandler) shutdown() error { } if len(errs) > 0 { - return fmt.Errorf("shutdown on %d receivers failed: %v", len(errs), multierr.Combine(errs...)) + return fmt.Errorf("shutdown on %d receivers failed: %w", len(errs), multierr.Combine(errs...)) } return nil diff --git a/receiver/receivercreator/resourceenhancer.go b/receiver/receivercreator/resourceenhancer.go index 882bd1d9e12e..1d3727d6161f 100644 --- a/receiver/receivercreator/resourceenhancer.go +++ b/receiver/receivercreator/resourceenhancer.go @@ -46,7 +46,7 @@ func newResourceEnhancer( for attr, expr := range resources[endpoint.Details.Type()] { res, err := evalBackticksInConfigValue(expr, env) if err != nil { - return nil, fmt.Errorf("failed processing resource attribute %q for endpoint %v: %v", attr, endpoint.ID, err) + return nil, fmt.Errorf("failed processing resource attribute %q for endpoint %v: %w", attr, endpoint.ID, err) } // If the attribute value is empty user has likely removed the default value so skip it. diff --git a/receiver/receivercreator/runner.go b/receiver/receivercreator/runner.go index a4b8e8230bb8..5733db37620f 100644 --- a/receiver/receivercreator/runner.go +++ b/receiver/receivercreator/runner.go @@ -66,7 +66,7 @@ func (run *receiverRunner) start( } if err := recvr.Start(context.Background(), run.host); err != nil { - return nil, fmt.Errorf("failed starting receiver %v: %v", cfg.ID(), err) + return nil, fmt.Errorf("failed starting receiver %v: %w", cfg.ID(), err) } return recvr, nil @@ -89,14 +89,14 @@ func (run *receiverRunner) loadRuntimeReceiverConfig( // Merge in discoveredConfig containing values discovered at runtime. if err := mergedConfig.Merge(confmap.NewFromStringMap(discoveredConfig)); err != nil { - return nil, fmt.Errorf("failed to merge template config from discovered runtime values: %v", err) + return nil, fmt.Errorf("failed to merge template config from discovered runtime values: %w", err) } receiverCfg := factory.CreateDefaultConfig() receiverCfg.SetIDName(receiver.id.Name()) if err := config.UnmarshalReceiver(mergedConfig, receiverCfg); err != nil { - return nil, fmt.Errorf("failed to load template config: %v", err) + return nil, fmt.Errorf("failed to load template config: %w", err) } // Sets dynamically created receiver to something like receiver_creator/1/redis{endpoint="localhost:6380"}. // TODO: Need to make sure this is unique (just endpoint is probably not totally sufficient). diff --git a/receiver/redisreceiver/README.md b/receiver/redisreceiver/README.md index d1d71706dd46..fa9188882b1d 100644 --- a/receiver/redisreceiver/README.md +++ b/receiver/redisreceiver/README.md @@ -1,13 +1,15 @@ # Redis Receiver +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | + The Redis receiver is designed to retrieve Redis INFO data from a single Redis instance, build metrics from that data, and send them to the next consumer at a configurable interval. -Supported pipeline types: metrics - -> :construction: This receiver is in beta and configuration fields are subject to change. - ## Details The Redis INFO command returns information and statistics about a Redis @@ -88,3 +90,6 @@ receivers: The full list of settings exposed for this receiver are documented [here](./config.go) with detailed sample configurations [here](./testdata/config.yaml). + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/redisreceiver/config_test.go b/receiver/redisreceiver/config_test.go new file mode 100644 index 000000000000..01b0b7d73722 --- /dev/null +++ b/receiver/redisreceiver/config_test.go @@ -0,0 +1,62 @@ +// 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 redisreceiver + +import ( + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/config/confignet" + "go.opentelemetry.io/collector/config/configtls" + "go.opentelemetry.io/collector/receiver/scraperhelper" + "go.opentelemetry.io/collector/service/servicetest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver/internal/metadata" +) + +func TestConfig(t *testing.T) { + factories, err := componenttest.NopFactories() + assert.Nil(t, err) + factory := NewFactory() + factories.Receivers[factory.Type()] = factory + + cfg, err := servicetest.LoadConfigAndValidate(filepath.Join("testdata", "config.yaml"), factories) + require.NoError(t, err) + require.NotNil(t, cfg) + + assert.Equal(t, + &Config{ + NetAddr: confignet.NetAddr{ + Endpoint: "localhost:6379", + Transport: "tcp", + }, + TLS: configtls.TLSClientSetting{ + Insecure: true, + }, + Password: "test", + ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ + ReceiverSettings: config.NewReceiverSettings(config.NewComponentID(typeStr)), + CollectionInterval: 10 * time.Second, + }, + Metrics: metadata.DefaultMetricsSettings(), + }, + cfg.Receivers[config.NewComponentID(typeStr)], + ) +} diff --git a/receiver/redisreceiver/go.mod b/receiver/redisreceiver/go.mod index cee932c24d20..67b2ab854f77 100644 --- a/receiver/redisreceiver/go.mod +++ b/receiver/redisreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/go-redis/redis/v7 v7.4.1 github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -17,7 +17,7 @@ require ( github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.0-beta.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect diff --git a/receiver/redisreceiver/go.sum b/receiver/redisreceiver/go.sum index f06ec9f3c023..bfa334128ad4 100644 --- a/receiver/redisreceiver/go.sum +++ b/receiver/redisreceiver/go.sum @@ -42,8 +42,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.0-beta.1+incompatible h1:9MjVa+OTMHm4C0kKZB68jPlDM9Cg75ta4i46Gxxxn8o= github.com/docker/distribution v2.8.0-beta.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -231,10 +231,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/redisreceiver/testdata/config.yaml b/receiver/redisreceiver/testdata/config.yaml new file mode 100644 index 000000000000..50954b64c18a --- /dev/null +++ b/receiver/redisreceiver/testdata/config.yaml @@ -0,0 +1,20 @@ +receivers: + redis: + endpoint: "localhost:6379" + password: "test" + collection_interval: 10s + tls: + insecure: true + +processors: + nop: + +exporters: + nop: + +service: + pipelines: + traces: + receivers: [redis] + processors: [nop] + exporters: [nop] diff --git a/receiver/riakreceiver/README.md b/receiver/riakreceiver/README.md index 28bf4dcd2d1f..e05f3072438e 100644 --- a/receiver/riakreceiver/README.md +++ b/receiver/riakreceiver/README.md @@ -1,10 +1,16 @@ # Riak Receiver -Riak metrics will be collected from the [/stats](https://docs.riak.com/riak/kv/2.2.3/developing/api/http/status.1.html) endpoint. +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | -This Riak receiver will collect metrics for [3.x+](https://github.com/basho/riak/releases) -Supported pipeline types: `metrics` + +Riak metrics will be collected from the [/stats](https://docs.riak.com/riak/kv/2.2.3/developing/api/http/status) endpoint. + +This Riak receiver will collect metrics for [3.x+](https://github.com/basho/riak/releases) ## Configuration @@ -34,3 +40,6 @@ receivers: Details about the metrics produced by this receiver can be found in [metadata.yaml](./metadata.yaml) +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + diff --git a/receiver/riakreceiver/go.mod b/receiver/riakreceiver/go.mod index 1ceb1c36ef6c..a14ca874ecae 100644 --- a/receiver/riakreceiver/go.mod +++ b/receiver/riakreceiver/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakre go 1.17 require ( - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) @@ -13,7 +13,7 @@ require github.com/stretchr/testify v1.7.2 require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/testcontainers/testcontainers-go v0.13.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( @@ -25,7 +25,7 @@ require ( github.com/containerd/containerd v1.5.9 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.15+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect diff --git a/receiver/riakreceiver/go.sum b/receiver/riakreceiver/go.sum index ce21fb9c1618..9cd382c81cc1 100644 --- a/receiver/riakreceiver/go.sum +++ b/receiver/riakreceiver/go.sum @@ -253,8 +253,8 @@ github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v20.10.11+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker v20.10.15+incompatible h1:dk9FewY/9Xwm4ay/HViEEHSQuM/kL4F+JaG6GQdgmGo= -github.com/docker/docker v20.10.15+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= @@ -742,10 +742,10 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/saphanareceiver/go.mod b/receiver/saphanareceiver/go.mod index 33edc120a991..a22d8b26a10f 100644 --- a/receiver/saphanareceiver/go.mod +++ b/receiver/saphanareceiver/go.mod @@ -4,13 +4,13 @@ go 1.17 require ( github.com/SAP/go-hdb v0.105.5 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 // indirect ) require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/receiver/saphanareceiver/go.sum b/receiver/saphanareceiver/go.sum index 86ca4bed9b47..42ed12d57da6 100644 --- a/receiver/saphanareceiver/go.sum +++ b/receiver/saphanareceiver/go.sum @@ -190,10 +190,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/sapmreceiver/factory.go b/receiver/sapmreceiver/factory.go index df3ad8d39d38..597f15cc6f9e 100644 --- a/receiver/sapmreceiver/factory.go +++ b/receiver/sapmreceiver/factory.go @@ -59,11 +59,11 @@ func createDefaultConfig() config.Receiver { func extractPortFromEndpoint(endpoint string) (int, error) { _, portStr, err := net.SplitHostPort(endpoint) if err != nil { - return 0, fmt.Errorf("endpoint is not formatted correctly: %s", err.Error()) + return 0, fmt.Errorf("endpoint is not formatted correctly: %w", err) } port, err := strconv.ParseInt(portStr, 10, 0) if err != nil { - return 0, fmt.Errorf("endpoint port is not a number: %s", err.Error()) + return 0, fmt.Errorf("endpoint port is not a number: %w", err) } if port < 1 || port > 65535 { return 0, fmt.Errorf("port number must be between 1 and 65535") diff --git a/receiver/sapmreceiver/go.mod b/receiver/sapmreceiver/go.mod index 14a1efaa8d92..3578fc8fb17c 100644 --- a/receiver/sapmreceiver/go.mod +++ b/receiver/sapmreceiver/go.mod @@ -10,9 +10,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.53.0 github.com/signalfx/sapm-proto v0.9.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 ) require ( diff --git a/receiver/sapmreceiver/go.sum b/receiver/sapmreceiver/go.sum index 1080efba4b77..5f3bb63e2f7a 100644 --- a/receiver/sapmreceiver/go.sum +++ b/receiver/sapmreceiver/go.sum @@ -877,16 +877,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/collector v0.52.0/go.mod h1:a9GvaOhyc0nVOUzqvdv5mxyWghCSso/WRO2GgRl4I1g= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= go.opentelemetry.io/collector/model v0.44.0/go.mod h1:4jo1R8uBDspLCxUGhQ0k3v/EFXFbW7s0AIy3LuGLbcU= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/pdata v0.52.0/go.mod h1:GJUTfTv8mlYpHRjcmHXVbvJr48EW/q/P/HuBvpXAE58= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/collector/semconv v0.52.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= diff --git a/receiver/sapmreceiver/trace_receiver.go b/receiver/sapmreceiver/trace_receiver.go index 69e2b9d260c6..b2425b324d39 100644 --- a/receiver/sapmreceiver/trace_receiver.go +++ b/receiver/sapmreceiver/trace_receiver.go @@ -89,7 +89,7 @@ func (sr *sapmReceiver) handleRequest(req *http.Request) error { // pass the trace data to the next consumer err = sr.nextConsumer.ConsumeTraces(ctx, td) if err != nil { - err = fmt.Errorf("error passing trace data to next consumer: %v", err.Error()) + err = fmt.Errorf("error passing trace data to next consumer: %w", err) } sr.obsrecv.EndTracesOp(ctx, "protobuf", td.SpanCount(), err) diff --git a/receiver/sapmreceiver/trace_receiver_test.go b/receiver/sapmreceiver/trace_receiver_test.go index 50135dabc490..c3a3c83c52e9 100644 --- a/receiver/sapmreceiver/trace_receiver_test.go +++ b/receiver/sapmreceiver/trace_receiver_test.go @@ -135,7 +135,7 @@ func sendSapm(endpoint string, sapm *splunksapm.PostSpansRequest, zipped bool, t // marshal the sapm reqBytes, err := sapm.Marshal() if err != nil { - return nil, fmt.Errorf("failed to marshal sapm %v", err.Error()) + return nil, fmt.Errorf("failed to marshal sapm %w", err) } if zipped { @@ -146,13 +146,13 @@ func sendSapm(endpoint string, sapm *splunksapm.PostSpansRequest, zipped bool, t // run the request bytes through the gzip writer _, err = writer.Write(reqBytes) if err != nil { - return nil, fmt.Errorf("failed to write gzip sapm %v", err.Error()) + return nil, fmt.Errorf("failed to write gzip sapm %w", err) } // close the writer err = writer.Close() if err != nil { - return nil, fmt.Errorf("failed to close the gzip writer %v", err.Error()) + return nil, fmt.Errorf("failed to close the gzip writer %w", err) } // save the gzipped bytes as the request bytes @@ -200,7 +200,7 @@ func sendSapm(endpoint string, sapm *splunksapm.PostSpansRequest, zipped bool, t resp, err := client.Do(req) if err != nil { - return resp, fmt.Errorf("failed to send request to receiver %v", err) + return resp, fmt.Errorf("failed to send request to receiver %w", err) } return resp, nil diff --git a/receiver/signalfxreceiver/factory.go b/receiver/signalfxreceiver/factory.go index c203b443c68a..b79384b140ea 100644 --- a/receiver/signalfxreceiver/factory.go +++ b/receiver/signalfxreceiver/factory.go @@ -60,11 +60,11 @@ func createDefaultConfig() config.Receiver { func extractPortFromEndpoint(endpoint string) (int, error) { _, portStr, err := net.SplitHostPort(endpoint) if err != nil { - return 0, fmt.Errorf("endpoint is not formatted correctly: %s", err.Error()) + return 0, fmt.Errorf("endpoint is not formatted correctly: %w", err) } port, err := strconv.ParseInt(portStr, 10, 0) if err != nil { - return 0, fmt.Errorf("endpoint port is not a number: %s", err.Error()) + return 0, fmt.Errorf("endpoint port is not a number: %w", err) } if port < 1 || port > 65535 { return 0, fmt.Errorf("port number must be between 1 and 65535") diff --git a/receiver/signalfxreceiver/go.mod b/receiver/signalfxreceiver/go.mod index 537309c82efd..df3a1e140f69 100644 --- a/receiver/signalfxreceiver/go.mod +++ b/receiver/signalfxreceiver/go.mod @@ -11,9 +11,9 @@ require ( github.com/signalfx/com_signalfx_metrics_protobuf v0.0.3 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/receiver/signalfxreceiver/go.sum b/receiver/signalfxreceiver/go.sum index 19ec4dce718c..1863fae7b155 100644 --- a/receiver/signalfxreceiver/go.sum +++ b/receiver/signalfxreceiver/go.sum @@ -283,12 +283,12 @@ go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go b/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go index 6da761d7d06f..cadc01e81eb6 100644 --- a/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go +++ b/receiver/signalfxreceiver/signalfxv2_event_to_logdata.go @@ -37,9 +37,11 @@ func signalFxV2EventsToLogRecords(events []*sfxpb.Event, lrs plog.LogRecordSlice attrs.EnsureCapacity(2 + len(event.Dimensions) + len(event.Properties)) // The EventType field is stored as an attribute. - if event.EventType != "" { - attrs.InsertString(splunk.SFxEventType, event.EventType) + eventType := event.EventType + if eventType == "" { + eventType = "unknown" } + attrs.InsertString(splunk.SFxEventType, eventType) // SignalFx timestamps are in millis so convert to nanos by multiplying // by 1 million. diff --git a/receiver/simpleprometheusreceiver/README.md b/receiver/simpleprometheusreceiver/README.md index 965a430cfbaf..c10297d76d54 100644 --- a/receiver/simpleprometheusreceiver/README.md +++ b/receiver/simpleprometheusreceiver/README.md @@ -1,5 +1,11 @@ # Simple Prometheus Receiver +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | + The `prometheus_simple` receiver is a wrapper around the [prometheus receiver](../prometheusreceiver). This receiver provides a simple configuration interface to configure the @@ -65,3 +71,6 @@ Example: The full list of settings exposed for this receiver are documented [here](./config.go) with detailed sample configurations [here](./testdata/config.yaml). + +[beta]:https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]:https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/simpleprometheusreceiver/go.mod b/receiver/simpleprometheusreceiver/go.mod index 03a8fde8b58e..2c65d5a81bee 100644 --- a/receiver/simpleprometheusreceiver/go.mod +++ b/receiver/simpleprometheusreceiver/go.mod @@ -5,9 +5,9 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/prometheusreceiver v0.53.0 github.com/prometheus/common v0.34.0 - github.com/prometheus/prometheus v0.36.0 + github.com/prometheus/prometheus v0.36.1 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 k8s.io/client-go v0.24.1 ) @@ -27,7 +27,7 @@ require ( github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.3.10 // indirect - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490 // indirect @@ -35,7 +35,7 @@ require ( github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.80.0 // indirect github.com/docker/distribution v2.7.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/emicklei/go-restful v2.9.5+incompatible // indirect @@ -109,8 +109,8 @@ require ( github.com/spf13/pflag v1.0.5 // indirect github.com/vultr/govultr/v2 v2.17.0 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect @@ -120,7 +120,7 @@ require ( go.uber.org/zap v1.21.0 // indirect golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect @@ -128,9 +128,9 @@ require ( golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect - google.golang.org/api v0.82.0 // indirect + google.golang.org/api v0.83.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 // indirect + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/receiver/simpleprometheusreceiver/go.sum b/receiver/simpleprometheusreceiver/go.sum index 82819d7cb942..fd08bc912655 100644 --- a/receiver/simpleprometheusreceiver/go.sum +++ b/receiver/simpleprometheusreceiver/go.sum @@ -105,8 +105,8 @@ github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgI github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= github.com/aws/aws-sdk-go-v2/credentials v1.4.3/go.mod h1:FNNC6nQZQUuyhq5aE5c7ata8o9e4ECGmS4lAXC7o1mQ= @@ -158,8 +158,8 @@ github.com/digitalocean/godo v1.80.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5 github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -586,8 +586,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= -github.com/prometheus/prometheus v0.36.0/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= github.com/rhnvrm/simples3 v0.6.1/go.mod h1:Y+3vYm2V7Y4VijFoJHHTrja6OgPrJ2cBti8dPGkC3sA= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= @@ -653,12 +653,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= @@ -787,8 +787,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -821,8 +821,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1031,8 +1031,8 @@ google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1116,8 +1116,8 @@ google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= diff --git a/receiver/simpleprometheusreceiver/receiver.go b/receiver/simpleprometheusreceiver/receiver.go index 6c923b8c22ca..f842ffb6ca06 100644 --- a/receiver/simpleprometheusreceiver/receiver.go +++ b/receiver/simpleprometheusreceiver/receiver.go @@ -48,12 +48,12 @@ func (prw *prometheusReceiverWrapper) Start(ctx context.Context, host component. pConfig, err := getPrometheusConfig(prw.config) if err != nil { - return fmt.Errorf("failed to create prometheus receiver config: %v", err) + return fmt.Errorf("failed to create prometheus receiver config: %w", err) } pr, err := pFactory.CreateMetricsReceiver(ctx, prw.params, pConfig, prw.consumer) if err != nil { - return fmt.Errorf("failed to create prometheus receiver: %v", err) + return fmt.Errorf("failed to create prometheus receiver: %w", err) } prw.prometheusRecever = pr diff --git a/receiver/skywalkingreceiver/factory.go b/receiver/skywalkingreceiver/factory.go index 6d3dbb58eee1..efbc1538d014 100644 --- a/receiver/skywalkingreceiver/factory.go +++ b/receiver/skywalkingreceiver/factory.go @@ -106,11 +106,11 @@ func createTracesReceiver( func extractPortFromEndpoint(endpoint string) (int, error) { _, portStr, err := net.SplitHostPort(endpoint) if err != nil { - return 0, fmt.Errorf("endpoint is not formatted correctly: %s", err.Error()) + return 0, fmt.Errorf("endpoint is not formatted correctly: %w", err) } port, err := strconv.ParseInt(portStr, 10, 0) if err != nil { - return 0, fmt.Errorf("endpoint port is not a number: %s", err.Error()) + return 0, fmt.Errorf("endpoint port is not a number: %w", err) } if port < 1 || port > 65535 { return 0, fmt.Errorf("port number must be between 1 and 65535") diff --git a/receiver/skywalkingreceiver/go.mod b/receiver/skywalkingreceiver/go.mod index 6c9ef0e4e424..c8f9813ffa99 100644 --- a/receiver/skywalkingreceiver/go.mod +++ b/receiver/skywalkingreceiver/go.mod @@ -5,9 +5,9 @@ go 1.17 require ( github.com/gorilla/mux v1.8.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 diff --git a/receiver/skywalkingreceiver/go.sum b/receiver/skywalkingreceiver/go.sum index 82359b9cb41d..a21e892be62c 100644 --- a/receiver/skywalkingreceiver/go.sum +++ b/receiver/skywalkingreceiver/go.sum @@ -325,12 +325,12 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= diff --git a/receiver/skywalkingreceiver/trace_receiver.go b/receiver/skywalkingreceiver/trace_receiver.go index abb806d4deec..32e22caab1c7 100644 --- a/receiver/skywalkingreceiver/trace_receiver.go +++ b/receiver/skywalkingreceiver/trace_receiver.go @@ -145,7 +145,7 @@ func (sr *swReceiver) startCollector(host component.Host) error { if sr.collectorHTTPEnabled() { cln, cerr := sr.config.CollectorHTTPSettings.ToListener() if cerr != nil { - return fmt.Errorf("failed to bind to Collector address %q: %v", + return fmt.Errorf("failed to bind to Collector address %q: %w", sr.config.CollectorHTTPSettings.Endpoint, cerr) } @@ -168,14 +168,14 @@ func (sr *swReceiver) startCollector(host component.Host) error { if sr.collectorGRPCEnabled() { opts, err := sr.config.CollectorGRPCServerSettings.ToServerOption(host, sr.settings.TelemetrySettings) if err != nil { - return fmt.Errorf("failed to build the options for the Skywalking gRPC Collector: %v", err) + return fmt.Errorf("failed to build the options for the Skywalking gRPC Collector: %w", err) } sr.grpc = grpc.NewServer(opts...) gaddr := sr.collectorGRPCAddr() gln, gerr := net.Listen("tcp", gaddr) if gerr != nil { - return fmt.Errorf("failed to bind to gRPC address %q: %v", gaddr, gerr) + return fmt.Errorf("failed to bind to gRPC address %q: %w", gaddr, gerr) } sr.segmentReportService = &traceSegmentReportService{sr: sr} diff --git a/receiver/skywalkingreceiver/tracing_report_service.go b/receiver/skywalkingreceiver/tracing_report_service.go index b83025161c81..f3ad4fcdb1f5 100644 --- a/receiver/skywalkingreceiver/tracing_report_service.go +++ b/receiver/skywalkingreceiver/tracing_report_service.go @@ -16,6 +16,7 @@ package skywalkingreceiver // import "github.com/open-telemetry/opentelemetry-co import ( "context" + "errors" "fmt" "io" @@ -34,7 +35,7 @@ func (s *traceSegmentReportService) Collect(stream agent.TraceSegmentReportServi for { segmentObject, err := stream.Recv() if err != nil { - if err == io.EOF { + if errors.Is(err, io.EOF) { return stream.SendAndClose(&common.Commands{}) } return err diff --git a/receiver/splunkhecreceiver/go.mod b/receiver/splunkhecreceiver/go.mod index 276a4b21df5c..728667d52cd0 100644 --- a/receiver/splunkhecreceiver/go.mod +++ b/receiver/splunkhecreceiver/go.mod @@ -9,9 +9,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/receiver/splunkhecreceiver/go.sum b/receiver/splunkhecreceiver/go.sum index 704606d19cba..e32b68eef803 100644 --- a/receiver/splunkhecreceiver/go.sum +++ b/receiver/splunkhecreceiver/go.sum @@ -194,12 +194,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/sqlqueryreceiver/go.mod b/receiver/sqlqueryreceiver/go.mod index f9abac8d5f55..364ee33c6697 100644 --- a/receiver/sqlqueryreceiver/go.mod +++ b/receiver/sqlqueryreceiver/go.mod @@ -4,7 +4,7 @@ go 1.17 require ( github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.opentelemetry.io/otel/trace v1.7.0 ) @@ -25,7 +25,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.uber.org/atomic v1.9.0 // indirect diff --git a/receiver/sqlqueryreceiver/go.sum b/receiver/sqlqueryreceiver/go.sum index 74b2a0aa50b5..8bea185f898a 100644 --- a/receiver/sqlqueryreceiver/go.sum +++ b/receiver/sqlqueryreceiver/go.sum @@ -189,10 +189,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/sqlserverreceiver/README.md b/receiver/sqlserverreceiver/README.md index a07f3b31f84e..2777beaacf77 100644 --- a/receiver/sqlserverreceiver/README.md +++ b/receiver/sqlserverreceiver/README.md @@ -1,10 +1,14 @@ # Microsoft SQL Server Receiver +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | + The `sqlserver` receiver grabs metrics about a Microsoft SQL Server instance using the Windows Performance Counters. Because of this, it is a Windows only receiver. -Supported pipeline types: `metrics` - ## Configuration The following settings are optional: @@ -24,3 +28,6 @@ The full list of settings exposed for this receiver are documented [here](./conf ## Metrics Details about the metrics produced by this receiver can be found in [documentation.md](./documentation.md) + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/sqlserverreceiver/config_test.go b/receiver/sqlserverreceiver/config_test.go index 2f45473371fb..c0ca2afdff2c 100644 --- a/receiver/sqlserverreceiver/config_test.go +++ b/receiver/sqlserverreceiver/config_test.go @@ -15,9 +15,13 @@ package sqlserverreceiver import ( + "path/filepath" "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config" + "go.opentelemetry.io/collector/service/servicetest" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlserverreceiver/internal/metadata" ) @@ -49,3 +53,18 @@ func TestValidate(t *testing.T) { }) } } + +func TestLoadConfig(t *testing.T) { + factories, err := componenttest.NopFactories() + require.Nil(t, err) + + factory := NewFactory() + factories.Receivers[typeStr] = factory + cfg, err := servicetest.LoadConfigAndValidate(filepath.Join("testdata", "config.yaml"), factories) + require.NoError(t, err) + require.NotNil(t, cfg) + + require.Equal(t, len(cfg.Receivers), 1) + + require.Equal(t, factory.CreateDefaultConfig(), cfg.Receivers[config.NewComponentID("sqlserver")]) +} diff --git a/receiver/sqlserverreceiver/go.mod b/receiver/sqlserverreceiver/go.mod index 5555df39ef8d..dca9d0499a31 100644 --- a/receiver/sqlserverreceiver/go.mod +++ b/receiver/sqlserverreceiver/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/receiver/sqlserverreceiver/go.sum b/receiver/sqlserverreceiver/go.sum index b99f0c8ad043..06726ffce380 100644 --- a/receiver/sqlserverreceiver/go.sum +++ b/receiver/sqlserverreceiver/go.sum @@ -185,10 +185,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/sqlserverreceiver/testdata/config.yaml b/receiver/sqlserverreceiver/testdata/config.yaml new file mode 100644 index 000000000000..7a9bd67d262b --- /dev/null +++ b/receiver/sqlserverreceiver/testdata/config.yaml @@ -0,0 +1,16 @@ +receivers: + sqlserver: + collection_interval: 10s + +processors: + nop: + +exporters: + nop: + +service: + pipelines: + metrics: + receivers: [sqlserver] + processors: [nop] + exporters: [nop] diff --git a/receiver/statsdreceiver/README.md b/receiver/statsdreceiver/README.md index fb2bae7eeff0..d5a19e303529 100644 --- a/receiver/statsdreceiver/README.md +++ b/receiver/statsdreceiver/README.md @@ -1,13 +1,15 @@ # StatsD Receiver -StatsD receiver for ingesting StatsD messages(https://github.com/statsd/statsd/blob/master/docs/metric_types.md) into the OpenTelemetry Collector. +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | -Supported pipeline types: metrics +StatsD receiver for ingesting StatsD messages(https://github.com/statsd/statsd/blob/master/docs/metric_types.md) into the OpenTelemetry Collector. Use case: it does not support horizontal pool of collectors. Desired work case is that customers use the receiver as an agent with a single input at the same time. -> :construction: This receiver is currently in **BETA**. - ## Configuration The following settings are required: @@ -141,3 +143,8 @@ service: A simple way to send a metric to `localhost:8125`: `echo "test.metric:42|c|#myKey:myVal" | nc -w 1 -u localhost 8125` + + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + diff --git a/receiver/statsdreceiver/go.mod b/receiver/statsdreceiver/go.mod index 672b5954403f..5309287728bc 100644 --- a/receiver/statsdreceiver/go.mod +++ b/receiver/statsdreceiver/go.mod @@ -6,8 +6,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.53.0 github.com/stretchr/testify v1.7.2 go.opencensus.io v0.23.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.opentelemetry.io/otel v1.7.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 diff --git a/receiver/statsdreceiver/go.sum b/receiver/statsdreceiver/go.sum index e9e519c8cf42..ec9d4cb7f7bc 100644 --- a/receiver/statsdreceiver/go.sum +++ b/receiver/statsdreceiver/go.sum @@ -190,10 +190,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/statsdreceiver/transport/udp_server.go b/receiver/statsdreceiver/transport/udp_server.go index 4616cb5e21e6..6d62f3079c61 100644 --- a/receiver/statsdreceiver/transport/udp_server.go +++ b/receiver/statsdreceiver/transport/udp_server.go @@ -16,6 +16,7 @@ package transport // import "github.com/open-telemetry/opentelemetry-collector-c import ( "bytes" + "errors" "io" "net" "strings" @@ -69,7 +70,8 @@ func (u *udpServer) ListenAndServe( u.reporter.OnDebugf("UDP Transport (%s) - ReadFrom error: %v", u.packetConn.LocalAddr(), err) - if netErr, ok := err.(net.Error); ok { + var netErr net.Error + if errors.As(err, &netErr) { if netErr.Temporary() { // nolint SA1019 continue } @@ -90,7 +92,7 @@ func (u *udpServer) handlePacket( buf := bytes.NewBuffer(data) for { bytes, err := buf.ReadBytes((byte)('\n')) - if err == io.EOF { + if errors.Is(err, io.EOF) { if len(bytes) == 0 { // Completed without errors. break diff --git a/receiver/syslogreceiver/go.mod b/receiver/syslogreceiver/go.mod index 3e821f7b9754..0dd2a1635b43 100644 --- a/receiver/syslogreceiver/go.mod +++ b/receiver/syslogreceiver/go.mod @@ -5,8 +5,8 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 gopkg.in/yaml.v2 v2.4.0 ) diff --git a/receiver/syslogreceiver/go.sum b/receiver/syslogreceiver/go.sum index 6629f4284467..1cdd51b26ca3 100644 --- a/receiver/syslogreceiver/go.sum +++ b/receiver/syslogreceiver/go.sum @@ -214,10 +214,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/tcplogreceiver/go.mod b/receiver/tcplogreceiver/go.mod index edb8b81b6688..6b6d52795f94 100644 --- a/receiver/tcplogreceiver/go.mod +++ b/receiver/tcplogreceiver/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 gopkg.in/yaml.v2 v2.4.0 ) @@ -29,7 +29,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/receiver/tcplogreceiver/go.sum b/receiver/tcplogreceiver/go.sum index 68773eead3d7..2b14409bb2c5 100644 --- a/receiver/tcplogreceiver/go.sum +++ b/receiver/tcplogreceiver/go.sum @@ -211,10 +211,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/udplogreceiver/go.mod b/receiver/udplogreceiver/go.mod index 3c36019c8a25..5f08eeccdf6d 100644 --- a/receiver/udplogreceiver/go.mod +++ b/receiver/udplogreceiver/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 gopkg.in/yaml.v2 v2.4.0 ) @@ -28,7 +28,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/receiver/udplogreceiver/go.sum b/receiver/udplogreceiver/go.sum index 1aae729a6b69..00b7e8f45858 100644 --- a/receiver/udplogreceiver/go.sum +++ b/receiver/udplogreceiver/go.sum @@ -209,10 +209,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/vcenterreceiver/documentation.md b/receiver/vcenterreceiver/documentation.md index c5ef186ec032..d9cd459f2938 100644 --- a/receiver/vcenterreceiver/documentation.md +++ b/receiver/vcenterreceiver/documentation.md @@ -71,7 +71,7 @@ metrics: | disk_direction (direction) | The direction of disk latency. | read, write | | disk_state | The state of storage and whether it is already allocated or free. | available, used | | disk_type | The type of storage device that is being recorded. | virtual, physical | -| host_effective (effective) | Whether the host is effective in the vCenter cluster. | true, false | +| host_effective (effective) | Whether the host is effective in the vCenter cluster. | | | latency_type (type) | The type of disk latency being reported. | kernel, device | | throughput_direction (direction) | The direction of network throughput. | transmitted, received | | vm_count_power_state (power_state) | Whether the virtual machines are powered on or off. | on, off | diff --git a/receiver/vcenterreceiver/go.mod b/receiver/vcenterreceiver/go.mod index 7895b18cd351..3ba2c13fd003 100644 --- a/receiver/vcenterreceiver/go.mod +++ b/receiver/vcenterreceiver/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/vmware/govmomi v0.28.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) diff --git a/receiver/vcenterreceiver/go.sum b/receiver/vcenterreceiver/go.sum index ae10544a4eaf..33d0f011af62 100644 --- a/receiver/vcenterreceiver/go.sum +++ b/receiver/vcenterreceiver/go.sum @@ -194,10 +194,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/vcenterreceiver/internal/metadata/generated_metrics_v2.go b/receiver/vcenterreceiver/internal/metadata/generated_metrics_v2.go index 398953a4649b..4660250289d2 100644 --- a/receiver/vcenterreceiver/internal/metadata/generated_metrics_v2.go +++ b/receiver/vcenterreceiver/internal/metadata/generated_metrics_v2.go @@ -242,32 +242,6 @@ var MapAttributeDiskType = map[string]AttributeDiskType{ "physical": AttributeDiskTypePhysical, } -// AttributeHostEffective specifies the a value host_effective attribute. -type AttributeHostEffective int - -const ( - _ AttributeHostEffective = iota - AttributeHostEffectiveTrue - AttributeHostEffectiveFalse -) - -// String returns the string representation of the AttributeHostEffective. -func (av AttributeHostEffective) String() string { - switch av { - case AttributeHostEffectiveTrue: - return "true" - case AttributeHostEffectiveFalse: - return "false" - } - return "" -} - -// MapAttributeHostEffective is a helper map of string to AttributeHostEffective attribute value. -var MapAttributeHostEffective = map[string]AttributeHostEffective{ - "true": AttributeHostEffectiveTrue, - "false": AttributeHostEffectiveFalse, -} - // AttributeLatencyType specifies the a value latency_type attribute. type AttributeLatencyType int @@ -465,7 +439,7 @@ func (m *metricVcenterClusterHostCount) init() { m.data.Sum().DataPoints().EnsureCapacity(m.capacity) } -func (m *metricVcenterClusterHostCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, hostEffectiveAttributeValue string) { +func (m *metricVcenterClusterHostCount) recordDataPoint(start pcommon.Timestamp, ts pcommon.Timestamp, val int64, hostEffectiveAttributeValue bool) { if !m.settings.Enabled { return } @@ -473,7 +447,7 @@ func (m *metricVcenterClusterHostCount) recordDataPoint(start pcommon.Timestamp, dp.SetStartTimestamp(start) dp.SetTimestamp(ts) dp.SetIntVal(val) - dp.Attributes().Insert("effective", pcommon.NewValueString(hostEffectiveAttributeValue)) + dp.Attributes().Insert("effective", pcommon.NewValueBool(hostEffectiveAttributeValue)) } // updateCapacity saves max length of data point slices that will be used for the slice capacity. @@ -2392,8 +2366,8 @@ func (mb *MetricsBuilder) RecordVcenterClusterCPULimitDataPoint(ts pcommon.Times } // RecordVcenterClusterHostCountDataPoint adds a data point to vcenter.cluster.host.count metric. -func (mb *MetricsBuilder) RecordVcenterClusterHostCountDataPoint(ts pcommon.Timestamp, val int64, hostEffectiveAttributeValue AttributeHostEffective) { - mb.metricVcenterClusterHostCount.recordDataPoint(mb.startTime, ts, val, hostEffectiveAttributeValue.String()) +func (mb *MetricsBuilder) RecordVcenterClusterHostCountDataPoint(ts pcommon.Timestamp, val int64, hostEffectiveAttributeValue bool) { + mb.metricVcenterClusterHostCount.recordDataPoint(mb.startTime, ts, val, hostEffectiveAttributeValue) } // RecordVcenterClusterMemoryEffectiveDataPoint adds a data point to vcenter.cluster.memory.effective metric. diff --git a/receiver/vcenterreceiver/metadata.yaml b/receiver/vcenterreceiver/metadata.yaml index 9e9ab1535867..ded1a6d97e7d 100644 --- a/receiver/vcenterreceiver/metadata.yaml +++ b/receiver/vcenterreceiver/metadata.yaml @@ -34,12 +34,9 @@ attributes: - virtual - physical host_effective: + type: bool value: effective description: Whether the host is effective in the vCenter cluster. - type: bool - enum: - - "true" - - "false" disk_direction: value: direction description: The direction of disk latency. diff --git a/receiver/vcenterreceiver/scraper.go b/receiver/vcenterreceiver/scraper.go index d017862e7cf8..8b30e08b6a7f 100644 --- a/receiver/vcenterreceiver/scraper.go +++ b/receiver/vcenterreceiver/scraper.go @@ -130,8 +130,8 @@ func (v *vcenterMetricScraper) collectCluster( v.mb.RecordVcenterClusterCPUEffectiveDataPoint(now, int64(s.EffectiveCpu)) v.mb.RecordVcenterClusterMemoryEffectiveDataPoint(now, s.EffectiveMemory) v.mb.RecordVcenterClusterMemoryLimitDataPoint(now, s.TotalMemory) - v.mb.RecordVcenterClusterHostCountDataPoint(now, int64(s.NumHosts-s.NumEffectiveHosts), metadata.AttributeHostEffectiveFalse) - v.mb.RecordVcenterClusterHostCountDataPoint(now, int64(s.NumEffectiveHosts), metadata.AttributeHostEffectiveTrue) + v.mb.RecordVcenterClusterHostCountDataPoint(now, int64(s.NumHosts-s.NumEffectiveHosts), false) + v.mb.RecordVcenterClusterHostCountDataPoint(now, int64(s.NumEffectiveHosts), true) v.mb.EmitForResource( metadata.WithVcenterClusterName(c.Name()), ) diff --git a/receiver/vcenterreceiver/testdata/metrics/expected.json b/receiver/vcenterreceiver/testdata/metrics/expected.json index d52537325528..e5a57ba66c91 100644 --- a/receiver/vcenterreceiver/testdata/metrics/expected.json +++ b/receiver/vcenterreceiver/testdata/metrics/expected.json @@ -3783,7 +3783,7 @@ { "key": "effective", "value": { - "stringValue": "false" + "boolValue": false } } ], @@ -3796,7 +3796,7 @@ { "key": "effective", "value": { - "stringValue": "true" + "boolValue": true } } ], diff --git a/receiver/vcenterreceiver/testdata/metrics/integration-metrics.json b/receiver/vcenterreceiver/testdata/metrics/integration-metrics.json index 30e9ca10f584..647436cc4ce8 100644 --- a/receiver/vcenterreceiver/testdata/metrics/integration-metrics.json +++ b/receiver/vcenterreceiver/testdata/metrics/integration-metrics.json @@ -813,7 +813,7 @@ { "key": "effective", "value": { - "stringValue": "false" + "boolValue": false } } ], @@ -826,7 +826,7 @@ { "key": "effective", "value": { - "stringValue": "true" + "boolValue": true } } ], diff --git a/receiver/wavefrontreceiver/README.md b/receiver/wavefrontreceiver/README.md index f664f25dce6b..89ec08fa79cf 100644 --- a/receiver/wavefrontreceiver/README.md +++ b/receiver/wavefrontreceiver/README.md @@ -1,5 +1,11 @@ # Wavefront Receiver +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | + The Wavefront receiver accepts metrics and depends on [carbonreceiver proto and transport](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/carbonreceiver), @@ -13,7 +19,6 @@ it to the collector metric format. See [https://docs.wavefront.com/wavefront_data_format.html#metrics-data-format-syntax.](https://docs.wavefront.com/wavefront_data_format.html#metrics-data-format-syntax) Each line received represents a Wavefront metric in the following format: -Supported pipeline types: metrics ``` [] source= [pointTags]``` @@ -51,3 +56,6 @@ receivers: The full list of settings exposed for this receiver are documented [here](./config.go) with detailed sample configurations [here](./testdata/config.yaml). + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib diff --git a/receiver/wavefrontreceiver/go.mod b/receiver/wavefrontreceiver/go.mod index 7c5a0e7916be..4b38801186ff 100644 --- a/receiver/wavefrontreceiver/go.mod +++ b/receiver/wavefrontreceiver/go.mod @@ -9,7 +9,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/receiver/collectdreceiver v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 google.golang.org/protobuf v1.28.0 ) @@ -28,8 +28,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.53.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect - go.opentelemetry.io/collector/semconv v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/receiver/wavefrontreceiver/go.sum b/receiver/wavefrontreceiver/go.sum index bdc6e511dc7b..c662df31b80f 100644 --- a/receiver/wavefrontreceiver/go.sum +++ b/receiver/wavefrontreceiver/go.sum @@ -183,12 +183,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/wavefrontreceiver/wavefront_parser.go b/receiver/wavefrontreceiver/wavefront_parser.go index 39df7281df53..9e861dc91a7e 100644 --- a/receiver/wavefrontreceiver/wavefront_parser.go +++ b/receiver/wavefrontreceiver/wavefront_parser.go @@ -80,7 +80,7 @@ func (wp *WavefrontParser) Parse(line string) (*metricspb.Metric, error) { } else { dblVal, err := strconv.ParseFloat(valueStr, 64) if err != nil { - return nil, fmt.Errorf("invalid wavefront metric value [%s]: %v", line, err) + return nil, fmt.Errorf("invalid wavefront metric value [%s]: %w", line, err) } metricType = metricspb.MetricDescriptor_GAUGE_DOUBLE point.Value = &metricspb.Point_DoubleValue{DoubleValue: dblVal} @@ -115,7 +115,7 @@ func (wp *WavefrontParser) Parse(line string) (*metricspb.Metric, error) { var err error labelKeys, labelValues, err = buildLabels(tags) if err != nil { - return nil, fmt.Errorf("invalid wavefront metric [%s]: %v", line, err) + return nil, fmt.Errorf("invalid wavefront metric [%s]: %w", line, err) } } diff --git a/receiver/windowseventlogreceiver/README.md b/receiver/windowseventlogreceiver/README.md index 19a0fc4accba..0678a5514d3a 100644 --- a/receiver/windowseventlogreceiver/README.md +++ b/receiver/windowseventlogreceiver/README.md @@ -44,8 +44,9 @@ Each operator performs a simple responsibility, such as parsing a timestamp or J Configuration: ```yaml -- type: windowseventlog - channel: application +receivers: + windowseventlog: + channel: application ``` Output entry sample: diff --git a/receiver/windowseventlogreceiver/go.mod b/receiver/windowseventlogreceiver/go.mod index 22bdc8ac69a0..5ec0f99501eb 100644 --- a/receiver/windowseventlogreceiver/go.mod +++ b/receiver/windowseventlogreceiver/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 golang.org/x/sys v0.0.0-20220412211240-33da011f77ad gopkg.in/yaml.v2 v2.4.0 ) @@ -29,7 +29,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.8.1 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 // indirect + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 // indirect go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/receiver/windowseventlogreceiver/go.sum b/receiver/windowseventlogreceiver/go.sum index 7acbe33f7696..f30ee4b7b74f 100644 --- a/receiver/windowseventlogreceiver/go.sum +++ b/receiver/windowseventlogreceiver/go.sum @@ -206,10 +206,10 @@ github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/windowsperfcountersreceiver/README.md b/receiver/windowsperfcountersreceiver/README.md index 3913ecff4a2a..da0e9c24b9e0 100644 --- a/receiver/windowsperfcountersreceiver/README.md +++ b/receiver/windowsperfcountersreceiver/README.md @@ -1,5 +1,11 @@ # Windows Performance Counters Receiver +| Status | | +| ------------------------ |-----------| +| Stability | [beta] | +| Supported pipeline types | metrics | +| Distributions | [contrib] | + This receiver, for Windows only, captures the configured system, application, or custom performance counter data from the Windows registry using the [PDH interface](https://docs.microsoft.com/en-us/windows/win32/perfctrs/using-the-pdh-functions-to-consume-counter-data). @@ -155,3 +161,7 @@ service: ## Known Limitation - The network interface is not available inside the container. Hence, the metrics for the object `Network Interface` aren't generated in that scenario. In the case of sub-process, it captures `Network Interface` metrics. There is a similar open issue in [Github](https://github.com/influxdata/telegraf/issues/5357) and [Docker](https://forums.docker.com/t/unable-to-collect-network-metrics-inside-windows-container-on-windows-server-2016-data-center/69480) forum. + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib + diff --git a/receiver/windowsperfcountersreceiver/go.mod b/receiver/windowsperfcountersreceiver/go.mod index 05bbfe20bad0..fd9e66713fea 100644 --- a/receiver/windowsperfcountersreceiver/go.mod +++ b/receiver/windowsperfcountersreceiver/go.mod @@ -5,7 +5,7 @@ go 1.17 require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 ) @@ -23,7 +23,7 @@ require ( github.com/pelletier/go-toml v1.9.4 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.opentelemetry.io/otel v1.7.0 // indirect go.opentelemetry.io/otel/metric v0.30.0 // indirect go.opentelemetry.io/otel/trace v1.7.0 // indirect diff --git a/receiver/windowsperfcountersreceiver/go.sum b/receiver/windowsperfcountersreceiver/go.sum index 805f56fb89fa..82745174c7c3 100644 --- a/receiver/windowsperfcountersreceiver/go.sum +++ b/receiver/windowsperfcountersreceiver/go.sum @@ -184,10 +184,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/receiver/zipkinreceiver/README.md b/receiver/zipkinreceiver/README.md index 019d29bc344b..87cc659e5068 100644 --- a/receiver/zipkinreceiver/README.md +++ b/receiver/zipkinreceiver/README.md @@ -1,8 +1,12 @@ # Zipkin Receiver -This receiver receives spans from [Zipkin](https://zipkin.io/) (V1 and V2). +| Status | | +| ------------------------ |-------------------| +| Stability | [beta] | +| Supported pipeline types | traces | +| Distributions | [core], [contrib] | -Supported pipeline types: traces +This receiver receives spans from [Zipkin](https://zipkin.io/) (V1 and V2). ## Getting Started @@ -27,3 +31,7 @@ Several helper files are leveraged to provide additional capabilities automatica - [gRPC settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configgrpc/README.md) including CORS - [TLS and mTLS settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/config/configtls/README.md) - [Queuing, retry and timeout settings](https://github.com/open-telemetry/opentelemetry-collector/blob/main/exporter/exporterhelper/README.md) + +[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib +[core]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol \ No newline at end of file diff --git a/receiver/zipkinreceiver/go.mod b/receiver/zipkinreceiver/go.mod index 72e87bbab5cf..b8fd36777e44 100644 --- a/receiver/zipkinreceiver/go.mod +++ b/receiver/zipkinreceiver/go.mod @@ -8,9 +8,9 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.53.0 github.com/openzipkin/zipkin-go v0.4.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 google.golang.org/protobuf v1.28.0 ) diff --git a/receiver/zipkinreceiver/go.sum b/receiver/zipkinreceiver/go.sum index b2148d3c064b..caa708af2b18 100644 --- a/receiver/zipkinreceiver/go.sum +++ b/receiver/zipkinreceiver/go.sum @@ -249,12 +249,12 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= -go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0 h1:mac9BKRqwaX6zxHPDe3pvmWpwuuIM0vuXv2juCnQevE= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.32.0/go.mod h1:5eCOqeGphOyz6TsY3ZDNjE33SM/TFAK3RGuCL2naTgY= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= diff --git a/receiver/zookeeperreceiver/README.md b/receiver/zookeeperreceiver/README.md index 4d6d5cb59153..399382f44c9f 100644 --- a/receiver/zookeeperreceiver/README.md +++ b/receiver/zookeeperreceiver/README.md @@ -1,7 +1,11 @@ -**Under development - not ready for use.** - # Zookeeper Receiver +| Status | | +| ------------------------ | ---------------- | +| Stability | [in development] | +| Supported pipeline types | traces | +| Distributions | [contrib] | + The Zookeeper receiver collects metrics from a Zookeeper instance, using the `mntr` command. The `mntr` 4 letter word command needs to be enabled for the receiver to be able to collect metrics. @@ -17,4 +21,7 @@ receivers: zookeeper: endpoint: "localhost:2181" collection_interval: 20s -``` \ No newline at end of file +``` + +[in development]: https://github.com/open-telemetry/opentelemetry-collector#in-development +[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib \ No newline at end of file diff --git a/receiver/zookeeperreceiver/go.mod b/receiver/zookeeperreceiver/go.mod index 546cf4dbd6e1..29153452cd40 100644 --- a/receiver/zookeeperreceiver/go.mod +++ b/receiver/zookeeperreceiver/go.mod @@ -7,8 +7,8 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/containertest v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/scrapertest v0.53.0 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) @@ -19,7 +19,7 @@ require ( github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.0-beta.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect diff --git a/receiver/zookeeperreceiver/go.sum b/receiver/zookeeperreceiver/go.sum index 39b0aa52fed1..a87b7fbdfe68 100644 --- a/receiver/zookeeperreceiver/go.sum +++ b/receiver/zookeeperreceiver/go.sum @@ -41,8 +41,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/docker/distribution v2.8.0-beta.1+incompatible h1:9MjVa+OTMHm4C0kKZB68jPlDM9Cg75ta4i46Gxxxn8o= github.com/docker/distribution v2.8.0-beta.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= @@ -211,10 +211,10 @@ github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9dec github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/testbed/go.mod b/testbed/go.mod index a457ef8d7cc3..d9a4cf260746 100644 --- a/testbed/go.mod +++ b/testbed/go.mod @@ -24,12 +24,12 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver v0.53.0 github.com/open-telemetry/opentelemetry-collector-contrib/testbed/mockdatareceivers/mockawsxrayreceiver v0.53.0 github.com/prometheus/common v0.34.0 - github.com/prometheus/prometheus v0.36.0 + github.com/prometheus/prometheus v0.36.1 github.com/shirou/gopsutil/v3 v3.22.5 github.com/stretchr/testify v1.7.2 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 - go.opentelemetry.io/collector/semconv v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/atomic v1.9.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 @@ -53,7 +53,7 @@ require ( github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/apache/thrift v0.16.0 // indirect github.com/armon/go-metrics v0.3.10 // indirect - github.com/aws/aws-sdk-go v1.44.28 // indirect + github.com/aws/aws-sdk-go v1.44.33 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cenkalti/backoff/v4 v4.1.3 // indirect github.com/census-instrumentation/opencensus-proto v0.3.0 // indirect @@ -63,7 +63,7 @@ require ( github.com/dennwc/varint v1.0.0 // indirect github.com/digitalocean/godo v1.80.0 // indirect github.com/docker/distribution v2.8.0-beta.1+incompatible // indirect - github.com/docker/docker v20.10.16+incompatible // indirect + github.com/docker/docker v20.10.17+incompatible // indirect github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/emicklei/go-restful v2.9.5+incompatible // indirect @@ -200,16 +200,16 @@ require ( go.uber.org/goleak v1.1.12 // indirect golang.org/x/crypto v0.0.0-20220507011949-2cf3adece122 // indirect golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect - golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect + golang.org/x/net v0.0.0-20220607020251-c690dde0001d // indirect golang.org/x/oauth2 v0.0.0-20220524215830-622c5d57e401 // indirect golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df // indirect - google.golang.org/api v0.82.0 // indirect + google.golang.org/api v0.83.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 // indirect + google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 // indirect google.golang.org/grpc v1.47.0 // indirect google.golang.org/protobuf v1.28.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/testbed/go.sum b/testbed/go.sum index 8a57be22440d..27db66dca917 100644 --- a/testbed/go.sum +++ b/testbed/go.sum @@ -141,8 +141,8 @@ github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:W github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.38.68/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= -github.com/aws/aws-sdk-go v1.44.28 h1:h/OAqEqY18wq//v6h4GNPMmCkxuzSDrWuGyrvSiRqf4= -github.com/aws/aws-sdk-go v1.44.28/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.33 h1:OoLO99CdssiyOISnZknsQfIqESOyuMgy7pLrPW7RLKg= +github.com/aws/aws-sdk-go v1.44.33/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= 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.2/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2/config v1.8.3/go.mod h1:4AEiLtAb8kLs7vgw2ZV3p2VZ1+hBavOc84hqxVNpCyw= @@ -223,8 +223,8 @@ github.com/digitalocean/godo v1.80.0/go.mod h1:BPCqvwbjbGqxuUnIKB4EvS/AX7IDnNmt5 github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/docker/distribution v2.8.0-beta.1+incompatible h1:9MjVa+OTMHm4C0kKZB68jPlDM9Cg75ta4i46Gxxxn8o= github.com/docker/distribution v2.8.0-beta.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.16+incompatible h1:2Db6ZR/+FUR3hqPMwnogOPHFn405crbpxvWzKovETOQ= -github.com/docker/docker v20.10.16+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v20.10.17+incompatible h1:JYCuMrWaVNophQTOrMMoSwudOVEfcegoZZrleKc1xwE= +github.com/docker/docker v20.10.17+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11 h1:IPrmumsT9t5BS7XcPhgsCTlkWbYg80SEXUzDpReaU6Y= github.com/docker/go-connections v0.4.1-0.20210727194412-58542c764a11/go.mod h1:a6bNUGTbQBsY6VRHTr4h/rkOXjl244DyRD0tx3fgq4Q= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= @@ -962,8 +962,8 @@ github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0VU= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/prometheus v0.36.0 h1:d1OWo3gTs5apWUMP5luhZTmXKmwrUUz9DqWlGCQJBAE= -github.com/prometheus/prometheus v0.36.0/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= +github.com/prometheus/prometheus v0.36.1 h1:XRX+R2LpSaCy7so4+Fww6Y7tEiFXYk6cnKF9HbM+uQE= +github.com/prometheus/prometheus v0.36.1/go.mod h1:g5VjDTKGDiTs249GQVBbbWdHLkkIOgme3HxyUwIzlwY= github.com/prometheus/statsd_exporter v0.21.0 h1:hA05Q5RFeIjgwKIYEdFd59xu5Wwaznf33yKI+pyX6T8= github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/rabbitmq/amqp091-go v1.1.0/go.mod h1:ogQDLSOACsLPsIq0NpbtiifNZi2YOz0VTJ0kHRghqbM= @@ -1153,16 +1153,18 @@ go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/collector v0.52.0/go.mod h1:a9GvaOhyc0nVOUzqvdv5mxyWghCSso/WRO2GgRl4I1g= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= go.opentelemetry.io/collector/model v0.44.0/go.mod h1:4jo1R8uBDspLCxUGhQ0k3v/EFXFbW7s0AIy3LuGLbcU= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= go.opentelemetry.io/collector/pdata v0.52.0/go.mod h1:GJUTfTv8mlYpHRjcmHXVbvJr48EW/q/P/HuBvpXAE58= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/collector/semconv v0.52.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= -go.opentelemetry.io/collector/semconv v0.53.0 h1:J1lVnFp1VyNKU63rc7csY9/54Tjm9BlLylXLjPimf7s= go.opentelemetry.io/collector/semconv v0.53.0/go.mod h1:SxK0rUnUP7YeDakexzbE/vhimTOHwE6m/4aKKd9e27Q= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6 h1:cTRkxmDV5FCdUas71Xxc6myt+ckkfoi1zFOsXUoXdxU= +go.opentelemetry.io/collector/semconv v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:FaIeym7NybVemHQSLMsDp8AEmUr5NyAs4FIVy32ABMc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0 h1:WenoaOMNP71oq3KkMZ/jnxI9xU/JSCLw8yZILSI2lfU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.32.0/go.mod h1:J0dBVrt7dPS/lKJyQoW0xzQiUr4r2Ik1VwPjAUWnofI= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= @@ -1344,8 +1346,8 @@ golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8= -golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d h1:4SFsTMi4UahlKoloni7L4eYzhFRifURQLw+yv0QDCx8= +golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1380,8 +1382,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1623,8 +1625,8 @@ google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= -google.golang.org/api v0.82.0 h1:h6EGeZuzhoKSS7BUznzkW+2wHZ+4Ubd6rsVvvh3dRkw= -google.golang.org/api v0.82.0/go.mod h1:Ld58BeTlL9DIYr2M2ajvoSqmGLei0BMn+kVBmkam1os= +google.golang.org/api v0.83.0 h1:pMvST+6v+46Gabac4zlJlalxZjCeRcepwg2EdBU+nCc= +google.golang.org/api v0.83.0/go.mod h1:CNywQoj/AfhTw26ZWAa6LwOv+6WFxHmeLPZq2uncLZk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1716,8 +1718,8 @@ google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58 h1:a221mAAEAzq4Lz6ZWRkcS8ptb2mxoxYSt4N68aRyQHM= -google.golang.org/genproto v0.0.0-20220527130721-00d5c0f3be58/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8 h1:qRu95HZ148xXw+XeZ3dvqe85PxH4X8+jIo0iRPKcEnM= +google.golang.org/genproto v0.0.0-20220602131408-e326c6e8e9c8/go.mod h1:yKyY4AMRwFiC8yMMNaMi+RkCnjZJt9LoWuvhXjMs+To= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= diff --git a/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod b/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod index 2a5d76d3192c..f0b667dea319 100644 --- a/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod +++ b/testbed/mockdatareceivers/mockawsxrayreceiver/go.mod @@ -4,8 +4,8 @@ go 1.17 require ( github.com/gorilla/mux v1.8.0 - go.opentelemetry.io/collector v0.53.0 - go.opentelemetry.io/collector/pdata v0.53.0 + go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 + go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 go.uber.org/zap v1.21.0 ) diff --git a/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum b/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum index b78c82ba9523..513a9438696e 100644 --- a/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum +++ b/testbed/mockdatareceivers/mockawsxrayreceiver/go.sum @@ -174,17 +174,17 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/collector v0.53.0 h1:p4XwnAltBnw/gCRTk+DHTJVGYLzD5cPHp+0XK/KKE/s= -go.opentelemetry.io/collector v0.53.0/go.mod h1:MMSqz2ImXjLrZB26cC8vrtgnjsza3hpc760NNjsmjwE= -go.opentelemetry.io/collector/pdata v0.53.0 h1:jezCyHu/LXs4P/GzKObCabU2/OUTivNBlQHGPAo/dZo= -go.opentelemetry.io/collector/pdata v0.53.0/go.mod h1:25b+xH0uJwp8H3f0a1V+OQfxbhYVds6Rf1Ul+HFCGo4= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6 h1:bFrhE1Jra/BLaMM3ELrwHD+8hZAgfHJxrjds4TdViqg= +go.opentelemetry.io/collector v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:pyZdZ4+iyLap4bRHk9VaV8gsGYFD5KAdqmQ6FMfPbTk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6 h1:iGlNJHbAw7qPYXZeZ57PFZ4GSuSQ1srGGGNlN7cvMBk= +go.opentelemetry.io/collector/pdata v0.53.1-0.20220615184617-4cefca87d2c6/go.mod h1:QYnSAk0hoMIpMlKADLj0FPatHelL2bUrIfGwAV6shR8= go.opentelemetry.io/otel v1.7.0 h1:Z2lA3Tdch0iDcrhJXDIlC94XE+bxok1F9B+4Lz/lGsM= go.opentelemetry.io/otel v1.7.0/go.mod h1:5BdUoMIz5WEs0vt0CUEMtSSaTSHBBVwrhnz7+nrD5xk= go.opentelemetry.io/otel/metric v0.30.0 h1:Hs8eQZ8aQgs0U49diZoaS6Uaxw3+bBE3lcMUKBFIk3c= diff --git a/testbed/mockdatareceivers/mockawsxrayreceiver/trace_receiver.go b/testbed/mockdatareceivers/mockawsxrayreceiver/trace_receiver.go index b917d9d121fb..17560074b786 100644 --- a/testbed/mockdatareceivers/mockawsxrayreceiver/trace_receiver.go +++ b/testbed/mockdatareceivers/mockawsxrayreceiver/trace_receiver.go @@ -68,7 +68,7 @@ func (ar *MockAwsXrayReceiver) Start(_ context.Context, host component.Host) err // set up the listener ln, err := net.Listen("tcp", ar.config.Endpoint) if err != nil { - return fmt.Errorf("failed to bind to address %s: %v", ar.config.Endpoint, err) + return fmt.Errorf("failed to bind to address %s: %w", ar.config.Endpoint, err) } ar.logger.Info(fmt.Sprintf("listen to address %s", ar.config.Endpoint)) diff --git a/testbed/testbed/child_process_collector.go b/testbed/testbed/child_process_collector.go index 1e1cdc0f1c1a..07141167656f 100644 --- a/testbed/testbed/child_process_collector.go +++ b/testbed/testbed/child_process_collector.go @@ -181,7 +181,7 @@ func (cp *childProcessCollector) Start(params StartParams) error { // Prepare log file logFile, err := os.Create(params.LogFilePath) if err != nil { - return fmt.Errorf("cannot create %s: %s", params.LogFilePath, err.Error()) + return fmt.Errorf("cannot create %s: %w", params.LogFilePath, err) } log.Printf("Writing %s log to %s", cp.name, params.LogFilePath) @@ -208,7 +208,7 @@ func (cp *childProcessCollector) Start(params StartParams) error { // Start the process. if err = cp.cmd.Start(); err != nil { - return fmt.Errorf("cannot start executable at %s: %s", exePath, err.Error()) + return fmt.Errorf("cannot start executable at %s: %w", exePath, err) } cp.startTime = time.Now() @@ -291,8 +291,7 @@ func (cp *childProcessCollector) WatchResourceConsumption() error { var err error cp.processMon, err = process.NewProcess(int32(cp.cmd.Process.Pid)) if err != nil { - return fmt.Errorf("cannot monitor process %d: %s", - cp.cmd.Process.Pid, err.Error()) + return fmt.Errorf("cannot monitor process %d: %w", cp.cmd.Process.Pid, err) } cp.fetchRAMUsage() @@ -301,8 +300,7 @@ func (cp *childProcessCollector) WatchResourceConsumption() error { cp.lastElapsedTime = time.Now() cp.lastProcessTimes, err = cp.processMon.Times() if err != nil { - return fmt.Errorf("cannot get process times for %d: %s", - cp.cmd.Process.Pid, err.Error()) + return fmt.Errorf("cannot get process times for %d: %w", cp.cmd.Process.Pid, err) } // Measure every ResourceCheckPeriod. @@ -321,6 +319,7 @@ func (cp *childProcessCollector) WatchResourceConsumption() error { } } + remainingFailures := cp.resourceSpec.MaxConsecutiveFailures for { select { case <-ticker.C: @@ -328,11 +327,17 @@ func (cp *childProcessCollector) WatchResourceConsumption() error { cp.fetchCPUUsage() if err := cp.checkAllowedResourceUsage(); err != nil { + remainingFailures-- + if remainingFailures > 0 { + log.Printf("Resource utilization too high. Remaining attempts: %d", remainingFailures) + continue + } if _, errStop := cp.Stop(); errStop != nil { log.Printf("Failed to stop child process: %v", err) } return err } + remainingFailures = cp.resourceSpec.MaxConsecutiveFailures case <-cp.doneSignal: log.Printf("Stopping process monitor.") @@ -349,8 +354,7 @@ func (cp *childProcessCollector) fetchRAMUsage() { // Get process memory and CPU times mi, err := cp.processMon.MemoryInfo() if err != nil { - log.Printf("cannot get process memory for %d: %s", - cp.cmd.Process.Pid, err.Error()) + log.Printf("cannot get process memory for %d: %v", cp.cmd.Process.Pid, err) return } @@ -371,8 +375,7 @@ func (cp *childProcessCollector) fetchRAMUsage() { func (cp *childProcessCollector) fetchCPUUsage() { times, err := cp.processMon.Times() if err != nil { - log.Printf("cannot get process times for %d: %s", - cp.cmd.Process.Pid, err.Error()) + log.Printf("cannot get process times for %d: %v", cp.cmd.Process.Pid, err) return } diff --git a/testbed/testbed/options.go b/testbed/testbed/options.go index 8bc6cf03ad65..28b954abebb2 100644 --- a/testbed/testbed/options.go +++ b/testbed/testbed/options.go @@ -38,6 +38,10 @@ type ResourceSpec struct { // Period during which CPU and RAM of the process are measured. // Bigger numbers will result in more averaging of short spikes. ResourceCheckPeriod time.Duration + + // The number of consecutive violations necessary to trigger a failure. + // This is useful for tests which can tolerate transitory violations. + MaxConsecutiveFailures uint32 } // isSpecified returns true if any part of ResourceSpec is specified, diff --git a/testbed/testbed/utils.go b/testbed/testbed/utils.go index ad41864eb8c7..42402f04eb18 100644 --- a/testbed/testbed/utils.go +++ b/testbed/testbed/utils.go @@ -15,11 +15,22 @@ package testbed // import "github.com/open-telemetry/opentelemetry-collector-contrib/testbed/testbed" import ( + "net" + "strconv" "testing" + "github.com/stretchr/testify/require" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/common/testutil" ) func GetAvailablePort(t *testing.T) int { - return int(testutil.GetAvailablePort(t)) + endpoint := testutil.GetAvailableLocalAddress(t) + _, port, err := net.SplitHostPort(endpoint) + require.NoError(t, err) + + portInt, err := strconv.Atoi(port) + require.NoError(t, err) + + return portInt } diff --git a/testbed/tests/e2e_test.go b/testbed/tests/e2e_test.go index 0ac62796172f..3d2ccb98290c 100644 --- a/testbed/tests/e2e_test.go +++ b/testbed/tests/e2e_test.go @@ -101,7 +101,13 @@ func TestBallastMemory(t *testing.T) { &testbed.PerfTestValidator{}, performanceResultsSummary, testbed.WithSkipResults(), - testbed.WithResourceLimits(testbed.ResourceSpec{ExpectedMaxRAM: test.maxRSS}), + testbed.WithResourceLimits( + testbed.ResourceSpec{ + ExpectedMaxRAM: test.maxRSS, + ResourceCheckPeriod: time.Second, + MaxConsecutiveFailures: 3, + }, + ), ) tc.StartAgent() diff --git a/testbed/tests/trace_test.go b/testbed/tests/trace_test.go index af81a3ffc6b5..35809ebbf796 100644 --- a/testbed/tests/trace_test.go +++ b/testbed/tests/trace_test.go @@ -294,7 +294,7 @@ func TestTraceBallast1kSPSAddAttrs(t *testing.T) { { attrCount: 0, attrSizeByte: 0, - expectedMaxCPU: 30, + expectedMaxCPU: 60, expectedMaxRAM: 2200, resultsSummary: performanceResultsSummary, }, diff --git a/versions.yaml b/versions.yaml index 6083a5f3933c..8fb75ef9b692 100644 --- a/versions.yaml +++ b/versions.yaml @@ -39,6 +39,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/f5cloudexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudexporter + - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlemanagedprometheusexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/googlecloudpubsubexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/honeycombexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/humioexporter @@ -135,6 +136,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/activedirectorydsreceiver + - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/aerospikereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/apachereceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awscontainerinsightreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsecscontainermetricsreceiver