diff --git a/.chloggen/add-all-to-journald-receiver.yaml b/.chloggen/add-all-to-journald-receiver.yaml new file mode 100755 index 000000000000..8cdb7a193178 --- /dev/null +++ b/.chloggen/add-all-to-journald-receiver.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: receiver/journald + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: add a new config option "all" that turns on full output from journalctl, including lines that are too long. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [30920] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/.chloggen/codeboten_mv-deprecated-component.yaml b/.chloggen/codeboten_mv-deprecated-component.yaml new file mode 100755 index 000000000000..13b2405c63bd --- /dev/null +++ b/.chloggen/codeboten_mv-deprecated-component.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: breaking + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: servicegraphprocessor + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: removed deprecated component, use the servicegraph connector instead. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [26091] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.chloggen/drosiek-sumologicextension.yaml b/.chloggen/drosiek-sumologicextension.yaml new file mode 100755 index 000000000000..3e48468596c2 --- /dev/null +++ b/.chloggen/drosiek-sumologicextension.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: new_component + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: sumologicextension + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: add configuration and readme + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [29601] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user] diff --git a/.chloggen/mx-psi_update-v0.13.2.yaml b/.chloggen/mx-psi_update-v0.13.2.yaml new file mode 100755 index 000000000000..c10ec7d78076 --- /dev/null +++ b/.chloggen/mx-psi_update-v0.13.2.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: bug_fix + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: exporter/datadog + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Fixes a bug where empty histograms were not being sent to the backend in the distributions mode. + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [31019] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [] diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index c57de4578db0..03676c63560d 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -112,6 +112,7 @@ extension/solarwindsapmsettingsextension/ @open-telemetry/collect extension/storage/ @open-telemetry/collector-contrib-approvers @dmitryax @atoulme @djaglowski extension/storage/dbstorage/ @open-telemetry/collector-contrib-approvers @dmitryax @atoulme extension/storage/filestorage/ @open-telemetry/collector-contrib-approvers @djaglowski +extension/sumologicextension/ @open-telemetry/collector-contrib-approvers @astencel-sumo @sumo-drosiek @swiatekm-sumo internal/aws/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @mxiamxia internal/collectd/ @open-telemetry/collector-contrib-approvers @atoulme @@ -126,6 +127,7 @@ internal/kubelet/ @open-telemetry/collect internal/metadataproviders/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole internal/sharedcomponent/ @open-telemetry/collector-contrib-approvers @open-telemetry/collector-approvers internal/splunk/ @open-telemetry/collector-contrib-approvers @dmitryax +internal/sqlquery/ @open-telemetry/collector-contrib-approvers @crobert-1 @dmitryax internal/tools/ @open-telemetry/collector-contrib-approvers pkg/batchperresourceattr/ @open-telemetry/collector-contrib-approvers @atoulme @dmitryax @@ -172,7 +174,6 @@ processor/resourcedetectionprocessor/internal/openshift/ @open-telemetry/collect processor/resourceprocessor/ @open-telemetry/collector-contrib-approvers @dmitryax processor/routingprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling processor/schemaprocessor/ @open-telemetry/collector-contrib-approvers @MovieStoreGuy -processor/servicegraphprocessor/ @open-telemetry/collector-contrib-approvers @jpkrohling @mapno processor/spanmetricsprocessor/ @open-telemetry/collector-contrib-approvers processor/spanprocessor/ @open-telemetry/collector-contrib-approvers @boostchicken processor/sumologicprocessor/ @open-telemetry/collector-contrib-approvers @aboguszewski-sumo @astencel-sumo @sumo-drosiek diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 4e9ac1cf1b89..c96309f1a015 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -111,6 +111,7 @@ body: - extension/storage - extension/storage/dbstorage - extension/storage/filestorage + - extension/sumologic - internal/aws - internal/collectd - internal/core @@ -124,6 +125,7 @@ body: - internal/metadataproviders - internal/sharedcomponent - internal/splunk + - internal/sqlquery - internal/tools - pkg/batchperresourceattr - pkg/batchpersignal @@ -168,7 +170,6 @@ body: - processor/resourcedetection/internal/openshift - processor/routing - processor/schema - - processor/servicegraph - processor/span - processor/spanmetrics - processor/sumologic diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index e2120c8364f2..a407a9880351 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -105,6 +105,7 @@ body: - extension/storage - extension/storage/dbstorage - extension/storage/filestorage + - extension/sumologic - internal/aws - internal/collectd - internal/core @@ -118,6 +119,7 @@ body: - internal/metadataproviders - internal/sharedcomponent - internal/splunk + - internal/sqlquery - internal/tools - pkg/batchperresourceattr - pkg/batchpersignal @@ -162,7 +164,6 @@ body: - processor/resourcedetection/internal/openshift - processor/routing - processor/schema - - processor/servicegraph - processor/span - processor/spanmetrics - processor/sumologic diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index 09c9202dc031..ec95b3a4832f 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -105,6 +105,7 @@ body: - extension/storage - extension/storage/dbstorage - extension/storage/filestorage + - extension/sumologic - internal/aws - internal/collectd - internal/core @@ -118,6 +119,7 @@ body: - internal/metadataproviders - internal/sharedcomponent - internal/splunk + - internal/sqlquery - internal/tools - pkg/batchperresourceattr - pkg/batchpersignal @@ -162,7 +164,6 @@ body: - processor/resourcedetection/internal/openshift - processor/routing - processor/schema - - processor/servicegraph - processor/span - processor/spanmetrics - processor/sumologic diff --git a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/package_test.go b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/package_test.go index bcf3cc7846e3..98e6dc536115 100644 --- a/cmd/configschema/cfgmetadatagen/cfgmetadatagen/package_test.go +++ b/cmd/configschema/cfgmetadatagen/cfgmetadatagen/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/cmd/configschema/go.mod b/cmd/configschema/go.mod index 7cb9641de4aa..df5367a2ba62 100644 --- a/cmd/configschema/go.mod +++ b/cmd/configschema/go.mod @@ -25,8 +25,8 @@ require ( github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/monitor/armmonitor v0.11.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resources/armresources v1.2.0 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v1.2.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 // indirect github.com/gocql/gocql v1.6.0 // indirect github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect github.com/open-telemetry/opentelemetry-collector-contrib/exporter/alibabacloudlogserviceexporter v0.93.0 // indirect @@ -77,6 +77,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.93.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.93.0 // indirect @@ -231,9 +232,9 @@ require ( github.com/DataDog/go-sqllexer v0.0.8 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 // indirect github.com/DataDog/sketches-go v1.4.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 // indirect @@ -512,7 +513,6 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/winperfcounters v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor v0.93.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/awsxrayreceiver v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureblobreceiver v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/receiver/azureeventhubreceiver v0.93.0 // indirect @@ -927,8 +927,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/reso replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor => ../../processor/routingprocessor/ -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor => ../../processor/servicegraphprocessor/ - replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor => ../../processor/spanmetricsprocessor/ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor => ../../processor/spanprocessor/ @@ -1150,3 +1148,5 @@ replace ( github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector => ../../connector/servicegraphconnector github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector => ../../connector/spanmetricsconnector ) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery => ../../internal/sqlquery diff --git a/cmd/configschema/go.sum b/cmd/configschema/go.sum index 39292bc23e68..dc0b2c1b3433 100644 --- a/cmd/configschema/go.sum +++ b/cmd/configschema/go.sum @@ -178,17 +178,17 @@ github.com/DataDog/go-tuf v1.0.2-0.5.2 h1:EeZr937eKAWPxJ26IykAdWA4A0jQXJgkhUjqEI github.com/DataDog/go-tuf v1.0.2-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee h1:tXibLZk3G6HncIFJKaNItsdzcrk4YqILNDZlXPTNt4k= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee/go.mod h1:nTot/Iy0kW16bXgXr6blEc8gFeAS7vTqYlhAxh+dbc0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 h1:MwXEMqL/aThmkdLKSABXRb+/qoyCq5Z3+1IPPB6L/m0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1/go.mod h1:ODbHm4iVWmn16ruFXY7uMC0LNaZaGWHBqu0VR8efIsk= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.1 h1:0ugsTkWG1SrU8WR9sDGhOy4M/iqHY+w5Ali+jzMGetg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 h1:mOfJySl1BbvgVHgLsA1ouWHN2QKyd+xksy3hG2TeD68= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1/go.mod h1:NRv/hOlGq1LrJN1bbY7gJa4upTDTh5ZRW19U5w/wuNQ= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 h1:S9pLye2reYfPUOV4FXSkRvsDt6OwIGyGAIgXTNErhL4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1/go.mod h1:3luUUR9mBoHiMRh+PrWmySpXMOntTd/7fCl2UTu4Axg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 h1:z0QDSV9lQbTVoAnOkKiu7SWElWKPwpqGI7OE+OYNCIs= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1/go.mod h1:As+hEGB+/quKDMjxLtMKU9ucSsjrpdk1pXnMNqfwGoU= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 h1:nd3Zch8xtTALM3ObZ3jBwzbDFtARTN/QVoDCCWXubJE= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1/go.mod h1:xF6NyzghnEeQe9+9d8XiiOzxhDAdvOWOF8dR4dq5DqI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 h1:9xUPi4L6HwM9uB4rkKuoFGrpyCiv6Xm0NaBtkeCJhoI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2/go.mod h1:m4btyxCu5NuyxCL9iX4Sa3fNb5deCsVMSWIlF18tQ0E= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.2 h1:TGGnFPI160L3HGhCN7Y4lXNlH7mFj/uBYdVeQG6lIVo= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 h1:V5SoRFNeFdidAemhVTGO/zwtPNluN4ZrrqiFLuAT7Us= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2/go.mod h1:Z2FPxYhi8GIFkS4WLC7RrRaGolyB9TqS2RMSwNcmczk= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 h1:9eWdRXsKcFdVyyjg1AVrKhwLRL7/7Cp8nKG5QISwFKQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2/go.mod h1:1br0HgzhDIYcnVrx4dkkmRmdGrj/4iastO6TFcQkcbg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 h1:IkA9MI8nmY8gbRI9YLI7o7tKmjuTK1nU29cDqyi+sOg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2/go.mod h1:QLz5CEgTHJ91pLOcb2hL8P3+7AKMUIOfXJw2Sr4588o= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 h1:s06GkbYmWnG7WYmmxOTB0W+1BidVqZ/4oXvyoQmNovE= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2/go.mod h1:hKaXjBn+Y/KT6otuDA213Y0gtjlK0ylI8uuAho3LKKo= github.com/DataDog/sketches-go v1.4.4 h1:dF52vzXRFSPOj2IjXSWLvXq3jubL4CI69kwYjJ1w5Z8= github.com/DataDog/sketches-go v1.4.4/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= diff --git a/cmd/mdatagen/internal/metadata/package_test.go b/cmd/mdatagen/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/cmd/mdatagen/internal/metadata/package_test.go +++ b/cmd/mdatagen/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index 146195c85780..3f79cf1a0ca5 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -112,7 +112,6 @@ processors: - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.93.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.93.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.93.0 - - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor v0.93.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor v0.93.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor v0.93.0 - gomod: github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.93.0 @@ -283,7 +282,6 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver => ../../receiver/vcenterreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/statsdreceiver => ../../receiver/statsdreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter => ../../exporter/prometheusremotewriteexporter - - github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor => ../../processor/servicegraphprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor => ../../processor/groupbytraceprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter => ../../exporter/tencentcloudlogserviceexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter => ../../exporter/loadbalancingexporter @@ -453,3 +451,4 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/extension/opampextension => ../../extension/opampextension - github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension => ../../extension/solarwindsapmsettingsextension - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/namedpipereceiver => ../../receiver/namedpipereceiver + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery => ../../internal/sqlquery diff --git a/cmd/otelcontribcol/components.go b/cmd/otelcontribcol/components.go index e76318a39ad3..40f528e3d935 100644 --- a/cmd/otelcontribcol/components.go +++ b/cmd/otelcontribcol/components.go @@ -114,7 +114,6 @@ import ( resourcedetectionprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor" resourceprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor" routingprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor" - servicegraphprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor" spanmetricsprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor" spanprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor" sumologicprocessor "github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor" @@ -415,7 +414,6 @@ func components() (otelcol.Factories, error) { resourcedetectionprocessor.NewFactory(), resourceprocessor.NewFactory(), routingprocessor.NewFactory(), - servicegraphprocessor.NewFactory(), spanmetricsprocessor.NewFactory(), sumologicprocessor.NewFactory(), spanprocessor.NewFactory(), diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index a5402c45e964..12f9ad8e66d1 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -102,7 +102,6 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.93.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor v0.93.0 @@ -280,11 +279,11 @@ require ( github.com/DataDog/go-sqllexer v0.0.8 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 // indirect github.com/DataDog/sketches-go v1.4.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 // indirect @@ -547,6 +546,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.93.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.93.0 // indirect @@ -854,8 +854,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/stats replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusremotewriteexporter => ../../exporter/prometheusremotewriteexporter -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor => ../../processor/servicegraphprocessor - replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/groupbytraceprocessor => ../../processor/groupbytraceprocessor replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/tencentcloudlogserviceexporter => ../../exporter/tencentcloudlogserviceexporter @@ -1191,3 +1189,5 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/opam replace github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension => ../../extension/solarwindsapmsettingsextension replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/namedpipereceiver => ../../receiver/namedpipereceiver + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery => ../../internal/sqlquery diff --git a/cmd/otelcontribcol/go.sum b/cmd/otelcontribcol/go.sum index f0e53c007001..97922f3b34c3 100644 --- a/cmd/otelcontribcol/go.sum +++ b/cmd/otelcontribcol/go.sum @@ -177,17 +177,17 @@ github.com/DataDog/go-tuf v1.0.2-0.5.2 h1:EeZr937eKAWPxJ26IykAdWA4A0jQXJgkhUjqEI github.com/DataDog/go-tuf v1.0.2-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee h1:tXibLZk3G6HncIFJKaNItsdzcrk4YqILNDZlXPTNt4k= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee/go.mod h1:nTot/Iy0kW16bXgXr6blEc8gFeAS7vTqYlhAxh+dbc0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 h1:MwXEMqL/aThmkdLKSABXRb+/qoyCq5Z3+1IPPB6L/m0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1/go.mod h1:ODbHm4iVWmn16ruFXY7uMC0LNaZaGWHBqu0VR8efIsk= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.1 h1:0ugsTkWG1SrU8WR9sDGhOy4M/iqHY+w5Ali+jzMGetg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 h1:mOfJySl1BbvgVHgLsA1ouWHN2QKyd+xksy3hG2TeD68= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1/go.mod h1:NRv/hOlGq1LrJN1bbY7gJa4upTDTh5ZRW19U5w/wuNQ= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 h1:S9pLye2reYfPUOV4FXSkRvsDt6OwIGyGAIgXTNErhL4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1/go.mod h1:3luUUR9mBoHiMRh+PrWmySpXMOntTd/7fCl2UTu4Axg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 h1:z0QDSV9lQbTVoAnOkKiu7SWElWKPwpqGI7OE+OYNCIs= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1/go.mod h1:As+hEGB+/quKDMjxLtMKU9ucSsjrpdk1pXnMNqfwGoU= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 h1:nd3Zch8xtTALM3ObZ3jBwzbDFtARTN/QVoDCCWXubJE= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1/go.mod h1:xF6NyzghnEeQe9+9d8XiiOzxhDAdvOWOF8dR4dq5DqI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 h1:9xUPi4L6HwM9uB4rkKuoFGrpyCiv6Xm0NaBtkeCJhoI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2/go.mod h1:m4btyxCu5NuyxCL9iX4Sa3fNb5deCsVMSWIlF18tQ0E= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.2 h1:TGGnFPI160L3HGhCN7Y4lXNlH7mFj/uBYdVeQG6lIVo= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 h1:V5SoRFNeFdidAemhVTGO/zwtPNluN4ZrrqiFLuAT7Us= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2/go.mod h1:Z2FPxYhi8GIFkS4WLC7RrRaGolyB9TqS2RMSwNcmczk= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 h1:9eWdRXsKcFdVyyjg1AVrKhwLRL7/7Cp8nKG5QISwFKQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2/go.mod h1:1br0HgzhDIYcnVrx4dkkmRmdGrj/4iastO6TFcQkcbg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 h1:IkA9MI8nmY8gbRI9YLI7o7tKmjuTK1nU29cDqyi+sOg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2/go.mod h1:QLz5CEgTHJ91pLOcb2hL8P3+7AKMUIOfXJw2Sr4588o= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 h1:s06GkbYmWnG7WYmmxOTB0W+1BidVqZ/4oXvyoQmNovE= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2/go.mod h1:hKaXjBn+Y/KT6otuDA213Y0gtjlK0ylI8uuAho3LKKo= github.com/DataDog/sketches-go v1.4.4 h1:dF52vzXRFSPOj2IjXSWLvXq3jubL4CI69kwYjJ1w5Z8= github.com/DataDog/sketches-go v1.4.4/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= diff --git a/cmd/telemetrygen/internal/e2etest/go.mod b/cmd/telemetrygen/internal/e2etest/go.mod index a95a127ffac9..d1028e8767b6 100644 --- a/cmd/telemetrygen/internal/e2etest/go.mod +++ b/cmd/telemetrygen/internal/e2etest/go.mod @@ -3,7 +3,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetryge go 1.20 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen v0.92.0 + github.com/open-telemetry/opentelemetry-collector-contrib/cmd/telemetrygen v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.93.0 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f diff --git a/connector/countconnector/package_test.go b/connector/countconnector/package_test.go index 64dcc342a2b0..6c55bf168a82 100644 --- a/connector/countconnector/package_test.go +++ b/connector/countconnector/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/connector/datadogconnector/go.mod b/connector/datadogconnector/go.mod index 6d27e4c629fe..c9330ff23974 100644 --- a/connector/datadogconnector/go.mod +++ b/connector/datadogconnector/go.mod @@ -5,8 +5,8 @@ go 1.20 require ( github.com/DataDog/datadog-agent/pkg/proto v0.52.0-devel github.com/DataDog/datadog-agent/pkg/trace v0.50.2 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.93.0 @@ -42,9 +42,9 @@ require ( github.com/DataDog/go-sqllexer v0.0.8 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 // indirect github.com/DataDog/sketches-go v1.4.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.21.0 // indirect diff --git a/connector/datadogconnector/go.sum b/connector/datadogconnector/go.sum index 66f0b8f72a58..c1eff0990280 100644 --- a/connector/datadogconnector/go.sum +++ b/connector/datadogconnector/go.sum @@ -68,17 +68,17 @@ github.com/DataDog/go-tuf v1.0.2-0.5.2 h1:EeZr937eKAWPxJ26IykAdWA4A0jQXJgkhUjqEI github.com/DataDog/go-tuf v1.0.2-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee h1:tXibLZk3G6HncIFJKaNItsdzcrk4YqILNDZlXPTNt4k= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee/go.mod h1:nTot/Iy0kW16bXgXr6blEc8gFeAS7vTqYlhAxh+dbc0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 h1:MwXEMqL/aThmkdLKSABXRb+/qoyCq5Z3+1IPPB6L/m0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1/go.mod h1:ODbHm4iVWmn16ruFXY7uMC0LNaZaGWHBqu0VR8efIsk= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.1 h1:0ugsTkWG1SrU8WR9sDGhOy4M/iqHY+w5Ali+jzMGetg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 h1:mOfJySl1BbvgVHgLsA1ouWHN2QKyd+xksy3hG2TeD68= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1/go.mod h1:NRv/hOlGq1LrJN1bbY7gJa4upTDTh5ZRW19U5w/wuNQ= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 h1:S9pLye2reYfPUOV4FXSkRvsDt6OwIGyGAIgXTNErhL4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1/go.mod h1:3luUUR9mBoHiMRh+PrWmySpXMOntTd/7fCl2UTu4Axg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 h1:z0QDSV9lQbTVoAnOkKiu7SWElWKPwpqGI7OE+OYNCIs= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1/go.mod h1:As+hEGB+/quKDMjxLtMKU9ucSsjrpdk1pXnMNqfwGoU= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 h1:nd3Zch8xtTALM3ObZ3jBwzbDFtARTN/QVoDCCWXubJE= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1/go.mod h1:xF6NyzghnEeQe9+9d8XiiOzxhDAdvOWOF8dR4dq5DqI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 h1:9xUPi4L6HwM9uB4rkKuoFGrpyCiv6Xm0NaBtkeCJhoI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2/go.mod h1:m4btyxCu5NuyxCL9iX4Sa3fNb5deCsVMSWIlF18tQ0E= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.2 h1:TGGnFPI160L3HGhCN7Y4lXNlH7mFj/uBYdVeQG6lIVo= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 h1:V5SoRFNeFdidAemhVTGO/zwtPNluN4ZrrqiFLuAT7Us= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2/go.mod h1:Z2FPxYhi8GIFkS4WLC7RrRaGolyB9TqS2RMSwNcmczk= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 h1:9eWdRXsKcFdVyyjg1AVrKhwLRL7/7Cp8nKG5QISwFKQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2/go.mod h1:1br0HgzhDIYcnVrx4dkkmRmdGrj/4iastO6TFcQkcbg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 h1:IkA9MI8nmY8gbRI9YLI7o7tKmjuTK1nU29cDqyi+sOg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2/go.mod h1:QLz5CEgTHJ91pLOcb2hL8P3+7AKMUIOfXJw2Sr4588o= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 h1:s06GkbYmWnG7WYmmxOTB0W+1BidVqZ/4oXvyoQmNovE= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2/go.mod h1:hKaXjBn+Y/KT6otuDA213Y0gtjlK0ylI8uuAho3LKKo= github.com/DataDog/sketches-go v1.4.4 h1:dF52vzXRFSPOj2IjXSWLvXq3jubL4CI69kwYjJ1w5Z8= github.com/DataDog/sketches-go v1.4.4/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= diff --git a/connector/exceptionsconnector/package_test.go b/connector/exceptionsconnector/package_test.go index fadb3f0c383a..08df820c3e17 100644 --- a/connector/exceptionsconnector/package_test.go +++ b/connector/exceptionsconnector/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/connector/failoverconnector/package_test.go b/connector/failoverconnector/package_test.go index 2f1e3b2ee6a5..bd8e101d2a05 100644 --- a/connector/failoverconnector/package_test.go +++ b/connector/failoverconnector/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/connector/routingconnector/package_test.go b/connector/routingconnector/package_test.go index 40fa9d61ee5d..badf42ea5d43 100644 --- a/connector/routingconnector/package_test.go +++ b/connector/routingconnector/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/servicegraphprocessor/config.go b/connector/servicegraphconnector/config.go similarity index 94% rename from processor/servicegraphprocessor/config.go rename to connector/servicegraphconnector/config.go index ab2172bff0c1..316ac0eb2cba 100644 --- a/processor/servicegraphprocessor/config.go +++ b/connector/servicegraphconnector/config.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package servicegraphprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor" +package servicegraphconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector" import ( "time" diff --git a/connector/servicegraphconnector/config_test.go b/connector/servicegraphconnector/config_test.go new file mode 100644 index 000000000000..62936dae18d2 --- /dev/null +++ b/connector/servicegraphconnector/config_test.go @@ -0,0 +1,45 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package servicegraphconnector + +import ( + "path/filepath" + "testing" + "time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/otelcol/otelcoltest" + + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector/internal/metadata" +) + +func TestLoadConfig(t *testing.T) { + // Prepare + factories, err := otelcoltest.NopFactories() + require.NoError(t, err) + + factories.Connectors[metadata.Type] = NewFactory() + + cfg, err := otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "service-graph-connector-config.yaml"), factories) + + // Verify + require.NoError(t, err) + require.NotNil(t, cfg) + assert.Equal(t, + &Config{ + LatencyHistogramBuckets: []time.Duration{1, 2, 3, 4, 5}, + Dimensions: []string{"dimension-1", "dimension-2"}, + Store: StoreConfig{ + TTL: time.Second, + MaxItems: 10, + }, + CacheLoop: time.Minute, + StoreExpirationLoop: 2 * time.Second, + }, + cfg.Connectors[component.NewID(metadata.Type)], + ) + +} diff --git a/processor/servicegraphprocessor/processor.go b/connector/servicegraphconnector/connector.go similarity index 87% rename from processor/servicegraphprocessor/processor.go rename to connector/servicegraphconnector/connector.go index 0fde2f0c5ac6..220e3a303f06 100644 --- a/processor/servicegraphprocessor/processor.go +++ b/connector/servicegraphconnector/connector.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package servicegraphprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor" +package servicegraphconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector" import ( "context" @@ -24,8 +24,8 @@ import ( "go.opentelemetry.io/otel/metric" "go.uber.org/zap" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor/internal/metadata" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor/internal/store" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector/internal/metadata" + "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector/internal/store" ) const ( @@ -52,13 +52,12 @@ type metricSeries struct { lastUpdated int64 // Used to remove stale series } -var _ processor.Traces = (*serviceGraphProcessor)(nil) +var _ processor.Traces = (*serviceGraphConnector)(nil) -type serviceGraphProcessor struct { +type serviceGraphConnector struct { config *Config logger *zap.Logger metricsConsumer consumer.Metrics - tracesConsumer consumer.Traces store *store.Store @@ -85,7 +84,7 @@ type serviceGraphProcessor struct { shutdownCh chan any } -func newProcessor(set component.TelemetrySettings, config component.Config) *serviceGraphProcessor { +func newConnector(set component.TelemetrySettings, config component.Config) *serviceGraphConnector { pConfig := config.(*Config) bounds := defaultLatencyHistogramBuckets @@ -126,7 +125,7 @@ func newProcessor(set component.TelemetrySettings, config component.Config) *ser metric.WithUnit("1"), ) - return &serviceGraphProcessor{ + return &serviceGraphConnector{ config: pConfig, logger: set.Logger, startTime: time.Now(), @@ -147,7 +146,7 @@ func newProcessor(set component.TelemetrySettings, config component.Config) *ser } } -func (p *serviceGraphProcessor) Start(_ context.Context, host component.Host) error { +func (p *serviceGraphConnector) Start(_ context.Context, host component.Host) error { p.store = store.NewStore(p.config.Store.TTL, p.config.Store.MaxItems, p.onComplete, p.onExpire) if p.metricsConsumer == nil { @@ -174,15 +173,11 @@ func (p *serviceGraphProcessor) Start(_ context.Context, host component.Host) er go p.storeExpirationLoop(p.config.StoreExpirationLoop) - if p.tracesConsumer == nil { - p.logger.Info("Started servicegraphconnector") - } else { - p.logger.Info("Started servicegraphprocessor") - } + p.logger.Info("Started servicegraphconnector") return nil } -func (p *serviceGraphProcessor) metricFlushLoop(flushInterval time.Duration) { +func (p *serviceGraphConnector) metricFlushLoop(flushInterval time.Duration) { if flushInterval <= 0 { return } @@ -202,7 +197,7 @@ func (p *serviceGraphProcessor) metricFlushLoop(flushInterval time.Duration) { } } -func (p *serviceGraphProcessor) flushMetrics(ctx context.Context) error { +func (p *serviceGraphConnector) flushMetrics(ctx context.Context) error { md, err := p.buildMetrics() if err != nil { return fmt.Errorf("failed to build metrics: %w", err) @@ -213,25 +208,21 @@ func (p *serviceGraphProcessor) flushMetrics(ctx context.Context) error { return nil } - // Firstly, export md to avoid being impacted by downstream trace serviceGraphProcessor errors/latency. + // Firstly, export md to avoid being impacted by downstream trace serviceGraphConnector errors/latency. return p.metricsConsumer.ConsumeMetrics(ctx, md) } -func (p *serviceGraphProcessor) Shutdown(_ context.Context) error { - if p.tracesConsumer == nil { - p.logger.Info("Shutting down servicegraphconnector") - } else { - p.logger.Info("Shutting down servicegraphprocessor") - } +func (p *serviceGraphConnector) Shutdown(_ context.Context) error { + p.logger.Info("Shutting down servicegraphconnector") close(p.shutdownCh) return nil } -func (p *serviceGraphProcessor) Capabilities() consumer.Capabilities { +func (p *serviceGraphConnector) Capabilities() consumer.Capabilities { return consumer.Capabilities{MutatesData: false} } -func (p *serviceGraphProcessor) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { +func (p *serviceGraphConnector) ConsumeTraces(ctx context.Context, td ptrace.Traces) error { if err := p.aggregateMetrics(ctx, td); err != nil { return fmt.Errorf("failed to aggregate metrics: %w", err) } @@ -244,13 +235,10 @@ func (p *serviceGraphProcessor) ConsumeTraces(ctx context.Context, td ptrace.Tra } } - if p.tracesConsumer == nil { // True if p is a connector - return nil - } - return p.tracesConsumer.ConsumeTraces(ctx, td) + return nil } -func (p *serviceGraphProcessor) aggregateMetrics(ctx context.Context, td ptrace.Traces) (err error) { +func (p *serviceGraphConnector) aggregateMetrics(ctx context.Context, td ptrace.Traces) (err error) { var ( isNew bool totalDroppedSpans int @@ -344,7 +332,7 @@ func (p *serviceGraphProcessor) aggregateMetrics(ctx context.Context, td ptrace. return nil } -func (p *serviceGraphProcessor) upsertDimensions(kind string, m map[string]string, resourceAttr pcommon.Map, spanAttr pcommon.Map) { +func (p *serviceGraphConnector) upsertDimensions(kind string, m map[string]string, resourceAttr pcommon.Map, spanAttr pcommon.Map) { for _, dim := range p.config.Dimensions { if v, ok := findAttributeValue(dim, resourceAttr, spanAttr); ok { m[kind+"_"+dim] = v @@ -352,7 +340,7 @@ func (p *serviceGraphProcessor) upsertDimensions(kind string, m map[string]strin } } -func (p *serviceGraphProcessor) upsertPeerAttributes(m []string, peers map[string]string, spanAttr pcommon.Map) { +func (p *serviceGraphConnector) upsertPeerAttributes(m []string, peers map[string]string, spanAttr pcommon.Map) { for _, s := range m { if v, ok := findAttributeValue(s, spanAttr); ok { peers[s] = v @@ -361,7 +349,7 @@ func (p *serviceGraphProcessor) upsertPeerAttributes(m []string, peers map[strin } } -func (p *serviceGraphProcessor) onComplete(e *store.Edge) { +func (p *serviceGraphConnector) onComplete(e *store.Edge) { p.logger.Debug( "edge completed", zap.String("client_service", e.ClientService), @@ -372,7 +360,7 @@ func (p *serviceGraphProcessor) onComplete(e *store.Edge) { p.aggregateMetricsForEdge(e) } -func (p *serviceGraphProcessor) onExpire(e *store.Edge) { +func (p *serviceGraphConnector) onExpire(e *store.Edge) { p.logger.Debug( "edge expired", zap.String("client_service", e.ClientService), @@ -397,7 +385,7 @@ func (p *serviceGraphProcessor) onExpire(e *store.Edge) { } } -func (p *serviceGraphProcessor) aggregateMetricsForEdge(e *store.Edge) { +func (p *serviceGraphConnector) aggregateMetricsForEdge(e *store.Edge) { metricKey := p.buildMetricKey(e.ClientService, e.ServerService, string(e.ConnectionType), e.Dimensions) dimensions := buildDimensions(e) @@ -411,7 +399,7 @@ func (p *serviceGraphProcessor) aggregateMetricsForEdge(e *store.Edge) { p.updateDurationMetrics(metricKey, e.ServerLatencySec, e.ClientLatencySec) } -func (p *serviceGraphProcessor) updateSeries(key string, dimensions pcommon.Map) { +func (p *serviceGraphConnector) updateSeries(key string, dimensions pcommon.Map) { p.metricMutex.Lock() defer p.metricMutex.Unlock() // Overwrite the series if it already exists @@ -421,7 +409,7 @@ func (p *serviceGraphProcessor) updateSeries(key string, dimensions pcommon.Map) } } -func (p *serviceGraphProcessor) dimensionsForSeries(key string) (pcommon.Map, bool) { +func (p *serviceGraphConnector) dimensionsForSeries(key string) (pcommon.Map, bool) { p.metricMutex.RLock() defer p.metricMutex.RUnlock() if series, ok := p.keyToMetric[key]; ok { @@ -431,16 +419,16 @@ func (p *serviceGraphProcessor) dimensionsForSeries(key string) (pcommon.Map, bo return pcommon.Map{}, false } -func (p *serviceGraphProcessor) updateCountMetrics(key string) { p.reqTotal[key]++ } +func (p *serviceGraphConnector) updateCountMetrics(key string) { p.reqTotal[key]++ } -func (p *serviceGraphProcessor) updateErrorMetrics(key string) { p.reqFailedTotal[key]++ } +func (p *serviceGraphConnector) updateErrorMetrics(key string) { p.reqFailedTotal[key]++ } -func (p *serviceGraphProcessor) updateDurationMetrics(key string, serverDuration, clientDuration float64) { +func (p *serviceGraphConnector) updateDurationMetrics(key string, serverDuration, clientDuration float64) { p.updateServerDurationMetrics(key, serverDuration) p.updateClientDurationMetrics(key, clientDuration) } -func (p *serviceGraphProcessor) updateServerDurationMetrics(key string, duration float64) { +func (p *serviceGraphConnector) updateServerDurationMetrics(key string, duration float64) { index := sort.SearchFloat64s(p.reqDurationBounds, duration) // Search bucket index if _, ok := p.reqServerDurationSecondsBucketCounts[key]; !ok { p.reqServerDurationSecondsBucketCounts[key] = make([]uint64, len(p.reqDurationBounds)+1) @@ -450,7 +438,7 @@ func (p *serviceGraphProcessor) updateServerDurationMetrics(key string, duration p.reqServerDurationSecondsBucketCounts[key][index]++ } -func (p *serviceGraphProcessor) updateClientDurationMetrics(key string, duration float64) { +func (p *serviceGraphConnector) updateClientDurationMetrics(key string, duration float64) { index := sort.SearchFloat64s(p.reqDurationBounds, duration) // Search bucket index if _, ok := p.reqClientDurationSecondsBucketCounts[key]; !ok { p.reqClientDurationSecondsBucketCounts[key] = make([]uint64, len(p.reqDurationBounds)+1) @@ -472,7 +460,7 @@ func buildDimensions(e *store.Edge) pcommon.Map { return dims } -func (p *serviceGraphProcessor) buildMetrics() (pmetric.Metrics, error) { +func (p *serviceGraphConnector) buildMetrics() (pmetric.Metrics, error) { m := pmetric.NewMetrics() ilm := m.ResourceMetrics().AppendEmpty().ScopeMetrics().AppendEmpty() ilm.Scope().SetName("traces_service_graph") @@ -492,7 +480,7 @@ func (p *serviceGraphProcessor) buildMetrics() (pmetric.Metrics, error) { return m, nil } -func (p *serviceGraphProcessor) collectCountMetrics(ilm pmetric.ScopeMetrics) error { +func (p *serviceGraphConnector) collectCountMetrics(ilm pmetric.ScopeMetrics) error { for key, c := range p.reqTotal { mCount := ilm.Metrics().AppendEmpty() mCount.SetName("traces_service_graph_request_total") @@ -536,7 +524,7 @@ func (p *serviceGraphProcessor) collectCountMetrics(ilm pmetric.ScopeMetrics) er return nil } -func (p *serviceGraphProcessor) collectLatencyMetrics(ilm pmetric.ScopeMetrics) error { +func (p *serviceGraphConnector) collectLatencyMetrics(ilm pmetric.ScopeMetrics) error { // TODO: Remove this once legacy metric names are removed if legacyMetricNamesFeatureGate.IsEnabled() { return p.collectServerLatencyMetrics(ilm, "traces_service_graph_request_duration_seconds") @@ -549,7 +537,7 @@ func (p *serviceGraphProcessor) collectLatencyMetrics(ilm pmetric.ScopeMetrics) return p.collectClientLatencyMetrics(ilm) } -func (p *serviceGraphProcessor) collectClientLatencyMetrics(ilm pmetric.ScopeMetrics) error { +func (p *serviceGraphConnector) collectClientLatencyMetrics(ilm pmetric.ScopeMetrics) error { for key := range p.reqServerDurationSecondsCount { mDuration := ilm.Metrics().AppendEmpty() mDuration.SetName("traces_service_graph_request_client_seconds") @@ -577,7 +565,7 @@ func (p *serviceGraphProcessor) collectClientLatencyMetrics(ilm pmetric.ScopeMet return nil } -func (p *serviceGraphProcessor) collectServerLatencyMetrics(ilm pmetric.ScopeMetrics, mName string) error { +func (p *serviceGraphConnector) collectServerLatencyMetrics(ilm pmetric.ScopeMetrics, mName string) error { for key := range p.reqServerDurationSecondsCount { mDuration := ilm.Metrics().AppendEmpty() mDuration.SetName(mName) @@ -605,7 +593,7 @@ func (p *serviceGraphProcessor) collectServerLatencyMetrics(ilm pmetric.ScopeMet return nil } -func (p *serviceGraphProcessor) buildMetricKey(clientName, serverName, connectionType string, edgeDimensions map[string]string) string { +func (p *serviceGraphConnector) buildMetricKey(clientName, serverName, connectionType string, edgeDimensions map[string]string) string { var metricKey strings.Builder metricKey.WriteString(clientName + metricKeySeparator + serverName + metricKeySeparator + connectionType) @@ -621,7 +609,7 @@ func (p *serviceGraphProcessor) buildMetricKey(clientName, serverName, connectio } // storeExpirationLoop periodically expires old entries from the store. -func (p *serviceGraphProcessor) storeExpirationLoop(d time.Duration) { +func (p *serviceGraphConnector) storeExpirationLoop(d time.Duration) { t := time.NewTicker(d) for { select { @@ -633,7 +621,7 @@ func (p *serviceGraphProcessor) storeExpirationLoop(d time.Duration) { } } -func (p *serviceGraphProcessor) getPeerHost(m []string, peers map[string]string) string { +func (p *serviceGraphConnector) getPeerHost(m []string, peers map[string]string) string { peerStr := "unknown" for _, s := range m { if peer, ok := peers[s]; ok { @@ -645,7 +633,7 @@ func (p *serviceGraphProcessor) getPeerHost(m []string, peers map[string]string) } // cacheLoop periodically cleans the cache -func (p *serviceGraphProcessor) cacheLoop(d time.Duration) { +func (p *serviceGraphConnector) cacheLoop(d time.Duration) { t := time.NewTicker(d) for { select { @@ -659,7 +647,7 @@ func (p *serviceGraphProcessor) cacheLoop(d time.Duration) { } // cleanCache removes series that have not been updated in 15 minutes -func (p *serviceGraphProcessor) cleanCache() { +func (p *serviceGraphConnector) cleanCache() { var staleSeries []string p.metricMutex.RLock() for key, series := range p.keyToMetric { diff --git a/processor/servicegraphprocessor/processor_test.go b/connector/servicegraphconnector/connector_test.go similarity index 52% rename from processor/servicegraphprocessor/processor_test.go rename to connector/servicegraphconnector/connector_test.go index 8057519080fb..eb52d940935c 100644 --- a/processor/servicegraphprocessor/processor_test.go +++ b/connector/servicegraphconnector/connector_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package servicegraphprocessor +package servicegraphconnector import ( "context" @@ -14,19 +14,14 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/exporter" - "go.opentelemetry.io/collector/exporter/exportertest" - "go.opentelemetry.io/collector/exporter/otlpexporter" - "go.opentelemetry.io/collector/featuregate" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/ptrace" - "go.opentelemetry.io/collector/processor/processortest" semconv "go.opentelemetry.io/collector/semconv/v1.13.0" sdkmetric "go.opentelemetry.io/otel/sdk/metric" "go.opentelemetry.io/otel/sdk/metric/metricdata" @@ -34,54 +29,9 @@ import ( "go.uber.org/zap/zaptest" ) -func TestProcessorStart(t *testing.T) { - // Create otlp exporters. - otlpID, mexp, texp := newOTLPExporters(t) - - for _, tc := range []struct { - name string - exporter component.Component - metricsExporter string - wantErrorMsg string - }{ - {"export to active otlp metrics exporter", mexp, "otlp", ""}, - {"unable to find configured exporter in active exporter list", mexp, "prometheus", "failed to find metrics exporter: 'prometheus'; please configure metrics_exporter from one of: [otlp]"}, - {"export to active otlp traces exporter should error", texp, "otlp", "the exporter \"otlp\" isn't a metrics exporter"}, - } { - t.Run(tc.name, func(t *testing.T) { - // Prepare - exporters := map[component.DataType]map[component.ID]component.Component{ - component.DataTypeMetrics: { - otlpID: tc.exporter, - }, - } - - // Create servicegraph processor - factory := NewFactory() - cfg := factory.CreateDefaultConfig().(*Config) - cfg.MetricsExporter = tc.metricsExporter - - procCreationParams := processortest.NewNopCreateSettings() - traceProcessor, err := factory.CreateTracesProcessor(context.Background(), procCreationParams, cfg, consumertest.NewNop()) - require.NoError(t, err) - - // Test - smp := traceProcessor.(*serviceGraphProcessor) - err = smp.Start(context.Background(), newMockHost(exporters)) - - // Verify - if tc.wantErrorMsg != "" { - assert.Error(t, err) - } else { - assert.NoError(t, err) - } - }) - } -} - func TestConnectorStart(t *testing.T) { // Create servicegraph processor - factory := NewConnectorFactoryFunc("servicegraph", component.StabilityLevelAlpha) + factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) procCreationParams := connectortest.NewNopCreateSettings() @@ -89,25 +39,9 @@ func TestConnectorStart(t *testing.T) { require.NoError(t, err) // Test - smp := traceProcessor.(*serviceGraphProcessor) + smp := traceProcessor.(*serviceGraphConnector) err = smp.Start(context.Background(), componenttest.NewNopHost()) - - // Verify - assert.NoError(t, err) -} - -func TestProcessorShutdown(t *testing.T) { - // Prepare - factory := NewFactory() - cfg := factory.CreateDefaultConfig().(*Config) - - // Test - next := new(consumertest.TracesSink) - set := componenttest.NewNopTelemetrySettings() - set.Logger = zaptest.NewLogger(t) - p := newProcessor(set, cfg) - p.tracesConsumer = next - err := p.Shutdown(context.Background()) + defer require.NoError(t, smp.Shutdown(context.Background())) // Verify assert.NoError(t, err) @@ -115,14 +49,14 @@ func TestProcessorShutdown(t *testing.T) { func TestConnectorShutdown(t *testing.T) { // Prepare - factory := NewConnectorFactoryFunc("servicegraph", component.StabilityLevelAlpha) + factory := NewFactory() cfg := factory.CreateDefaultConfig().(*Config) // Test next := new(consumertest.MetricsSink) set := componenttest.NewNopTelemetrySettings() set.Logger = zaptest.NewLogger(t) - p := newProcessor(set, cfg) + p := newConnector(set, cfg) p.metricsConsumer = next err := p.Shutdown(context.Background()) @@ -130,138 +64,6 @@ func TestConnectorShutdown(t *testing.T) { assert.NoError(t, err) } -func TestProcessorConsume(t *testing.T) { - for _, tc := range []struct { - name string - cfg *Config - gates []*featuregate.Gate - sampleTraces ptrace.Traces - verifyMetrics func(t *testing.T, md pmetric.Metrics) - }{ - { - name: "traces with client and server span", - cfg: &Config{ - MetricsExporter: "mock", - Dimensions: []string{"some-attribute", "non-existing-attribute"}, - Store: StoreConfig{ - MaxItems: 10, - TTL: time.Nanosecond, - }, - }, - sampleTraces: buildSampleTrace(t, "val"), - verifyMetrics: verifyHappyCaseMetrics, - }, - { - name: "incomplete traces with virtual server span", - cfg: &Config{ - MetricsExporter: "mock", - Dimensions: []string{"some-attribute", "non-existing-attribute"}, - Store: StoreConfig{ - MaxItems: 10, - TTL: time.Nanosecond, - }, - }, - gates: []*featuregate.Gate{virtualNodeFeatureGate}, - sampleTraces: incompleteClientTraces(), - verifyMetrics: func(t *testing.T, md pmetric.Metrics) { - v, ok := md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Sum().DataPoints().At(0).Attributes().Get("server") - assert.True(t, ok) - assert.Equal(t, "127.10.10.1", v.Str()) - }, - }, - { - name: "incomplete traces with virtual client span", - cfg: &Config{ - MetricsExporter: "mock", - Dimensions: []string{"some-attribute", "non-existing-attribute"}, - Store: StoreConfig{ - MaxItems: 10, - TTL: time.Nanosecond, - }, - }, - gates: []*featuregate.Gate{virtualNodeFeatureGate}, - sampleTraces: incompleteServerTraces(false), - verifyMetrics: func(t *testing.T, md pmetric.Metrics) { - v, ok := md.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0).Sum().DataPoints().At(0).Attributes().Get("client") - assert.True(t, ok) - assert.Equal(t, "user", v.Str()) - }, - }, - { - name: "incomplete traces with client span lost", - cfg: &Config{ - MetricsExporter: "mock", - Dimensions: []string{"some-attribute", "non-existing-attribute"}, - Store: StoreConfig{ - MaxItems: 10, - TTL: time.Nanosecond, - }, - }, - gates: []*featuregate.Gate{virtualNodeFeatureGate}, - sampleTraces: incompleteServerTraces(true), - verifyMetrics: func(t *testing.T, md pmetric.Metrics) { - assert.Equal(t, 0, md.MetricCount()) - }, - }, - { - name: "complete traces with legacy latency metrics", - cfg: &Config{ - MetricsExporter: "mock", - Dimensions: []string{"some-attribute", "non-existing-attribute"}, - Store: StoreConfig{ - MaxItems: 10, - TTL: time.Nanosecond, - }, - }, sampleTraces: buildSampleTrace(t, "val"), - gates: []*featuregate.Gate{virtualNodeFeatureGate, legacyLatencyUnitMsFeatureGate}, - verifyMetrics: verifyHappyCaseMetricsWithDuration(1000), - }, - } { - t.Run(tc.name, func(t *testing.T) { - // Set feature gates - for _, gate := range tc.gates { - require.NoError(t, featuregate.GlobalRegistry().Set(gate.ID(), true)) - } - - // Prepare - set := componenttest.NewNopTelemetrySettings() - set.Logger = zaptest.NewLogger(t) - p := newProcessor(set, tc.cfg) - p.tracesConsumer = consumertest.NewNop() - - metricsExporter := newMockMetricsExporter() - - mHost := newMockHost(map[component.DataType]map[component.ID]component.Component{ - component.DataTypeMetrics: { - component.NewID("mock"): metricsExporter, - }, - }) - - // Start processor - assert.NoError(t, p.Start(context.Background(), mHost)) - - // Test & verify - // The assertion is part of verifyHappyCaseMetrics func. - assert.NoError(t, p.ConsumeTraces(context.Background(), tc.sampleTraces)) - time.Sleep(time.Second * 2) - - // Force collection - p.store.Expire() - md, err := p.buildMetrics() - assert.NoError(t, err) - tc.verifyMetrics(t, md) - - // Shutdown the processor - assert.NoError(t, p.Shutdown(context.Background())) - - // Unset feature gates - for _, gate := range tc.gates { - require.NoError(t, featuregate.GlobalRegistry().Set(gate.ID(), false)) - } - }) - } -} - func TestConnectorConsume(t *testing.T) { // Prepare cfg := &Config{ @@ -271,7 +73,7 @@ func TestConnectorConsume(t *testing.T) { set := componenttest.NewNopTelemetrySettings() set.Logger = zaptest.NewLogger(t) - conn := newProcessor(set, cfg) + conn := newConnector(set, cfg) conn.metricsConsumer = newMockMetricsExporter() assert.NoError(t, conn.Start(context.Background(), componenttest.NewNopHost())) @@ -291,45 +93,6 @@ func TestConnectorConsume(t *testing.T) { assert.NoError(t, conn.Shutdown(context.Background())) } -func TestProcessor_MetricsFlushInterval(t *testing.T) { - // Prepare - set := componenttest.NewNopTelemetrySettings() - set.Logger = zaptest.NewLogger(t) - p := newProcessor(set, &Config{ - MetricsExporter: "mock", - Dimensions: []string{"some-attribute", "non-existing-attribute"}, - Store: StoreConfig{ - MaxItems: 10, - TTL: time.Nanosecond, - }, - MetricsFlushInterval: 2 * time.Second, - }) - p.tracesConsumer = consumertest.NewNop() - - metricsExporter := newMockMetricsExporter() - mHost := newMockHost(map[component.DataType]map[component.ID]component.Component{ - component.DataTypeMetrics: { - component.NewID("mock"): metricsExporter, - }, - }) - - // Start processor - assert.NoError(t, p.Start(context.Background(), mHost)) - - // Push traces - assert.NoError(t, p.ConsumeTraces(context.Background(), buildSampleTrace(t, "val"))) - - // Metrics are not immediately flushed - assert.Len(t, metricsExporter.getMetrics(), 0) - - // Metrics are flushed after 2 seconds - assert.Eventuallyf(t, func() bool { return len(metricsExporter.getMetrics()) == 1 }, 5*time.Second, 100*time.Millisecond, "metrics are not flushed") - verifyHappyCaseMetrics(t, metricsExporter.getMetrics()[0]) - - // Shutdown the processor - assert.NoError(t, p.Shutdown(context.Background())) -} - func verifyHappyCaseMetrics(t *testing.T, md pmetric.Metrics) { verifyHappyCaseMetricsWithDuration(1)(t, md) } @@ -448,69 +211,6 @@ func buildSampleTrace(t *testing.T, attrValue string) ptrace.Traces { return traces } -func incompleteClientTraces() ptrace.Traces { - tStart := time.Date(2022, 1, 2, 3, 4, 5, 6, time.UTC) - tEnd := time.Date(2022, 1, 2, 3, 4, 6, 6, time.UTC) - - traces := ptrace.NewTraces() - - resourceSpans := traces.ResourceSpans().AppendEmpty() - resourceSpans.Resource().Attributes().PutStr(semconv.AttributeServiceName, "some-client-service") - - scopeSpans := resourceSpans.ScopeSpans().AppendEmpty() - anotherTraceID := pcommon.TraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}) - anotherClientSpanID := pcommon.SpanID([8]byte{1, 2, 3, 4, 4, 3, 2, 1}) - clientSpanNoServerSpan := scopeSpans.Spans().AppendEmpty() - clientSpanNoServerSpan.SetName("client span") - clientSpanNoServerSpan.SetSpanID(anotherClientSpanID) - clientSpanNoServerSpan.SetTraceID(anotherTraceID) - clientSpanNoServerSpan.SetKind(ptrace.SpanKindClient) - clientSpanNoServerSpan.SetStartTimestamp(pcommon.NewTimestampFromTime(tStart)) - clientSpanNoServerSpan.SetEndTimestamp(pcommon.NewTimestampFromTime(tEnd)) - clientSpanNoServerSpan.Attributes().PutStr(semconv.AttributeNetSockPeerAddr, "127.10.10.1") // Attribute selected as dimension for metrics - - return traces -} - -func incompleteServerTraces(withParentSpan bool) ptrace.Traces { - tStart := time.Date(2022, 1, 2, 3, 4, 5, 6, time.UTC) - tEnd := time.Date(2022, 1, 2, 3, 4, 6, 6, time.UTC) - - traces := ptrace.NewTraces() - - resourceSpans := traces.ResourceSpans().AppendEmpty() - resourceSpans.Resource().Attributes().PutStr(semconv.AttributeServiceName, "some-server-service") - scopeSpans := resourceSpans.ScopeSpans().AppendEmpty() - anotherTraceID := pcommon.TraceID([16]byte{1, 2, 3, 4, 5, 6, 7, 8, 8, 7, 6, 5, 4, 3, 2, 1}) - serverSpanNoClientSpan := scopeSpans.Spans().AppendEmpty() - serverSpanNoClientSpan.SetName("server span") - serverSpanNoClientSpan.SetSpanID([8]byte{0x19, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26}) - if withParentSpan { - serverSpanNoClientSpan.SetParentSpanID([8]byte{0x27, 0x28, 0x29, 0x30, 0x31, 0x32, 0x33, 0x34}) - } - serverSpanNoClientSpan.SetTraceID(anotherTraceID) - serverSpanNoClientSpan.SetKind(ptrace.SpanKindServer) - serverSpanNoClientSpan.SetStartTimestamp(pcommon.NewTimestampFromTime(tStart)) - serverSpanNoClientSpan.SetEndTimestamp(pcommon.NewTimestampFromTime(tEnd)) - return traces -} - -func newOTLPExporters(t *testing.T) (component.ID, exporter.Metrics, exporter.Traces) { - otlpExpFactory := otlpexporter.NewFactory() - otlpID := component.NewID("otlp") - otlpConfig := &otlpexporter.Config{ - GRPCClientSettings: configgrpc.GRPCClientSettings{ - Endpoint: "example.com:1234", - }, - } - expCreationParams := exportertest.NewNopCreateSettings() - mexp, err := otlpExpFactory.CreateMetricsExporter(context.Background(), expCreationParams, otlpConfig) - require.NoError(t, err) - texp, err := otlpExpFactory.CreateTracesExporter(context.Background(), expCreationParams, otlpConfig) - require.NoError(t, err) - return otlpID, mexp, texp -} - type mockHost struct { component.Host exps map[component.DataType]map[component.ID]component.Component @@ -551,14 +251,8 @@ func (m *mockMetricsExporter) ConsumeMetrics(_ context.Context, md pmetric.Metri return nil } -func (m *mockMetricsExporter) getMetrics() []pmetric.Metrics { - m.mtx.Lock() - defer m.mtx.Unlock() - return m.md -} - func TestUpdateDurationMetrics(t *testing.T) { - p := serviceGraphProcessor{ + p := serviceGraphConnector{ reqTotal: make(map[string]int64), reqFailedTotal: make(map[string]int64), reqServerDurationSecondsSum: make(map[string]float64), @@ -615,8 +309,7 @@ func TestStaleSeriesCleanup(t *testing.T) { set := componenttest.NewNopTelemetrySettings() set.Logger = zaptest.NewLogger(t) - p := newProcessor(set, cfg) - p.tracesConsumer = consumertest.NewNop() + p := newConnector(set, cfg) mHost := newMockHost(map[component.DataType]map[component.ID]component.Component{ component.DataTypeMetrics: { @@ -668,8 +361,7 @@ func TestValidateOwnTelemetry(t *testing.T) { reader := sdkmetric.NewManualReader() set := setupTelemetry(reader) - p := newProcessor(set, cfg) - p.tracesConsumer = consumertest.NewNop() + p := newConnector(set, cfg) mHost := newMockHost(map[component.DataType]map[component.ID]component.Component{ component.DataTypeMetrics: { diff --git a/connector/servicegraphconnector/factory.go b/connector/servicegraphconnector/factory.go index 1e8f3ff8a87e..4b720af11ba6 100644 --- a/connector/servicegraphconnector/factory.go +++ b/connector/servicegraphconnector/factory.go @@ -6,13 +6,73 @@ package servicegraphconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector" import ( + "context" + "time" + + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/connector" + "go.opentelemetry.io/collector/consumer" + "go.opentelemetry.io/collector/featuregate" "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector/internal/metadata" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor" ) +const ( + // The value of "type" key in configuration. + typeStr = "servicegraph" + // The stability level of the processor. + connectorStability = component.StabilityLevelDevelopment + virtualNodeFeatureGateID = "connector.servicegraph.virtualNode" + legacyLatencyMetricNamesFeatureGateID = "connector.servicegraph.legacyLatencyMetricNames" + legacyLatencyUnitMs = "connector.servicegraph.legacyLatencyUnitMs" +) + +var virtualNodeFeatureGate, legacyMetricNamesFeatureGate, legacyLatencyUnitMsFeatureGate *featuregate.Gate + +func init() { + virtualNodeFeatureGate = featuregate.GlobalRegistry().MustRegister( + virtualNodeFeatureGateID, + featuregate.StageAlpha, + featuregate.WithRegisterDescription("When enabled, when the edge expires, processor checks if it has peer attributes(`db.name, net.sock.peer.addr, net.peer.name, rpc.service, http.url, http.target`), and then aggregate the metrics with virtual node."), + featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/17196"), + ) + // TODO: Remove this feature gate when the legacy metric names are removed. + legacyMetricNamesFeatureGate = featuregate.GlobalRegistry().MustRegister( + legacyLatencyMetricNamesFeatureGateID, + featuregate.StageAlpha, // Alpha because we want it disabled by default. + featuregate.WithRegisterDescription("When enabled, processor uses legacy latency metric names."), + featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/18743,https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16578"), + ) + legacyLatencyUnitMsFeatureGate = featuregate.GlobalRegistry().MustRegister( + legacyLatencyUnitMs, + featuregate.StageAlpha, // Alpha because we want it disabled by default. + featuregate.WithRegisterDescription("When enabled, processor reports latency in milliseconds, instead of seconds."), + featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27488"), + ) +} + // NewFactory returns a ConnectorFactory. func NewFactory() connector.Factory { - return servicegraphprocessor.NewConnectorFactoryFunc(metadata.Type, metadata.TracesToMetricsStability) + return connector.NewFactory( + typeStr, + createDefaultConfig, + connector.WithTracesToMetrics(createTracesToMetricsConnector, metadata.TracesToMetricsStability), + ) +} + +func createDefaultConfig() component.Config { + return &Config{ + Store: StoreConfig{ + TTL: 2 * time.Second, + MaxItems: 1000, + }, + CacheLoop: time.Minute, + StoreExpirationLoop: 2 * time.Second, + } +} + +func createTracesToMetricsConnector(_ context.Context, params connector.CreateSettings, cfg component.Config, nextConsumer consumer.Metrics) (connector.Traces, error) { + c := newConnector(params.TelemetrySettings, cfg) + c.metricsConsumer = nextConsumer + return c, nil } diff --git a/connector/servicegraphconnector/factory_test.go b/connector/servicegraphconnector/factory_test.go index 44e83a7aa555..f8dd64bd766d 100644 --- a/connector/servicegraphconnector/factory_test.go +++ b/connector/servicegraphconnector/factory_test.go @@ -6,23 +6,51 @@ package servicegraphconnector // import "github.com/open-telemetry/opentelemetry import ( "context" "testing" + "time" "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/connector/connectortest" "go.opentelemetry.io/collector/consumer/consumertest" - - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor" ) -func TestNewFactory(t *testing.T) { - factory := NewFactory() - conn, err := factory.CreateTracesToMetrics( - context.Background(), - connectortest.NewNopCreateSettings(), - &servicegraphprocessor.Config{}, - consumertest.NewNop(), - ) - - assert.NoError(t, err) - assert.NotNil(t, conn) +func TestNewConnector(t *testing.T) { + for _, tc := range []struct { + name string + latencyHistogramBuckets []time.Duration + expectedLatencyHistogramBuckets []float64 + }{ + { + name: "simplest config (use defaults)", + expectedLatencyHistogramBuckets: defaultLatencyHistogramBuckets, + }, + { + name: "latency histogram configured with catch-all bucket to check no additional catch-all bucket inserted", + latencyHistogramBuckets: []time.Duration{2 * time.Millisecond}, + expectedLatencyHistogramBuckets: []float64{0.002}, + }, + { + name: "full config with no catch-all bucket and check the catch-all bucket is inserted", + latencyHistogramBuckets: []time.Duration{2 * time.Millisecond}, + expectedLatencyHistogramBuckets: []float64{0.002}, + }, + } { + t.Run(tc.name, func(t *testing.T) { + // Prepare + factory := NewFactory() + + creationParams := connectortest.NewNopCreateSettings() + cfg := factory.CreateDefaultConfig().(*Config) + cfg.LatencyHistogramBuckets = tc.latencyHistogramBuckets + + // Test + conn, err := factory.CreateTracesToMetrics(context.Background(), creationParams, cfg, consumertest.NewNop()) + smc := conn.(*serviceGraphConnector) + + // Verify + assert.NoError(t, err) + assert.NotNil(t, smc) + + assert.Equal(t, tc.expectedLatencyHistogramBuckets, smc.reqDurationBounds) + }) + } } diff --git a/connector/servicegraphconnector/go.mod b/connector/servicegraphconnector/go.mod index b4e4d0cfd3d4..779720c674b3 100644 --- a/connector/servicegraphconnector/go.mod +++ b/connector/servicegraphconnector/go.mod @@ -3,56 +3,88 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/connector/servi go 1.18 require ( - github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor v0.93.0 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f + go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f go.opentelemetry.io/collector/connector v0.93.1-0.20240130182548-89388addcc7f go.opentelemetry.io/collector/consumer v0.93.1-0.20240130182548-89388addcc7f + go.opentelemetry.io/collector/exporter v0.93.1-0.20240130182548-89388addcc7f + go.opentelemetry.io/collector/featuregate v1.0.2-0.20240130181942-9c7177496fd5 + go.opentelemetry.io/collector/otelcol v0.93.1-0.20240130182548-89388addcc7f + go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5 + go.opentelemetry.io/collector/processor v0.93.1-0.20240130182548-89388addcc7f + go.opentelemetry.io/collector/semconv v0.93.1-0.20240130182548-89388addcc7f go.opentelemetry.io/otel/metric v1.22.0 + go.opentelemetry.io/otel/sdk/metric v1.22.0 go.opentelemetry.io/otel/trace v1.22.0 go.uber.org/goleak v1.3.0 + go.uber.org/zap v1.26.0 ) require ( github.com/beorn7/perks v1.0.1 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-ole/go-ole v1.2.6 // 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.3 // indirect + github.com/google/uuid v1.5.0 // indirect + github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect github.com/hashicorp/go-version v1.6.0 // indirect + github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/json-iterator/go v1.1.12 // indirect github.com/knadh/koanf/maps v0.1.1 // indirect github.com/knadh/koanf/providers/confmap v0.1.0 // indirect github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // 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 + github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect github.com/prometheus/client_golang v1.18.0 // indirect github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.46.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect + github.com/shirou/gopsutil/v3 v3.23.12 // indirect + github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/spf13/cobra v1.8.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/tklauser/go-sysconf v0.3.12 // indirect + github.com/tklauser/numcpus v0.6.1 // indirect + github.com/yusufpapurcu/wmi v1.2.3 // indirect + go.opencensus.io v0.24.0 // indirect go.opentelemetry.io/collector v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/exporter v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/featuregate v1.0.2-0.20240130181942-9c7177496fd5 // indirect - go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5 // indirect - go.opentelemetry.io/collector/processor v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/semconv v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/extension v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/receiver v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/service v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/contrib/config v0.2.0 // indirect + go.opentelemetry.io/contrib/propagators/b3 v1.22.0 // indirect go.opentelemetry.io/otel v1.22.0 // indirect + go.opentelemetry.io/otel/bridge/opencensus v0.45.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.45.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.45.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 // indirect go.opentelemetry.io/otel/exporters/prometheus v0.45.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.45.0 // indirect + go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.22.0 // indirect go.opentelemetry.io/otel/sdk v1.22.0 // indirect - go.opentelemetry.io/otel/sdk/metric v1.22.0 // indirect + go.opentelemetry.io/proto/otlp v1.0.0 // indirect go.uber.org/multierr v1.11.0 // indirect - go.uber.org/zap v1.26.0 // indirect golang.org/x/net v0.20.0 // indirect golang.org/x/sys v0.16.0 // indirect golang.org/x/text v0.14.0 // indirect + gonum.org/v1/gonum v0.14.0 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect google.golang.org/grpc v1.61.0 // indirect google.golang.org/protobuf v1.32.0 // indirect @@ -64,13 +96,3 @@ retract ( v0.76.1 v0.65.0 ) - -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor => ../../processor/servicegraphprocessor/ - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../pkg/golden - -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../../pkg/pdatautil diff --git a/connector/servicegraphconnector/go.sum b/connector/servicegraphconnector/go.sum index 5851d9d6064a..97ce507e9996 100644 --- a/connector/servicegraphconnector/go.sum +++ b/connector/servicegraphconnector/go.sum @@ -1,38 +1,73 @@ +cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 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/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +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/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 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/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= 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-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= +github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= 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/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/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +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.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +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.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.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= +github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 h1:6UKoz5ujsI55KNpsJH3UwCq3T8kKbZwNZBNPuTTje8U= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1/go.mod h1:YvJ2f6MplWDhfxiUC3KpyTy76kYUZA4W3pTv/wdKQ9Y= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= +github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= 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/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= @@ -42,6 +77,7 @@ github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLN github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= +github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= 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/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= @@ -53,47 +89,58 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w 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/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0bKXtz2Znl3GGI= 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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= +github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= +github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= +github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= +github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= +github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= 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.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= +github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= +github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= +github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/collector v0.93.1-0.20240130182548-89388addcc7f h1:NgQcLNPP/6YnIfNUkDkKu1uiRTXUa9kMtfpsKSVC4dY= go.opentelemetry.io/collector v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:rEqeAsOy8Mu6HA6oMjGk7NrTb7958XmShSaapxFEeTs= go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f h1:DNFOx9vwV7g+lWz9htP/Biiwwp+oFifR+J2zKnQKV3U= go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:jOHaBlhWt4aarDS6w9A9GcgGCxrtEg+8LnBK7Y/6zqo= -go.opentelemetry.io/collector/config/configauth v0.93.1-0.20240130182548-89388addcc7f h1:3kgTrMN+n+gTgz0t2g+HxKbosnXj3cbTWpKzm5iVrP4= -go.opentelemetry.io/collector/config/configcompression v0.93.1-0.20240130182548-89388addcc7f h1:FI5NTZ1premzy9eb8RlUeSPYzC99owa5C7WWfIuMmSM= -go.opentelemetry.io/collector/config/configgrpc v0.93.1-0.20240130182548-89388addcc7f h1:3uNi8JLUGrJAdYkfhjs1bnYg2gBVN/lbpMsrz6jprJs= -go.opentelemetry.io/collector/config/confignet v0.93.1-0.20240130182548-89388addcc7f h1:k+zyKnjQZIzbv4j2UI56DTUm8t2TCuG9EjWwug8K4pY= -go.opentelemetry.io/collector/config/configopaque v0.93.1-0.20240130182548-89388addcc7f h1:5wpcYp67vufdi7j6swWWu7K87yiHFoosO/KpuMZtNVA= -go.opentelemetry.io/collector/config/configretry v0.93.1-0.20240130182548-89388addcc7f h1:6n/g6GmXrwZfYfZoIRFLZn5yG9lv9YKaerzmYjLu3lk= +go.opentelemetry.io/collector/config/confignet v0.93.0 h1:UZ3ZGxbf0HBCNAIfxhfmVRal5gjDjocVed4NOs89hNo= +go.opentelemetry.io/collector/config/configretry v0.93.0 h1:32JKlZWkGgCLpc1X7rfug6l2zmt8Nz9D2FrwJOVGNx4= go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f h1:S1mp1jVnxg0tyy7uFEMHDFRqI4AiqqE/ia8RPj3SKW0= go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:2XLhyR/GVpWeZ2K044vCmrvH/d4Ewt0aD/y46avZyMU= -go.opentelemetry.io/collector/config/configtls v0.93.1-0.20240130182548-89388addcc7f h1:WjsQK6NCASD7Ht/6mdmweFcowBvWf/HiWJASkb4f9rw= -go.opentelemetry.io/collector/config/internal v0.93.1-0.20240130182548-89388addcc7f h1:uaN1LYmZkVWolEUVVVoD7xlKq+6hAaQ53CBbtB4OBGk= go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f h1:HIvqzK7ANxcVRhtJ/zUm+ZWGHlGo7TClqcaNMwQgzHs= go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:KjHrfxKKojaLDc9zDPfVuyp8765AH+XfcoPWMLMiuHU= go.opentelemetry.io/collector/connector v0.93.1-0.20240130182548-89388addcc7f h1:HPzKN+S6hTDdTcB6oxf4StM0EWRpO/uPgJyIaxBLiqQ= @@ -102,35 +149,48 @@ go.opentelemetry.io/collector/consumer v0.93.1-0.20240130182548-89388addcc7f h1: go.opentelemetry.io/collector/consumer v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:RhC4X/bSMIENk68hzFS9i6I7DVsZSfF/S7JvfaqZkkI= go.opentelemetry.io/collector/exporter v0.93.1-0.20240130182548-89388addcc7f h1:LxjUUxlAXcQQGQCjB3v+Rzef1M5IMRUdwX2tO82obSw= go.opentelemetry.io/collector/exporter v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:iqkIF8nB0FkKG2p0oIBLBwT8lQ/Ab4oZ3U9ca9tSoT8= -go.opentelemetry.io/collector/exporter/otlpexporter v0.93.1-0.20240130182548-89388addcc7f h1:+7NTThkyrKPATZ4uBAvU25l+w124nsSC0rg21q+uTL4= go.opentelemetry.io/collector/extension v0.93.1-0.20240130182548-89388addcc7f h1:cBHNixkZij3SmkQSoFLRbVOv7tqsQ9BNE3uSFjQaP30= -go.opentelemetry.io/collector/extension/auth v0.93.1-0.20240130182548-89388addcc7f h1:xwtN/kL5zyVROBmQ0kBiOL7pH0H+bVleCbGuB5uATfI= +go.opentelemetry.io/collector/extension v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:vT7HRXtE+5MLesDYDhIf/6cdkAaDCR3ikSlvH6PoA6A= +go.opentelemetry.io/collector/extension/zpagesextension v0.93.0 h1:cOTVR+8HlV5P8/ZNHxNtxcAUqw88InNjGuM8YL4KmnI= go.opentelemetry.io/collector/featuregate v1.0.2-0.20240130181942-9c7177496fd5 h1:ksQGFKtMhIeFKuAu5n0teItSFBCMJo1bF5q8YkE/4W4= go.opentelemetry.io/collector/featuregate v1.0.2-0.20240130181942-9c7177496fd5/go.mod h1:QQXjP4etmJQhkQ20j4P/rapWuItYxoFozg/iIwuKnYg= go.opentelemetry.io/collector/otelcol v0.93.1-0.20240130182548-89388addcc7f h1:mWiQ8XBU9W7dxtyWHctSqagycluK9y1pelfXrW8h+9M= +go.opentelemetry.io/collector/otelcol v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:AnAlOGt4q7G0JdU2fceI5vdC6D5omp0GO40wL0aMBak= go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5 h1:cMc7sJ29OzK5jZqr6XFzKxiJvlypR/zt2TDhPDqpBic= go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5/go.mod h1:IDkDj+B4Fp4wWOclBELN97zcb98HugJ8Q2gA4ZFsN8Q= go.opentelemetry.io/collector/processor v0.93.1-0.20240130182548-89388addcc7f h1:uxnhFSB9peafVvsAGVhbCF1hJudye5mg7Bz94b+LSaQ= go.opentelemetry.io/collector/processor v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:8RhlEB6SZyCTd60aviHxmjbUT2EQ40yXOq6Bea9TOkU= go.opentelemetry.io/collector/receiver v0.93.1-0.20240130182548-89388addcc7f h1:2C2QYMLF6YrRJPT/9LhRmfJ0wwF8nt4LjBblBCEJZtM= +go.opentelemetry.io/collector/receiver v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:bPAxjHDsXFJZKPAturS7Ar5DDY/HJz5sj73E72vSVqk= go.opentelemetry.io/collector/semconv v0.93.1-0.20240130182548-89388addcc7f h1:hmcWaQ+Lv9nFlYi08SNUlNXfzh7q/W8PAIPWH8XoSXQ= go.opentelemetry.io/collector/semconv v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:gZ0uzkXsN+J5NpiRcdp9xOhNGQDDui8Y62p15sKrlzo= go.opentelemetry.io/collector/service v0.93.1-0.20240130182548-89388addcc7f h1:z04ELDKEnY3O8FagzUv59/1OFr3IiwE9QPl8NeQUwlE= +go.opentelemetry.io/collector/service v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:qTiO7dWBfV6tH9fq59cparYQDmG22O+Go+GN69vYMfE= go.opentelemetry.io/contrib/config v0.2.0 h1:VRYXnoE2ug3QOtaKka4eV9OgHXMJ0q6ggFtx6s+Jvy0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= +go.opentelemetry.io/contrib/config v0.2.0/go.mod h1:iBfwdwpZBKsVXMOAWHyGS8//dcVNJORYnFm6VNqsOG8= go.opentelemetry.io/contrib/propagators/b3 v1.22.0 h1:Okbgv0pWHMQq+mF7H2o1mucJ5PvxKFq2c8cyqoXfeaQ= +go.opentelemetry.io/contrib/propagators/b3 v1.22.0/go.mod h1:N3z0ycFRhsVZ+tG/uavMxHvOvFE95QM6gwW1zSqT9dQ= +go.opentelemetry.io/contrib/zpages v0.47.0 h1:ekpdNa2wqOvAfwZIGDIIV02zmR+z08aWPt21KrPJnaU= go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= go.opentelemetry.io/otel/bridge/opencensus v0.45.0 h1:kEOlv9Exuv3J8GCf1nLMHfrTPGnZOuIkN8YlRM14TtQ= +go.opentelemetry.io/otel/bridge/opencensus v0.45.0/go.mod h1:tkVMJeFOr43+zzwbxtIWsNcCCDT7rI5/c9rhMfMIENg= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.45.0 h1:tfil6di0PoNV7FZdsCS7A5izZoVVQ7AuXtyekbOpG/I= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.45.0/go.mod h1:AKFZIEPOnqB00P63bTjOiah4ZTaRzl1TKwUWpZdYUHI= go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.45.0 h1:+RbSCde0ERway5FwKvXR3aRJIFeDu9rtwC6E7BC6uoM= +go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.45.0/go.mod h1:zcI8u2EJxbLPyoZ3SkVAAcQPgYb1TDRzW93xLFnsggU= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 h1:9M3+rhx7kZCIQQhQRYaZCdNu1V73tm4TvXs2ntl98C4= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0/go.mod h1:noq80iT8rrHP1SfybmPiRGc9dc5M8RPmGvtwo7Oo7tc= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 h1:H2JFgRcGiyHg7H7bwcwaQJYrNFqCqrbTQ8K4p1OvDu8= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0/go.mod h1:WfCWp1bGoYK8MeULtI15MmQVczfR+bFkk0DF3h06QmQ= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= go.opentelemetry.io/otel/exporters/prometheus v0.45.0 h1:BeIK2KGho0oCWa7LxEGSqfDZbs7Fpv/Viz+FS4P8CXE= go.opentelemetry.io/otel/exporters/prometheus v0.45.0/go.mod h1:UVJZPLnfDSvHj+eJuZE+E1GjIBD267mEMfAAHJdghWg= go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.45.0 h1:NjN6zc7Mwy9torqa3mo+pMJ3mHoPI0uzVSYcqB2t72A= +go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.45.0/go.mod h1:U+T5v2bk4fCC8XdSEWZja3Pm/ZhvV/zE7JwX/ELJKts= go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.22.0 h1:zr8ymM5OWWjjiWRzwTfZ67c905+2TMHYp2lMJ52QTyM= +go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.22.0/go.mod h1:sQs7FT2iLVJ+67vYngGJkPe1qr39IzaBzaj9IDNNY8k= go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= @@ -140,6 +200,7 @@ go.opentelemetry.io/otel/sdk/metric v1.22.0/go.mod h1:KjQGeMIDlBNEOo6HvjhxIec1p/ go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= +go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= @@ -149,20 +210,39 @@ go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= 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/exp v0.0.0-20230321023759-10a507213a29 h1:ooxPy7fPvB4kwsA2h+iBNHkAbp/4JxTSwCmvdjEYmug= +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/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/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-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-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.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +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-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/sys v0.0.0-20180830151530-49385e6e1522/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -170,6 +250,10 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 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-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -178,17 +262,41 @@ golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8T 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= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= +gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= +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-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f h1:Vn+VyHU5guc9KjB5KrjI2q0wCOWEOIh0OEsleqakHJg= google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= +google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE= google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= +google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= +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.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +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.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/processor/servicegraphprocessor/internal/store/edge.go b/connector/servicegraphconnector/internal/store/edge.go similarity index 96% rename from processor/servicegraphprocessor/internal/store/edge.go rename to connector/servicegraphconnector/internal/store/edge.go index a1cd307e0133..456a9b6d1f72 100644 --- a/processor/servicegraphprocessor/internal/store/edge.go +++ b/connector/servicegraphconnector/internal/store/edge.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package store // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor/internal/store" +package store // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector/internal/store" import ( "time" diff --git a/processor/servicegraphprocessor/internal/store/package_test.go b/connector/servicegraphconnector/internal/store/package_test.go similarity index 100% rename from processor/servicegraphprocessor/internal/store/package_test.go rename to connector/servicegraphconnector/internal/store/package_test.go diff --git a/processor/servicegraphprocessor/internal/store/store.go b/connector/servicegraphconnector/internal/store/store.go similarity index 97% rename from processor/servicegraphprocessor/internal/store/store.go rename to connector/servicegraphconnector/internal/store/store.go index 028116428b31..c2c4fee7a389 100644 --- a/processor/servicegraphprocessor/internal/store/store.go +++ b/connector/servicegraphconnector/internal/store/store.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package store // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor/internal/store" +package store // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector/internal/store" import ( "container/list" diff --git a/processor/servicegraphprocessor/internal/store/store_test.go b/connector/servicegraphconnector/internal/store/store_test.go similarity index 96% rename from processor/servicegraphprocessor/internal/store/store_test.go rename to connector/servicegraphconnector/internal/store/store_test.go index aae86b500486..df9f9acec943 100644 --- a/processor/servicegraphprocessor/internal/store/store_test.go +++ b/connector/servicegraphconnector/internal/store/store_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package store // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor/internal/store" +package store import ( "encoding/hex" diff --git a/connector/servicegraphconnector/package_test.go b/connector/servicegraphconnector/package_test.go index c48384c69e28..79216a2f631a 100644 --- a/connector/servicegraphconnector/package_test.go +++ b/connector/servicegraphconnector/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/servicegraphprocessor/testdata/service-graph-connector-config.yaml b/connector/servicegraphconnector/testdata/service-graph-connector-config.yaml similarity index 100% rename from processor/servicegraphprocessor/testdata/service-graph-connector-config.yaml rename to connector/servicegraphconnector/testdata/service-graph-connector-config.yaml diff --git a/processor/servicegraphprocessor/util.go b/connector/servicegraphconnector/util.go similarity index 80% rename from processor/servicegraphprocessor/util.go rename to connector/servicegraphconnector/util.go index b7f39899a732..fc447e9546de 100644 --- a/processor/servicegraphprocessor/util.go +++ b/connector/servicegraphconnector/util.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package servicegraphprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor" +package servicegraphconnector // import "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector" import ( "go.opentelemetry.io/collector/pdata/pcommon" diff --git a/connector/spanmetricsconnector/package_test.go b/connector/spanmetricsconnector/package_test.go index 2cd37a0f2a9c..f00ec737b5ed 100644 --- a/connector/spanmetricsconnector/package_test.go +++ b/connector/spanmetricsconnector/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/alertmanagerexporter/package_test.go b/exporter/alertmanagerexporter/package_test.go index 2bd557e6f50e..7b9d83eff120 100644 --- a/exporter/alertmanagerexporter/package_test.go +++ b/exporter/alertmanagerexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/awskinesisexporter/package_test.go b/exporter/awskinesisexporter/package_test.go index 2a9c0325fda5..fb24f8d2fb50 100644 --- a/exporter/awskinesisexporter/package_test.go +++ b/exporter/awskinesisexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/carbonexporter/package_test.go b/exporter/carbonexporter/package_test.go index e79ed5cbd0a6..0dcd0a5f369d 100644 --- a/exporter/carbonexporter/package_test.go +++ b/exporter/carbonexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/cassandraexporter/package_test.go b/exporter/cassandraexporter/package_test.go index 6a839cad85db..3ff28cf1d7cc 100644 --- a/exporter/cassandraexporter/package_test.go +++ b/exporter/cassandraexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/clickhouseexporter/package_test.go b/exporter/clickhouseexporter/package_test.go index d5e4a67421b0..29f6b7cbb77e 100644 --- a/exporter/clickhouseexporter/package_test.go +++ b/exporter/clickhouseexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/datadogexporter/go.mod b/exporter/datadogexporter/go.mod index 50b6da93caa2..77155da0524b 100644 --- a/exporter/datadogexporter/go.mod +++ b/exporter/datadogexporter/go.mod @@ -8,11 +8,11 @@ require ( github.com/DataDog/datadog-agent/pkg/trace v0.50.2 github.com/DataDog/datadog-api-client-go/v2 v2.21.0 github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 github.com/DataDog/sketches-go v1.4.4 github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.21.0 github.com/aws/aws-sdk-go v1.50.7 diff --git a/exporter/datadogexporter/go.sum b/exporter/datadogexporter/go.sum index c6009ff9a74f..5830e7dc9a92 100644 --- a/exporter/datadogexporter/go.sum +++ b/exporter/datadogexporter/go.sum @@ -90,17 +90,17 @@ github.com/DataDog/go-tuf v1.0.2-0.5.2 h1:EeZr937eKAWPxJ26IykAdWA4A0jQXJgkhUjqEI github.com/DataDog/go-tuf v1.0.2-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee h1:tXibLZk3G6HncIFJKaNItsdzcrk4YqILNDZlXPTNt4k= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee/go.mod h1:nTot/Iy0kW16bXgXr6blEc8gFeAS7vTqYlhAxh+dbc0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 h1:MwXEMqL/aThmkdLKSABXRb+/qoyCq5Z3+1IPPB6L/m0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1/go.mod h1:ODbHm4iVWmn16ruFXY7uMC0LNaZaGWHBqu0VR8efIsk= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.1 h1:0ugsTkWG1SrU8WR9sDGhOy4M/iqHY+w5Ali+jzMGetg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 h1:mOfJySl1BbvgVHgLsA1ouWHN2QKyd+xksy3hG2TeD68= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1/go.mod h1:NRv/hOlGq1LrJN1bbY7gJa4upTDTh5ZRW19U5w/wuNQ= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 h1:S9pLye2reYfPUOV4FXSkRvsDt6OwIGyGAIgXTNErhL4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1/go.mod h1:3luUUR9mBoHiMRh+PrWmySpXMOntTd/7fCl2UTu4Axg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 h1:z0QDSV9lQbTVoAnOkKiu7SWElWKPwpqGI7OE+OYNCIs= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1/go.mod h1:As+hEGB+/quKDMjxLtMKU9ucSsjrpdk1pXnMNqfwGoU= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 h1:nd3Zch8xtTALM3ObZ3jBwzbDFtARTN/QVoDCCWXubJE= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1/go.mod h1:xF6NyzghnEeQe9+9d8XiiOzxhDAdvOWOF8dR4dq5DqI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 h1:9xUPi4L6HwM9uB4rkKuoFGrpyCiv6Xm0NaBtkeCJhoI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2/go.mod h1:m4btyxCu5NuyxCL9iX4Sa3fNb5deCsVMSWIlF18tQ0E= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.2 h1:TGGnFPI160L3HGhCN7Y4lXNlH7mFj/uBYdVeQG6lIVo= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 h1:V5SoRFNeFdidAemhVTGO/zwtPNluN4ZrrqiFLuAT7Us= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2/go.mod h1:Z2FPxYhi8GIFkS4WLC7RrRaGolyB9TqS2RMSwNcmczk= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 h1:9eWdRXsKcFdVyyjg1AVrKhwLRL7/7Cp8nKG5QISwFKQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2/go.mod h1:1br0HgzhDIYcnVrx4dkkmRmdGrj/4iastO6TFcQkcbg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 h1:IkA9MI8nmY8gbRI9YLI7o7tKmjuTK1nU29cDqyi+sOg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2/go.mod h1:QLz5CEgTHJ91pLOcb2hL8P3+7AKMUIOfXJw2Sr4588o= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 h1:s06GkbYmWnG7WYmmxOTB0W+1BidVqZ/4oXvyoQmNovE= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2/go.mod h1:hKaXjBn+Y/KT6otuDA213Y0gtjlK0ylI8uuAho3LKKo= github.com/DataDog/sketches-go v1.4.4 h1:dF52vzXRFSPOj2IjXSWLvXq3jubL4CI69kwYjJ1w5Z8= github.com/DataDog/sketches-go v1.4.4/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= diff --git a/exporter/datadogexporter/integrationtest/go.mod b/exporter/datadogexporter/integrationtest/go.mod index 958538b09f7c..2b16619240b0 100644 --- a/exporter/datadogexporter/integrationtest/go.mod +++ b/exporter/datadogexporter/integrationtest/go.mod @@ -43,11 +43,11 @@ require ( github.com/DataDog/go-sqllexer v0.0.8 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 // indirect github.com/DataDog/sketches-go v1.4.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.21.0 // indirect diff --git a/exporter/datadogexporter/integrationtest/go.sum b/exporter/datadogexporter/integrationtest/go.sum index 57ca78b9b338..37e6c42bab7a 100644 --- a/exporter/datadogexporter/integrationtest/go.sum +++ b/exporter/datadogexporter/integrationtest/go.sum @@ -68,17 +68,17 @@ github.com/DataDog/go-tuf v1.0.2-0.5.2 h1:EeZr937eKAWPxJ26IykAdWA4A0jQXJgkhUjqEI github.com/DataDog/go-tuf v1.0.2-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee h1:tXibLZk3G6HncIFJKaNItsdzcrk4YqILNDZlXPTNt4k= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee/go.mod h1:nTot/Iy0kW16bXgXr6blEc8gFeAS7vTqYlhAxh+dbc0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 h1:MwXEMqL/aThmkdLKSABXRb+/qoyCq5Z3+1IPPB6L/m0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1/go.mod h1:ODbHm4iVWmn16ruFXY7uMC0LNaZaGWHBqu0VR8efIsk= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.1 h1:0ugsTkWG1SrU8WR9sDGhOy4M/iqHY+w5Ali+jzMGetg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 h1:mOfJySl1BbvgVHgLsA1ouWHN2QKyd+xksy3hG2TeD68= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1/go.mod h1:NRv/hOlGq1LrJN1bbY7gJa4upTDTh5ZRW19U5w/wuNQ= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 h1:S9pLye2reYfPUOV4FXSkRvsDt6OwIGyGAIgXTNErhL4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1/go.mod h1:3luUUR9mBoHiMRh+PrWmySpXMOntTd/7fCl2UTu4Axg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 h1:z0QDSV9lQbTVoAnOkKiu7SWElWKPwpqGI7OE+OYNCIs= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1/go.mod h1:As+hEGB+/quKDMjxLtMKU9ucSsjrpdk1pXnMNqfwGoU= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 h1:nd3Zch8xtTALM3ObZ3jBwzbDFtARTN/QVoDCCWXubJE= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1/go.mod h1:xF6NyzghnEeQe9+9d8XiiOzxhDAdvOWOF8dR4dq5DqI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 h1:9xUPi4L6HwM9uB4rkKuoFGrpyCiv6Xm0NaBtkeCJhoI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2/go.mod h1:m4btyxCu5NuyxCL9iX4Sa3fNb5deCsVMSWIlF18tQ0E= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.2 h1:TGGnFPI160L3HGhCN7Y4lXNlH7mFj/uBYdVeQG6lIVo= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 h1:V5SoRFNeFdidAemhVTGO/zwtPNluN4ZrrqiFLuAT7Us= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2/go.mod h1:Z2FPxYhi8GIFkS4WLC7RrRaGolyB9TqS2RMSwNcmczk= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 h1:9eWdRXsKcFdVyyjg1AVrKhwLRL7/7Cp8nKG5QISwFKQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2/go.mod h1:1br0HgzhDIYcnVrx4dkkmRmdGrj/4iastO6TFcQkcbg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 h1:IkA9MI8nmY8gbRI9YLI7o7tKmjuTK1nU29cDqyi+sOg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2/go.mod h1:QLz5CEgTHJ91pLOcb2hL8P3+7AKMUIOfXJw2Sr4588o= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 h1:s06GkbYmWnG7WYmmxOTB0W+1BidVqZ/4oXvyoQmNovE= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2/go.mod h1:hKaXjBn+Y/KT6otuDA213Y0gtjlK0ylI8uuAho3LKKo= github.com/DataDog/sketches-go v1.4.4 h1:dF52vzXRFSPOj2IjXSWLvXq3jubL4CI69kwYjJ1w5Z8= github.com/DataDog/sketches-go v1.4.4/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= diff --git a/exporter/datadogexporter/internal/clientutil/package_test.go b/exporter/datadogexporter/internal/clientutil/package_test.go index 7ce64c1071db..5f1943db73b8 100644 --- a/exporter/datadogexporter/internal/clientutil/package_test.go +++ b/exporter/datadogexporter/internal/clientutil/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/datadogexporter/internal/logs/package_test.go b/exporter/datadogexporter/internal/logs/package_test.go index 876917cfd627..1158f120b289 100644 --- a/exporter/datadogexporter/internal/logs/package_test.go +++ b/exporter/datadogexporter/internal/logs/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/dynatraceexporter/config/package_test.go b/exporter/dynatraceexporter/config/package_test.go index 55d65b377104..cac5be666ad9 100644 --- a/exporter/dynatraceexporter/config/package_test.go +++ b/exporter/dynatraceexporter/config/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/servicegraphprocessor/generated_component_test.go b/exporter/elasticsearchexporter/generated_component_test.go similarity index 70% rename from processor/servicegraphprocessor/generated_component_test.go rename to exporter/elasticsearchexporter/generated_component_test.go index d9ec6b5bca4f..ecd2594bfa0e 100644 --- a/processor/servicegraphprocessor/generated_component_test.go +++ b/exporter/elasticsearchexporter/generated_component_test.go @@ -1,6 +1,6 @@ // Code generated by mdatagen. DO NOT EDIT. -package servicegraphprocessor +package elasticsearchexporter import ( "context" @@ -10,9 +10,8 @@ import ( "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" - "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/processor" - "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/collector/exporter" + "go.opentelemetry.io/collector/exporter/exportertest" "go.opentelemetry.io/collector/confmap/confmaptest" @@ -32,13 +31,20 @@ func TestComponentLifecycle(t *testing.T) { tests := []struct { name string - createFn func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) + createFn func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) }{ + { + name: "logs", + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateLogsExporter(ctx, set, cfg) + }, + }, + { name: "traces", - createFn: func(ctx context.Context, set processor.CreateSettings, cfg component.Config) (component.Component, error) { - return factory.CreateTracesProcessor(ctx, set, cfg, consumertest.NewNop()) + createFn: func(ctx context.Context, set exporter.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateTracesExporter(ctx, set, cfg) }, }, } @@ -52,7 +58,7 @@ func TestComponentLifecycle(t *testing.T) { for _, test := range tests { t.Run(test.name+"-shutdown", func(t *testing.T) { - c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) require.NoError(t, err) err = c.Shutdown(context.Background()) require.NoError(t, err) @@ -60,29 +66,26 @@ func TestComponentLifecycle(t *testing.T) { t.Run(test.name+"-lifecycle", func(t *testing.T) { - // TODO support lifecycle - t.SkipNow() - - c, err := test.createFn(context.Background(), processortest.NewNopCreateSettings(), cfg) + c, err := test.createFn(context.Background(), exportertest.NewNopCreateSettings(), cfg) require.NoError(t, err) host := componenttest.NewNopHost() err = c.Start(context.Background(), host) require.NoError(t, err) require.NotPanics(t, func() { switch e := c.(type) { - case processor.Logs: + case exporter.Logs: logs := testdata.GenerateLogsManyLogRecordsSameResource(2) if !e.Capabilities().MutatesData { logs.MarkReadOnly() } err = e.ConsumeLogs(context.Background(), logs) - case processor.Metrics: + case exporter.Metrics: metrics := testdata.GenerateMetricsTwoMetrics() if !e.Capabilities().MutatesData { metrics.MarkReadOnly() } err = e.ConsumeMetrics(context.Background(), metrics) - case processor.Traces: + case exporter.Traces: traces := testdata.GenerateTracesTwoSpansSameResource() if !e.Capabilities().MutatesData { traces.MarkReadOnly() @@ -90,7 +93,9 @@ func TestComponentLifecycle(t *testing.T) { err = e.ConsumeTraces(context.Background(), traces) } }) + require.NoError(t, err) + err = c.Shutdown(context.Background()) require.NoError(t, err) }) diff --git a/exporter/elasticsearchexporter/metadata.yaml b/exporter/elasticsearchexporter/metadata.yaml index 345ac0dbd94b..2c3860fe24fd 100644 --- a/exporter/elasticsearchexporter/metadata.yaml +++ b/exporter/elasticsearchexporter/metadata.yaml @@ -7,3 +7,7 @@ status: distributions: [contrib, observiq] codeowners: active: [JaredTan95] + +tests: + config: + endpoints: [http://localhost:9200] \ No newline at end of file diff --git a/exporter/elasticsearchexporter/package_test.go b/exporter/elasticsearchexporter/package_test.go index 3e9c29f16a45..da727a30bfa0 100644 --- a/exporter/elasticsearchexporter/package_test.go +++ b/exporter/elasticsearchexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/honeycombmarkerexporter/package_test.go b/exporter/honeycombmarkerexporter/package_test.go index 8364228cf238..5682ee1c3253 100644 --- a/exporter/honeycombmarkerexporter/package_test.go +++ b/exporter/honeycombmarkerexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/instanaexporter/package_test.go b/exporter/instanaexporter/package_test.go index aa829e4ffc05..613af54e9fa2 100644 --- a/exporter/instanaexporter/package_test.go +++ b/exporter/instanaexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/logicmonitorexporter/internal/logs/package_test.go b/exporter/logicmonitorexporter/internal/logs/package_test.go index 876917cfd627..1158f120b289 100644 --- a/exporter/logicmonitorexporter/internal/logs/package_test.go +++ b/exporter/logicmonitorexporter/internal/logs/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/logicmonitorexporter/internal/traces/package_test.go b/exporter/logicmonitorexporter/internal/traces/package_test.go index 18082d4a36fb..d1398ba09b9b 100644 --- a/exporter/logicmonitorexporter/internal/traces/package_test.go +++ b/exporter/logicmonitorexporter/internal/traces/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/lokiexporter/package_test.go b/exporter/lokiexporter/package_test.go index bf81fa846c58..eba5a730e48e 100644 --- a/exporter/lokiexporter/package_test.go +++ b/exporter/lokiexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/mezmoexporter/package_test.go b/exporter/mezmoexporter/package_test.go index 822487e62ac3..e768b14cb712 100644 --- a/exporter/mezmoexporter/package_test.go +++ b/exporter/mezmoexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/opensearchexporter/package_test.go b/exporter/opensearchexporter/package_test.go index 27e01ce3c5bc..9b90d8760fdf 100644 --- a/exporter/opensearchexporter/package_test.go +++ b/exporter/opensearchexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/sentryexporter/package_test.go b/exporter/sentryexporter/package_test.go index 07410f926068..7ee7fa0393fa 100644 --- a/exporter/sentryexporter/package_test.go +++ b/exporter/sentryexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/signalfxexporter/internal/hostmetadata/package_test.go b/exporter/signalfxexporter/internal/hostmetadata/package_test.go index b070ed34dcda..3bc935fd715a 100644 --- a/exporter/signalfxexporter/internal/hostmetadata/package_test.go +++ b/exporter/signalfxexporter/internal/hostmetadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/splunkhecexporter/client_test.go b/exporter/splunkhecexporter/client_test.go index 843f6faf3b57..019743d64883 100644 --- a/exporter/splunkhecexporter/client_test.go +++ b/exporter/splunkhecexporter/client_test.go @@ -1394,8 +1394,10 @@ func TestHeartbeatStartupFailed(t *testing.T) { params := exportertest.NewNopCreateSettings() exporter, err := factory.CreateTracesExporter(context.Background(), params, cfg) assert.NoError(t, err) - // The exporter's name is "" while generating default params - assert.EqualError(t, exporter.Start(context.Background(), componenttest.NewNopHost()), ": heartbeat on startup failed: HTTP 403 \"Forbidden\"") + assert.EqualError(t, + exporter.Start(context.Background(), componenttest.NewNopHost()), + fmt.Sprintf("%s: heartbeat on startup failed: HTTP 403 \"Forbidden\"", params.ID.Type()), + ) } func TestHeartbeatStartupPass_Disabled(t *testing.T) { diff --git a/exporter/syslogexporter/package_test.go b/exporter/syslogexporter/package_test.go index ade8237aae10..70ac459041ec 100644 --- a/exporter/syslogexporter/package_test.go +++ b/exporter/syslogexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/exporter/zipkinexporter/package_test.go b/exporter/zipkinexporter/package_test.go index b4efceeb5601..5c3fa898c42c 100644 --- a/exporter/zipkinexporter/package_test.go +++ b/exporter/zipkinexporter/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/basicauthextension/package_test.go b/extension/basicauthextension/package_test.go index 97937372d2be..a36b3b9fe820 100644 --- a/extension/basicauthextension/package_test.go +++ b/extension/basicauthextension/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/encoding/jaegerencodingextension/package_test.go b/extension/encoding/jaegerencodingextension/package_test.go index 6143799a9050..46d492d1ec17 100644 --- a/extension/encoding/jaegerencodingextension/package_test.go +++ b/extension/encoding/jaegerencodingextension/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/encoding/jsonlogencodingextension/package_test.go b/extension/encoding/jsonlogencodingextension/package_test.go index 78b408fb3bab..77f361442507 100644 --- a/extension/encoding/jsonlogencodingextension/package_test.go +++ b/extension/encoding/jsonlogencodingextension/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/encoding/otlpencodingextension/package_test.go b/extension/encoding/otlpencodingextension/package_test.go index d2af8061f94e..00ac9884c61a 100644 --- a/extension/encoding/otlpencodingextension/package_test.go +++ b/extension/encoding/otlpencodingextension/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/encoding/textencodingextension/package_test.go b/extension/encoding/textencodingextension/package_test.go index 41d81f3106b2..63a324f4d837 100644 --- a/extension/encoding/textencodingextension/package_test.go +++ b/extension/encoding/textencodingextension/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/encoding/zipkinencodingextension/package_test.go b/extension/encoding/zipkinencodingextension/package_test.go index 9a28c1c5325f..af5ba928dcf1 100644 --- a/extension/encoding/zipkinencodingextension/package_test.go +++ b/extension/encoding/zipkinencodingextension/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/headerssetterextension/package_test.go b/extension/headerssetterextension/package_test.go index 7c6f912b33e3..5df914832567 100644 --- a/extension/headerssetterextension/package_test.go +++ b/extension/headerssetterextension/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/httpforwarder/package_test.go b/extension/httpforwarder/package_test.go index 87b5717aed4c..2013e405422b 100644 --- a/extension/httpforwarder/package_test.go +++ b/extension/httpforwarder/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/oauth2clientauthextension/package_test.go b/extension/oauth2clientauthextension/package_test.go index 011a16950a8e..640d0f11df3c 100644 --- a/extension/oauth2clientauthextension/package_test.go +++ b/extension/oauth2clientauthextension/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/observer/ecsobserver/package_test.go b/extension/observer/ecsobserver/package_test.go index b49740499e74..7613546053ea 100644 --- a/extension/observer/ecsobserver/package_test.go +++ b/extension/observer/ecsobserver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/observer/ecstaskobserver/package_test.go b/extension/observer/ecstaskobserver/package_test.go index 44e3d64eec51..d4e58f741e3c 100644 --- a/extension/observer/ecstaskobserver/package_test.go +++ b/extension/observer/ecstaskobserver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/observer/hostobserver/package_test.go b/extension/observer/hostobserver/package_test.go index 9b1afc770768..05d2b3ee3144 100644 --- a/extension/observer/hostobserver/package_test.go +++ b/extension/observer/hostobserver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/pprofextension/package_test.go b/extension/pprofextension/package_test.go index d3b2b32f4ef0..92b5b0fec95d 100644 --- a/extension/pprofextension/package_test.go +++ b/extension/pprofextension/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/remotetapextension/package_test.go b/extension/remotetapextension/package_test.go index c74acf50b739..2d48968ad050 100644 --- a/extension/remotetapextension/package_test.go +++ b/extension/remotetapextension/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/storage/dbstorage/package_test.go b/extension/storage/dbstorage/package_test.go index 6e4274e65a4d..81c633e3a345 100644 --- a/extension/storage/dbstorage/package_test.go +++ b/extension/storage/dbstorage/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/storage/filestorage/package_test.go b/extension/storage/filestorage/package_test.go index 7989cd67d4b7..725008ffc1bc 100644 --- a/extension/storage/filestorage/package_test.go +++ b/extension/storage/filestorage/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/storage/storagetest/package_test.go b/extension/storage/storagetest/package_test.go index f8577a17cd70..f8f1b14520e1 100644 --- a/extension/storage/storagetest/package_test.go +++ b/extension/storage/storagetest/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/extension/sumologicextension/.gitignore b/extension/sumologicextension/.gitignore new file mode 100644 index 000000000000..016382001e45 --- /dev/null +++ b/extension/sumologicextension/.gitignore @@ -0,0 +1 @@ +coverage.* diff --git a/extension/sumologicextension/Makefile b/extension/sumologicextension/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/extension/sumologicextension/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/extension/sumologicextension/README.md b/extension/sumologicextension/README.md new file mode 100644 index 000000000000..a930b227280b --- /dev/null +++ b/extension/sumologicextension/README.md @@ -0,0 +1,163 @@ +# Sumo Logic Extension + +| Status | | +| ------------- |-----------| +| Stability | [development] | +| Distributions | [sumo] | +| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aextension%2Fsumologic%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aextension%2Fsumologic) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aextension%2Fsumologic%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aextension%2Fsumologic) | +| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@astencel-sumo](https://www.github.com/astencel-sumo), [@sumo-drosiek](https://www.github.com/sumo-drosiek), [@swiatekm-sumo](https://www.github.com/swiatekm-sumo) | + +[development]: https://github.com/open-telemetry/opentelemetry-collector#development +[sumo]: https://github.com/SumoLogic/sumologic-otel-collector + + +This extension is to be used in conjunction with +[`sumologicexporter`][sumologicexporter] in order to export telemetry data to +[Sumo Logic][sumologic]. + +It manages: + +- authentication (passing the provided credentials to `sumologicexporter` + when configured as extension in the same service) +- registration (storing the registration info locally after successful registration + for later use) +- heartbeats + +[sumologicexporter]: ../../exporter/sumologicexporter/ +[sumologic]: https://www.sumologic.com/ + +## Implementation + +It implements [`HTTPClientAuthenticator`][httpclientauthenticator] +and can be used as an authenticator for the +[`configauth.Authentication`][configauth_authentication] option for HTTP clients. + +[httpclientauthenticator]: https://github.com/open-telemetry/opentelemetry-collector/blob/2e84285efc665798d76773b9901727e8836e9d8f/config/configauth/clientauth.go#L34-L39 +[configauth_authentication]: https://github.com/open-telemetry/opentelemetry-collector/blob/3f5c7180c51ed67a6f54158ede5e523822e9659e/config/configauth/configauth.go#L29-L33 + +## Configuration + +- `installation_token`: (required) collector installation token for the Sumo Logic service, see + [help][credentials_help] for more details +- `collector_name`: name that will be used for registration; by default the hostname is used. In the event of a conflict, a timestamp will be appended to the name. See [here][clobber] for more information. +- `collector_description`: collector description that will be used for registration +- `collector_category`: collector category that will be used for registration +- `collector_fields`: a map of key value pairs that will be used as collector + fields that will be used for registration. + For more information on this subject please visit [this help document][fields_help] +- `discover_collector_tags`: defines whether to auto-discover collector metadata + tags (for local services, e.g. mysql) (default: `true`) + + **NOTE**: collector metadata tag auto-discovery is an alpha feature. +- `api_base_url`: base API URL that will be used for creating API requests, + see [API URLs](#api-urls) details + (default: `https://open-collectors.sumologic.com`) +- `heartbeat_interval`: interval that will be used for sending heartbeats + (default: `15s`) +- `collector_credentials_directory`: directory where state files with registration + info will be stored after successful collector registration + (default: `$HOME/.sumologic-otel-collector`) +- `clobber`: defines whether to delete any existing collector with the same name. See [here][clobber] for more information. +- `force_registration`: defines whether to force registration every time the + collector starts. + This will cause the collector to not look at the locally stored credentials + and to always reach out to API to register itself. (default: `false`) + + **NOTE**: if clobber is unset (default) then setting this to true will create + a new collector (with new unique name) on Sumo UI on every collector start + and create a new one upon registration. +- `ephemeral`: defines whether the collector will be deleted after 12 hours + of inactivity (default: `false`) +- `time_zone`: defines the time zone of the collector, for example "America/Los_Angeles". + For a list of all possible values, refer to the `TZ identifier` column in + https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List +- `backoff`: defines backoff mechanism for retry in case of failed registration. + [Exponential algorithm](https://pkg.go.dev/github.com/cenkalti/backoff/v4#ExponentialBackOff) is being used. + - `initial_interval` - initial interval of backoff (default: `500ms`) + - `max_interval` - maximum interval of backoff (default: `1m`) + - `max_elapsed_time` - time after which registration fails definitely (default: `15m`) + +[credentials_help]: https://help.sumologic.com/docs/manage/security/installation-tokens +[fields_help]: https://help.sumologic.com/docs/manage/fields +[clobber]: https://help.sumologic.com/docs/send-data/installed-collectors/collector-installation-reference/force-collectors-name-clobber/ + +## Example Config + +```yaml +extensions: + sumologic: + installation_token: + collector_name: my_collector + time_zone: Europe/Warsaw + +receivers: + hostmetrics: + collection_interval: 30s + scrapers: + load: + +processors: + +exporters: + sumologic: + auth: + authenticator: sumologic # Specify the name of the authenticator extension + +service: + extensions: [sumologic] + pipelines: + metrics: + receivers: [hostmetrics] + processors: [] + exporters: [sumologic] +``` + +## API URLs + +When integrating the extension with different Sumo Logic deployment that the +default one (i.e. `https://open-collectors.sumologic.com`) one needs to specify +the base API URL in the configuration (via `api_base_url` option) in order to +specify against which URL the agent will be authenticating against. + +Here is a list of valid values for this configuration option: + +| Deployment | API base URL | +|:-------------:|---------------------------------------------| +| default/`US1` | `https://open-collectors.sumologic.com` | +| `US2` | `https://open-collectors.us2.sumologic.com` | +| `AU` | `https://open-collectors.au.sumologic.com` | +| `DE` | `https://open-collectors.de.sumologic.com` | +| `EU` | `https://open-collectors.eu.sumologic.com` | +| `JP` | `https://open-collectors.jp.sumologic.com` | +| `CA` | `https://open-collectors.ca.sumologic.com` | +| `IN` | `https://open-collectors.in.sumologic.com` | + +## Storing credentials + +When collector is starting for the first time, Sumo Logic extension is using the `installation_token` +to register the collector with API. +Upon registration, the extension gets collector credentials which are used to authenticate the collector +when sending request to API (heartbeats, sending data etc). + +Credentials are stored on local filesystem to be reused when collector gets restarted (to prevent re-registration). +The path that's used to store the credentials files is configured via `collector_credentials_directory` which is by default +set to `$HOME/.sumologic-otel-collector`. + +Name of that file that contains the credentials is created in the following manner: + +```go +filename := hash(collector_name, installation_token, api_base_url) +``` + +This mechanism allows to keep the state of the collector (whether it is registered or not). +When collector is restarting it checks if the state file exists in `collector_credentials_directory`. + +If one would like to register another collector on the same machine then `collector_name` configuration property +has to be specified in order to register the collector under that specific name which will be used to create +a separate state file. + +### Running the collector as systemd service + +Systemd services are often run as users without a home directory, +so if the collector is run as such service, the credentials might not be stored properly. One should either make sure that the home directory exists for the user +or change the store location to another directory. diff --git a/extension/sumologicextension/config.go b/extension/sumologicextension/config.go new file mode 100644 index 000000000000..5e0af95c2cfb --- /dev/null +++ b/extension/sumologicextension/config.go @@ -0,0 +1,95 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sumologicextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension" + +import ( + "time" + + "go.opentelemetry.io/collector/config/confighttp" + "go.opentelemetry.io/collector/config/configopaque" +) + +// Config has the configuration for the sumologic extension. +type Config struct { + // squash ensures fields are correctly decoded in embedded struct. + confighttp.HTTPClientSettings `mapstructure:",squash"` + + // Credentials contains Installation Token for Sumo Logic service. + // Please refer to https://help.sumologic.com/docs/manage/security/installation-tokens + // for detailed instructions how to obtain the token. + Credentials accessCredentials `mapstructure:",squash"` + + // CollectorName is the name under which collector will be registered. + // Please note that registering a collector under a name which is already + // used is not allowed. + CollectorName string `mapstructure:"collector_name"` + // CollectorEnvironment is the environment which will be used when updating + // the collector metadata. + CollectorEnvironment string `mapstructure:"collector_environment"` + // CollectorDescription is the description which will be used when the + // collector is being registered. + CollectorDescription string `mapstructure:"collector_description"` + // CollectorCategory is the collector category which will be used when the + // collector is being registered. + CollectorCategory string `mapstructure:"collector_category"` + // CollectorFields defines the collector fields. + // For more information on this subject visit: + // https://help.sumologic.com/docs/manage/fields + CollectorFields map[string]any `mapstructure:"collector_fields"` + + // DiscoverCollectorTags enables collector metadata tag auto-discovery. + DiscoverCollectorTags bool `mapstructure:"discover_collector_tags"` + + APIBaseURL string `mapstructure:"api_base_url"` + + HeartBeatInterval time.Duration `mapstructure:"heartbeat_interval"` + + // CollectorCredentialsDirectory is the directory where state files + // with collector credentials will be stored after successful collector + // registration. Default value is $HOME/.sumologic-otel-collector + CollectorCredentialsDirectory string `mapstructure:"collector_credentials_directory"` + + // Clobber defines whether to delete any existing collector with the same + // name and create a new one upon registration. + // By default this is false. + Clobber bool `mapstructure:"clobber"` + + // ForceRegistration defines whether to force registration every time the + // collector starts. + // This will cause the collector to not look at the locally stored credentials + // and to always reach out to API to register itself. + // + // NOTE: if clobber is unset (default) then setting this to true will create + // a new collector on Sumo UI on every collector start. + // + // By default this is false. + ForceRegistration bool `mapstructure:"force_registration"` + + // Ephemeral defines whether the collector will be deleted after 12 hours + // of inactivity. + // By default this is false. + Ephemeral bool `mapstructure:"ephemeral"` + + // TimeZone defines the time zone of the Collector. + // For a list of possible values, refer to the "TZ" column in + // https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List. + TimeZone string `mapstructure:"time_zone"` + + // BackOff defines configuration of collector registration backoff algorithm + // Exponential algorithm is being used. + // Please see following link for details: https://github.com/cenkalti/backoff + BackOff backOffConfig `mapstructure:"backoff"` +} + +type accessCredentials struct { + InstallationToken configopaque.String `mapstructure:"installation_token"` +} + +// backOff configuration. See following link for details: +// https://pkg.go.dev/github.com/cenkalti/backoff/v4#ExponentialBackOff +type backOffConfig struct { + InitialInterval time.Duration `mapstructure:"initial_interval"` + MaxInterval time.Duration `mapstructure:"max_interval"` + MaxElapsedTime time.Duration `mapstructure:"max_elapsed_time"` +} diff --git a/extension/sumologicextension/extension.go b/extension/sumologicextension/extension.go new file mode 100644 index 000000000000..b3774da85d2d --- /dev/null +++ b/extension/sumologicextension/extension.go @@ -0,0 +1,33 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sumologicextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension" + +import ( + "context" + "time" + + "go.opentelemetry.io/collector/component" + "go.uber.org/zap" +) + +type SumologicExtension struct { +} + +const DefaultHeartbeatInterval = 15 * time.Second + +func init() { +} + +func newSumologicExtension(_ *Config, _ *zap.Logger, _ component.ID, _ string) (*SumologicExtension, error) { + return &SumologicExtension{}, nil +} + +func (se *SumologicExtension) Start(_ context.Context, _ component.Host) error { + return nil +} + +// Shutdown is invoked during service shutdown. +func (se *SumologicExtension) Shutdown(_ context.Context) error { + return nil +} diff --git a/extension/sumologicextension/factory.go b/extension/sumologicextension/factory.go new file mode 100644 index 000000000000..b21f2a064b77 --- /dev/null +++ b/extension/sumologicextension/factory.go @@ -0,0 +1,56 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 +// +//go:generate mdatagen metadata.yaml + +package sumologicextension // import "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension" + +import ( + "context" + + "github.com/cenkalti/backoff/v4" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/extension" + + "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension/internal/metadata" +) + +const ( + // The value of extension "type" in configuration. + DefaultAPIBaseURL = "https://open-collectors.sumologic.com" +) + +// NewFactory creates a factory for Sumo Logic extension. +func NewFactory() extension.Factory { + return extension.NewFactory( + metadata.Type, + createDefaultConfig, + createExtension, + metadata.ExtensionStability, + ) +} + +func createDefaultConfig() component.Config { + defaultCredsPath := "" + + return &Config{ + APIBaseURL: DefaultAPIBaseURL, + HeartBeatInterval: DefaultHeartbeatInterval, + CollectorCredentialsDirectory: defaultCredsPath, + Clobber: false, + DiscoverCollectorTags: true, + ForceRegistration: false, + Ephemeral: false, + TimeZone: "", + BackOff: backOffConfig{ + InitialInterval: backoff.DefaultInitialInterval, + MaxInterval: backoff.DefaultMaxInterval, + MaxElapsedTime: backoff.DefaultMaxElapsedTime, + }, + } +} + +func createExtension(_ context.Context, params extension.CreateSettings, cfg component.Config) (extension.Extension, error) { + config := cfg.(*Config) + return newSumologicExtension(config, params.Logger, params.ID, params.BuildInfo.Version) +} diff --git a/extension/sumologicextension/factory_test.go b/extension/sumologicextension/factory_test.go new file mode 100644 index 000000000000..230e310c0a88 --- /dev/null +++ b/extension/sumologicextension/factory_test.go @@ -0,0 +1,62 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sumologicextension + +import ( + "context" + "testing" + + "github.com/cenkalti/backoff/v4" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/extension" +) + +func TestFactory_CreateDefaultConfig(t *testing.T) { + cfg := createDefaultConfig() + defaultCredsPath := "" + assert.Equal(t, &Config{ + HeartBeatInterval: DefaultHeartbeatInterval, + APIBaseURL: DefaultAPIBaseURL, + CollectorCredentialsDirectory: defaultCredsPath, + DiscoverCollectorTags: true, + BackOff: backOffConfig{ + InitialInterval: backoff.DefaultInitialInterval, + MaxInterval: backoff.DefaultMaxInterval, + MaxElapsedTime: backoff.DefaultMaxElapsedTime, + }, + }, cfg) + + assert.NoError(t, component.ValidateConfig(cfg)) + + ccfg := cfg.(*Config) + ccfg.CollectorName = "test_collector" + ccfg.Credentials.InstallationToken = "dummy_install_token" + + ext, err := createExtension(context.Background(), + extension.CreateSettings{ + TelemetrySettings: componenttest.NewNopTelemetrySettings(), + }, + cfg, + ) + require.NoError(t, err) + require.NotNil(t, ext) +} + +func TestFactory_CreateExtension(t *testing.T) { + cfg := createDefaultConfig().(*Config) + cfg.CollectorName = "test_collector" + cfg.Credentials.InstallationToken = "dummy_install_token" + + ext, err := createExtension(context.Background(), + extension.CreateSettings{ + TelemetrySettings: componenttest.NewNopTelemetrySettings(), + }, + cfg, + ) + require.NoError(t, err) + require.NotNil(t, ext) +} diff --git a/extension/sumologicextension/go.mod b/extension/sumologicextension/go.mod new file mode 100644 index 000000000000..21a1347005b3 --- /dev/null +++ b/extension/sumologicextension/go.mod @@ -0,0 +1,65 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension + +go 1.20 + +require ( + github.com/cenkalti/backoff/v4 v4.2.1 + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f + go.opentelemetry.io/collector/config/confighttp v0.93.1-0.20240130182548-89388addcc7f + go.opentelemetry.io/collector/config/configopaque v0.93.1-0.20240130182548-89388addcc7f + go.opentelemetry.io/collector/extension v0.93.1-0.20240130182548-89388addcc7f + go.opentelemetry.io/otel/metric v1.22.0 + go.opentelemetry.io/otel/trace v1.22.0 + go.uber.org/zap v1.26.0 +) + +require ( + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect + github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/golang/snappy v0.0.4 // indirect + github.com/hashicorp/go-version v1.6.0 // indirect + github.com/klauspost/compress v1.17.5 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.46.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/rs/cors v1.10.1 // indirect + go.opentelemetry.io/collector v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/config/configauth v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/config/configcompression v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/config/configtls v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/config/internal v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/extension/auth v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/featuregate v1.0.2-0.20240130181942-9c7177496fd5 // indirect + go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 // indirect + go.opentelemetry.io/otel v1.22.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.45.0 // indirect + go.opentelemetry.io/otel/sdk v1.22.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.22.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac // indirect + google.golang.org/grpc v1.61.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/extension/sumologicextension/go.sum b/extension/sumologicextension/go.sum new file mode 100644 index 000000000000..222b61e753e1 --- /dev/null +++ b/extension/sumologicextension/go.sum @@ -0,0 +1,157 @@ +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/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM= +github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= +github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= +github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= +github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= +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.17.5 h1:d4vBd+7CHydUqpFBgUEKkSdtSugf9YFmSkvUYPquI5E= +github.com/klauspost/compress v1.17.5/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= +github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +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/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= +github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= +github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= +github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= +github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/rs/cors v1.10.1 h1:L0uuZVXIKlI1SShY2nhFfo44TYvDPQ1w4oFkUJNfhyo= +github.com/rs/cors v1.10.1/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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.93.1-0.20240130182548-89388addcc7f h1:NgQcLNPP/6YnIfNUkDkKu1uiRTXUa9kMtfpsKSVC4dY= +go.opentelemetry.io/collector v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:rEqeAsOy8Mu6HA6oMjGk7NrTb7958XmShSaapxFEeTs= +go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f h1:DNFOx9vwV7g+lWz9htP/Biiwwp+oFifR+J2zKnQKV3U= +go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:jOHaBlhWt4aarDS6w9A9GcgGCxrtEg+8LnBK7Y/6zqo= +go.opentelemetry.io/collector/config/configauth v0.93.1-0.20240130182548-89388addcc7f h1:3kgTrMN+n+gTgz0t2g+HxKbosnXj3cbTWpKzm5iVrP4= +go.opentelemetry.io/collector/config/configauth v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:HNJs8R2QsUUFTvIECNoQOdGe3bryAC7LdLlf+D36S7M= +go.opentelemetry.io/collector/config/configcompression v0.93.1-0.20240130182548-89388addcc7f h1:FI5NTZ1premzy9eb8RlUeSPYzC99owa5C7WWfIuMmSM= +go.opentelemetry.io/collector/config/configcompression v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:fA36AZC/Qcyl+HvMnvFZuV/iUWGQJrchimmk+qYWuMM= +go.opentelemetry.io/collector/config/confighttp v0.93.1-0.20240130182548-89388addcc7f h1:Kp+wFSith3x1WpLlrJKncyfwBIaQYxtMkfIFRBxHnlA= +go.opentelemetry.io/collector/config/confighttp v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:TOo6Nv9g9bmd6Wh7quX715n+Aq0n63aFWKHoSTjzunI= +go.opentelemetry.io/collector/config/configopaque v0.93.1-0.20240130182548-89388addcc7f h1:5wpcYp67vufdi7j6swWWu7K87yiHFoosO/KpuMZtNVA= +go.opentelemetry.io/collector/config/configopaque v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:dQK8eUXjIGKaw1RB7UIg2nqx56AueNxeKFCdB0P1ypg= +go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f h1:S1mp1jVnxg0tyy7uFEMHDFRqI4AiqqE/ia8RPj3SKW0= +go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:2XLhyR/GVpWeZ2K044vCmrvH/d4Ewt0aD/y46avZyMU= +go.opentelemetry.io/collector/config/configtls v0.93.1-0.20240130182548-89388addcc7f h1:WjsQK6NCASD7Ht/6mdmweFcowBvWf/HiWJASkb4f9rw= +go.opentelemetry.io/collector/config/configtls v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:ehXx933OgUTSH7bIWphIf1Kfohy6qmrVHizFCgHtF7U= +go.opentelemetry.io/collector/config/internal v0.93.1-0.20240130182548-89388addcc7f h1:uaN1LYmZkVWolEUVVVoD7xlKq+6hAaQ53CBbtB4OBGk= +go.opentelemetry.io/collector/config/internal v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:e1lsJgZrO0jpId7iesPp2tljDzJsY4UrggKLfWp53bg= +go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f h1:HIvqzK7ANxcVRhtJ/zUm+ZWGHlGo7TClqcaNMwQgzHs= +go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:KjHrfxKKojaLDc9zDPfVuyp8765AH+XfcoPWMLMiuHU= +go.opentelemetry.io/collector/consumer v0.93.0 h1:tt9T8knyamBr/85VqIbESsIHVkFXCkwOD+noFqK3+Vg= +go.opentelemetry.io/collector/extension v0.93.1-0.20240130182548-89388addcc7f h1:cBHNixkZij3SmkQSoFLRbVOv7tqsQ9BNE3uSFjQaP30= +go.opentelemetry.io/collector/extension v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:vT7HRXtE+5MLesDYDhIf/6cdkAaDCR3ikSlvH6PoA6A= +go.opentelemetry.io/collector/extension/auth v0.93.1-0.20240130182548-89388addcc7f h1:xwtN/kL5zyVROBmQ0kBiOL7pH0H+bVleCbGuB5uATfI= +go.opentelemetry.io/collector/extension/auth v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:hJ6p4yGoJP5zCeKaHV7k8WtRDSAQt20iDWy32gqiXP8= +go.opentelemetry.io/collector/featuregate v1.0.2-0.20240130181942-9c7177496fd5 h1:ksQGFKtMhIeFKuAu5n0teItSFBCMJo1bF5q8YkE/4W4= +go.opentelemetry.io/collector/featuregate v1.0.2-0.20240130181942-9c7177496fd5/go.mod h1:QQXjP4etmJQhkQ20j4P/rapWuItYxoFozg/iIwuKnYg= +go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5 h1:cMc7sJ29OzK5jZqr6XFzKxiJvlypR/zt2TDhPDqpBic= +go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5/go.mod h1:IDkDj+B4Fp4wWOclBELN97zcb98HugJ8Q2gA4ZFsN8Q= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0 h1:sv9kVfal0MK0wBMCOGr+HeJm9v803BkJxGrk2au7j08= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.47.0/go.mod h1:SK2UL73Zy1quvRPonmOmRDiWk1KBV3LyIeeIxcEApWw= +go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= +go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= +go.opentelemetry.io/otel/exporters/prometheus v0.45.0 h1:BeIK2KGho0oCWa7LxEGSqfDZbs7Fpv/Viz+FS4P8CXE= +go.opentelemetry.io/otel/exporters/prometheus v0.45.0/go.mod h1:UVJZPLnfDSvHj+eJuZE+E1GjIBD267mEMfAAHJdghWg= +go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= +go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/sdk/metric v1.22.0 h1:ARrRetm1HCVxq0cbnaZQlfwODYJHo3gFL8Z3tSmHBcI= +go.opentelemetry.io/otel/sdk/metric v1.22.0/go.mod h1:KjQGeMIDlBNEOo6HvjhxIec1p/69/kULDcp4gr0oLQQ= +go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= +go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +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/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +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-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +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/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +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-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +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/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac h1:nUQEQmH/csSvFECKYRv6HWEyypysidKl2I6Qpsglq/0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +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.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/processor/servicegraphprocessor/internal/metadata/generated_status.go b/extension/sumologicextension/internal/metadata/generated_status.go similarity index 61% rename from processor/servicegraphprocessor/internal/metadata/generated_status.go rename to extension/sumologicextension/internal/metadata/generated_status.go index 8b4f1a6ffb95..cb9f107e4ad9 100644 --- a/processor/servicegraphprocessor/internal/metadata/generated_status.go +++ b/extension/sumologicextension/internal/metadata/generated_status.go @@ -9,14 +9,14 @@ import ( ) const ( - Type = "servicegraph" - TracesStability = component.StabilityLevelDeprecated + Type = "sumologic" + ExtensionStability = component.StabilityLevelDevelopment ) func Meter(settings component.TelemetrySettings) metric.Meter { - return settings.MeterProvider.Meter("otelcol/servicegraph") + return settings.MeterProvider.Meter("otelcol/sumologic") } func Tracer(settings component.TelemetrySettings) trace.Tracer { - return settings.TracerProvider.Tracer("otelcol/servicegraph") + return settings.TracerProvider.Tracer("otelcol/sumologic") } diff --git a/extension/sumologicextension/metadata.yaml b/extension/sumologicextension/metadata.yaml new file mode 100644 index 000000000000..464a9643a751 --- /dev/null +++ b/extension/sumologicextension/metadata.yaml @@ -0,0 +1,9 @@ +type: sumologic + +status: + class: extension + stability: + development: [extension] + distributions: [sumo] + codeowners: + active: [astencel-sumo, sumo-drosiek, swiatekm-sumo] diff --git a/go.mod b/go.mod index a4d385e68fdc..929b936553cf 100644 --- a/go.mod +++ b/go.mod @@ -81,7 +81,6 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor v0.93.0 - github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor v0.93.0 @@ -248,11 +247,11 @@ require ( github.com/DataDog/go-sqllexer v0.0.8 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 // indirect github.com/DataDog/sketches-go v1.4.4 // indirect github.com/DataDog/zstd v1.5.2 // indirect github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 // indirect @@ -516,6 +515,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk v0.93.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.93.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.93.0 // indirect @@ -927,8 +927,6 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/reso replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor => ./processor/routingprocessor/ -replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor => ./processor/servicegraphprocessor/ - replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor => ./processor/spanmetricsprocessor/ replace github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor => ./processor/spanprocessor/ @@ -1151,3 +1149,5 @@ replace ( github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector => ./connector/servicegraphconnector github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector => ./connector/spanmetricsconnector ) + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery => ./internal/sqlquery diff --git a/go.sum b/go.sum index a2b05e867d52..01143ee20c66 100644 --- a/go.sum +++ b/go.sum @@ -182,17 +182,17 @@ github.com/DataDog/go-tuf v1.0.2-0.5.2 h1:EeZr937eKAWPxJ26IykAdWA4A0jQXJgkhUjqEI github.com/DataDog/go-tuf v1.0.2-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee h1:tXibLZk3G6HncIFJKaNItsdzcrk4YqILNDZlXPTNt4k= github.com/DataDog/gohai v0.0.0-20230524154621-4316413895ee/go.mod h1:nTot/Iy0kW16bXgXr6blEc8gFeAS7vTqYlhAxh+dbc0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1 h1:MwXEMqL/aThmkdLKSABXRb+/qoyCq5Z3+1IPPB6L/m0= -github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.1/go.mod h1:ODbHm4iVWmn16ruFXY7uMC0LNaZaGWHBqu0VR8efIsk= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.1 h1:0ugsTkWG1SrU8WR9sDGhOy4M/iqHY+w5Ali+jzMGetg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 h1:mOfJySl1BbvgVHgLsA1ouWHN2QKyd+xksy3hG2TeD68= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1/go.mod h1:NRv/hOlGq1LrJN1bbY7gJa4upTDTh5ZRW19U5w/wuNQ= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1 h1:S9pLye2reYfPUOV4FXSkRvsDt6OwIGyGAIgXTNErhL4= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.1/go.mod h1:3luUUR9mBoHiMRh+PrWmySpXMOntTd/7fCl2UTu4Axg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 h1:z0QDSV9lQbTVoAnOkKiu7SWElWKPwpqGI7OE+OYNCIs= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1/go.mod h1:As+hEGB+/quKDMjxLtMKU9ucSsjrpdk1pXnMNqfwGoU= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 h1:nd3Zch8xtTALM3ObZ3jBwzbDFtARTN/QVoDCCWXubJE= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1/go.mod h1:xF6NyzghnEeQe9+9d8XiiOzxhDAdvOWOF8dR4dq5DqI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2 h1:9xUPi4L6HwM9uB4rkKuoFGrpyCiv6Xm0NaBtkeCJhoI= +github.com/DataDog/opentelemetry-mapping-go/pkg/inframetadata v0.13.2/go.mod h1:m4btyxCu5NuyxCL9iX4Sa3fNb5deCsVMSWIlF18tQ0E= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.2 h1:TGGnFPI160L3HGhCN7Y4lXNlH7mFj/uBYdVeQG6lIVo= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 h1:V5SoRFNeFdidAemhVTGO/zwtPNluN4ZrrqiFLuAT7Us= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2/go.mod h1:Z2FPxYhi8GIFkS4WLC7RrRaGolyB9TqS2RMSwNcmczk= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2 h1:9eWdRXsKcFdVyyjg1AVrKhwLRL7/7Cp8nKG5QISwFKQ= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/logs v0.13.2/go.mod h1:1br0HgzhDIYcnVrx4dkkmRmdGrj/4iastO6TFcQkcbg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 h1:IkA9MI8nmY8gbRI9YLI7o7tKmjuTK1nU29cDqyi+sOg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2/go.mod h1:QLz5CEgTHJ91pLOcb2hL8P3+7AKMUIOfXJw2Sr4588o= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 h1:s06GkbYmWnG7WYmmxOTB0W+1BidVqZ/4oXvyoQmNovE= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2/go.mod h1:hKaXjBn+Y/KT6otuDA213Y0gtjlK0ylI8uuAho3LKKo= github.com/DataDog/sketches-go v1.4.4 h1:dF52vzXRFSPOj2IjXSWLvXq3jubL4CI69kwYjJ1w5Z8= github.com/DataDog/sketches-go v1.4.4/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= github.com/DataDog/zstd v1.5.0/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= diff --git a/internal/aws/ecsutil/package_test.go b/internal/aws/ecsutil/package_test.go index dd318c9e41c1..2ea0398f7487 100644 --- a/internal/aws/ecsutil/package_test.go +++ b/internal/aws/ecsutil/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/internal/components/components.go b/internal/components/components.go index 7ef8ab67785a..31c9fb87e897 100644 --- a/internal/components/components.go +++ b/internal/components/components.go @@ -100,7 +100,6 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor" - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor" @@ -380,7 +379,6 @@ func Components() (otelcol.Factories, error) { resourceprocessor.NewFactory(), routingprocessor.NewFactory(), tailsamplingprocessor.NewFactory(), - servicegraphprocessor.NewFactory(), spanmetricsprocessor.NewFactory(), spanprocessor.NewFactory(), cumulativetodeltaprocessor.NewFactory(), diff --git a/internal/datadog/go.mod b/internal/datadog/go.mod index 683fa7f3080c..3c0f0e04c2df 100644 --- a/internal/datadog/go.mod +++ b/internal/datadog/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( github.com/DataDog/datadog-agent/pkg/proto v0.52.0-devel github.com/DataDog/datadog-agent/pkg/trace v0.50.2 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 github.com/stretchr/testify v1.8.4 go.opentelemetry.io/collector/featuregate v1.0.2-0.20240130181942-9c7177496fd5 go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5 @@ -21,8 +21,8 @@ require ( github.com/DataDog/datadog-go/v5 v5.1.1 // indirect github.com/DataDog/go-sqllexer v0.0.8 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 // indirect github.com/DataDog/sketches-go v1.4.4 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/internal/datadog/go.sum b/internal/datadog/go.sum index b08dc40c23ab..3e39335fdf86 100644 --- a/internal/datadog/go.sum +++ b/internal/datadog/go.sum @@ -20,13 +20,13 @@ github.com/DataDog/go-sqllexer v0.0.8 h1:vfC8R9PhmJfeOKcFYAX9UOd890A3wu3KrjU9Kr7 github.com/DataDog/go-sqllexer v0.0.8/go.mod h1:nB4Ea2YNsqMwtbWMc4Fm/oP98IIrSPapqwOwPioMspY= github.com/DataDog/go-tuf v1.0.2-0.5.2 h1:EeZr937eKAWPxJ26IykAdWA4A0jQXJgkhUjqEI/w7+I= github.com/DataDog/go-tuf v1.0.2-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.1 h1:0ugsTkWG1SrU8WR9sDGhOy4M/iqHY+w5Ali+jzMGetg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 h1:mOfJySl1BbvgVHgLsA1ouWHN2QKyd+xksy3hG2TeD68= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1/go.mod h1:NRv/hOlGq1LrJN1bbY7gJa4upTDTh5ZRW19U5w/wuNQ= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 h1:z0QDSV9lQbTVoAnOkKiu7SWElWKPwpqGI7OE+OYNCIs= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1/go.mod h1:As+hEGB+/quKDMjxLtMKU9ucSsjrpdk1pXnMNqfwGoU= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 h1:nd3Zch8xtTALM3ObZ3jBwzbDFtARTN/QVoDCCWXubJE= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1/go.mod h1:xF6NyzghnEeQe9+9d8XiiOzxhDAdvOWOF8dR4dq5DqI= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.2 h1:TGGnFPI160L3HGhCN7Y4lXNlH7mFj/uBYdVeQG6lIVo= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 h1:V5SoRFNeFdidAemhVTGO/zwtPNluN4ZrrqiFLuAT7Us= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2/go.mod h1:Z2FPxYhi8GIFkS4WLC7RrRaGolyB9TqS2RMSwNcmczk= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 h1:IkA9MI8nmY8gbRI9YLI7o7tKmjuTK1nU29cDqyi+sOg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2/go.mod h1:QLz5CEgTHJ91pLOcb2hL8P3+7AKMUIOfXJw2Sr4588o= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 h1:s06GkbYmWnG7WYmmxOTB0W+1BidVqZ/4oXvyoQmNovE= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2/go.mod h1:hKaXjBn+Y/KT6otuDA213Y0gtjlK0ylI8uuAho3LKKo= github.com/DataDog/sketches-go v1.4.4 h1:dF52vzXRFSPOj2IjXSWLvXq3jubL4CI69kwYjJ1w5Z8= github.com/DataDog/sketches-go v1.4.4/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= @@ -108,8 +108,8 @@ github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w 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/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.92.0 h1:2cjUFC0jNSqAYcO+ZWUQ8sqPZdAX03Bd90SpsGcnrNY= -github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.92.0 h1:sqs1y0Exyxons2mWMAmBSdcdl2UizUgOmoibEBRX/4I= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.93.0 h1:R0GGB09OWAP1bSVps2brDOOln8pgSgzHU658bdzIb+g= +github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.93.0 h1:2AKT1xw2KNenv/nfRoWueYxQiLJe76Axhb5++4jdgiA= github.com/opencontainers/runtime-spec v1.1.0-rc.3 h1:l04uafi6kxByhbxev7OWiuUv0LZxEsYUfDWZ6bztAuU= github.com/opencontainers/runtime-spec v1.1.0-rc.3/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/outcaste-io/ristretto v0.2.1 h1:KCItuNIGJZcursqHr3ghO7fc5ddZLEHspL9UR0cQM64= diff --git a/internal/filter/filterottl/package_test.go b/internal/filter/filterottl/package_test.go index e7b2d9b06a1d..418dc95817c9 100644 --- a/internal/filter/filterottl/package_test.go +++ b/internal/filter/filterottl/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/internal/sharedcomponent/package_test.go b/internal/sharedcomponent/package_test.go index 2a85636d3ea1..424f48bf6d6e 100644 --- a/internal/sharedcomponent/package_test.go +++ b/internal/sharedcomponent/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/internal/splunk/package_test.go b/internal/splunk/package_test.go index 1ddaa1d91d50..34d6ece65021 100644 --- a/internal/splunk/package_test.go +++ b/internal/splunk/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/internal/sqlquery/Makefile b/internal/sqlquery/Makefile new file mode 100644 index 000000000000..ded7a36092dc --- /dev/null +++ b/internal/sqlquery/Makefile @@ -0,0 +1 @@ +include ../../Makefile.Common diff --git a/internal/sqlquery/config.go b/internal/sqlquery/config.go new file mode 100644 index 000000000000..d45fbf4a9960 --- /dev/null +++ b/internal/sqlquery/config.go @@ -0,0 +1,178 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" + +import ( + "errors" + "fmt" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/receiver/scraperhelper" + "go.uber.org/multierr" +) + +type Config struct { + scraperhelper.ScraperControllerSettings `mapstructure:",squash"` + Driver string `mapstructure:"driver"` + DataSource string `mapstructure:"datasource"` + Queries []Query `mapstructure:"queries"` + StorageID *component.ID `mapstructure:"storage"` + Telemetry TelemetryConfig `mapstructure:"telemetry"` +} + +func (c Config) Validate() error { + if c.Driver == "" { + return errors.New("'driver' cannot be empty") + } + if c.DataSource == "" { + return errors.New("'datasource' cannot be empty") + } + if len(c.Queries) == 0 { + return errors.New("'queries' cannot be empty") + } + for _, query := range c.Queries { + if err := query.Validate(); err != nil { + return err + } + } + return nil +} + +type Query struct { + SQL string `mapstructure:"sql"` + Metrics []MetricCfg `mapstructure:"metrics"` + Logs []LogsCfg `mapstructure:"logs"` + TrackingColumn string `mapstructure:"tracking_column"` + TrackingStartValue string `mapstructure:"tracking_start_value"` +} + +func (q Query) Validate() error { + var errs error + if q.SQL == "" { + errs = multierr.Append(errs, errors.New("'query.sql' cannot be empty")) + } + if len(q.Logs) == 0 && len(q.Metrics) == 0 { + errs = multierr.Append(errs, errors.New("at least one of 'query.logs' and 'query.metrics' must not be empty")) + } + for _, logs := range q.Logs { + if err := logs.Validate(); err != nil { + errs = multierr.Append(errs, err) + } + } + for _, metric := range q.Metrics { + if err := metric.Validate(); err != nil { + errs = multierr.Append(errs, err) + } + } + return errs +} + +type LogsCfg struct { + BodyColumn string `mapstructure:"body_column"` +} + +func (config LogsCfg) Validate() error { + var errs error + if config.BodyColumn == "" { + errs = multierr.Append(errs, errors.New("'body_column' must not be empty")) + } + return errs +} + +type MetricCfg struct { + MetricName string `mapstructure:"metric_name"` + ValueColumn string `mapstructure:"value_column"` + AttributeColumns []string `mapstructure:"attribute_columns"` + Monotonic bool `mapstructure:"monotonic"` + ValueType MetricValueType `mapstructure:"value_type"` + DataType MetricType `mapstructure:"data_type"` + Aggregation MetricAggregation `mapstructure:"aggregation"` + Unit string `mapstructure:"unit"` + Description string `mapstructure:"description"` + StaticAttributes map[string]string `mapstructure:"static_attributes"` + StartTsColumn string `mapstructure:"start_ts_column"` + TsColumn string `mapstructure:"ts_column"` +} + +func (c MetricCfg) Validate() error { + var errs error + if c.MetricName == "" { + errs = multierr.Append(errs, errors.New("'metric_name' cannot be empty")) + } + if c.ValueColumn == "" { + errs = multierr.Append(errs, errors.New("'value_column' cannot be empty")) + } + if err := c.ValueType.Validate(); err != nil { + errs = multierr.Append(errs, err) + } + if err := c.DataType.Validate(); err != nil { + errs = multierr.Append(errs, err) + } + if err := c.Aggregation.Validate(); err != nil { + errs = multierr.Append(errs, err) + } + if c.DataType == MetricTypeGauge && c.Aggregation != "" { + errs = multierr.Append(errs, fmt.Errorf("aggregation=%s but data_type=%s does not support aggregation", c.Aggregation, c.DataType)) + } + if errs != nil && c.MetricName != "" { + errs = multierr.Append(fmt.Errorf("invalid metric config with metric_name '%s'", c.MetricName), errs) + } + return errs +} + +type MetricType string + +const ( + MetricTypeUnspecified MetricType = "" + MetricTypeGauge MetricType = "gauge" + MetricTypeSum MetricType = "sum" +) + +func (t MetricType) Validate() error { + switch t { + case MetricTypeUnspecified, MetricTypeGauge, MetricTypeSum: + return nil + } + return fmt.Errorf("metric config has unsupported data_type: '%s'", t) +} + +type MetricValueType string + +const ( + MetricValueTypeUnspecified MetricValueType = "" + MetricValueTypeInt MetricValueType = "int" + MetricValueTypeDouble MetricValueType = "double" +) + +func (t MetricValueType) Validate() error { + switch t { + case MetricValueTypeUnspecified, MetricValueTypeInt, MetricValueTypeDouble: + return nil + } + return fmt.Errorf("metric config has unsupported value_type: '%s'", t) +} + +type MetricAggregation string + +const ( + MetricAggregationUnspecified MetricAggregation = "" + MetricAggregationCumulative MetricAggregation = "cumulative" + MetricAggregationDelta MetricAggregation = "delta" +) + +func (a MetricAggregation) Validate() error { + switch a { + case MetricAggregationUnspecified, MetricAggregationCumulative, MetricAggregationDelta: + return nil + } + return fmt.Errorf("metric config has unsupported aggregation: '%s'", a) +} + +type TelemetryConfig struct { + Logs TelemetryLogsConfig `mapstructure:"logs"` +} + +type TelemetryLogsConfig struct { + Query bool `mapstructure:"query"` +} diff --git a/internal/sqlquery/db_client.go b/internal/sqlquery/db_client.go new file mode 100644 index 000000000000..9f7d00908f0f --- /dev/null +++ b/internal/sqlquery/db_client.go @@ -0,0 +1,93 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" + +import ( + "context" + + // register Db drivers + _ "github.com/SAP/go-hdb/driver" + _ "github.com/go-sql-driver/mysql" + _ "github.com/lib/pq" + _ "github.com/microsoft/go-mssqldb" + _ "github.com/microsoft/go-mssqldb/integratedauth/krb5" + _ "github.com/sijms/go-ora/v2" + _ "github.com/snowflakedb/gosnowflake" + "go.uber.org/multierr" + "go.uber.org/zap" +) + +type StringMap map[string]string + +type DbClient interface { + QueryRows(ctx context.Context, args ...any) ([]StringMap, error) +} + +type DbSQLClient struct { + Db Db + Logger *zap.Logger + Telemetry TelemetryConfig + SQL string +} + +func NewDbClient(db Db, sql string, logger *zap.Logger, telemetry TelemetryConfig) DbClient { + return DbSQLClient{ + Db: db, + SQL: sql, + Logger: logger, + Telemetry: telemetry, + } +} + +func (cl DbSQLClient) QueryRows(ctx context.Context, args ...any) ([]StringMap, error) { + cl.Logger.Debug("Running query", cl.prepareQueryFields(cl.SQL, args)...) + sqlRows, err := cl.Db.QueryContext(ctx, cl.SQL, args...) + if err != nil { + return nil, err + } + var out []StringMap + colTypes, err := sqlRows.ColumnTypes() + if err != nil { + return nil, err + } + scanner := newRowScanner(colTypes) + var warnings error + for sqlRows.Next() { + err = scanner.scan(sqlRows) + if err != nil { + return nil, err + } + sm, scanErr := scanner.toStringMap() + if scanErr != nil { + warnings = multierr.Append(warnings, scanErr) + } + out = append(out, sm) + } + return out, warnings +} + +func (cl DbSQLClient) prepareQueryFields(sql string, args []any) []zap.Field { + var logFields []zap.Field + if cl.Telemetry.Logs.Query { + logFields = append(logFields, zap.String("query", sql)) + logFields = append(logFields, zap.Any("parameters", args)) + } + return logFields +} + +// This is only used for testing, but need to be exposed to other packages. +type FakeDBClient struct { + RequestCounter int + StringMaps [][]StringMap + Err error +} + +func (c *FakeDBClient) QueryRows(context.Context, ...any) ([]StringMap, error) { + if c.Err != nil { + return nil, c.Err + } + idx := c.RequestCounter + c.RequestCounter++ + return c.StringMaps[idx], nil +} diff --git a/receiver/sqlqueryreceiver/db_client_test.go b/internal/sqlquery/db_client_test.go similarity index 72% rename from receiver/sqlqueryreceiver/db_client_test.go rename to internal/sqlquery/db_client_test.go index 4fb591c68be4..a40ebd02e31f 100644 --- a/receiver/sqlqueryreceiver/db_client_test.go +++ b/internal/sqlquery/db_client_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package sqlqueryreceiver +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" import ( "context" @@ -16,12 +16,12 @@ import ( ) func TestDBSQLClient_SingleRow(t *testing.T) { - cl := dbSQLClient{ - db: fakeDB{rowVals: [][]any{{42, 123.4, "hello", true, []uint8{52, 46, 49}}}}, - logger: zap.NewNop(), - sql: "", + cl := DbSQLClient{ + Db: fakeDB{rowVals: [][]any{{42, 123.4, "hello", true, []uint8{52, 46, 49}}}}, + Logger: zap.NewNop(), + SQL: "", } - rows, err := cl.queryRows(context.Background()) + rows, err := cl.QueryRows(context.Background()) require.NoError(t, err) assert.Len(t, rows, 1) assert.EqualValues(t, map[string]string{ @@ -34,15 +34,15 @@ func TestDBSQLClient_SingleRow(t *testing.T) { } func TestDBSQLClient_MultiRow(t *testing.T) { - cl := dbSQLClient{ - db: fakeDB{rowVals: [][]any{ + cl := DbSQLClient{ + Db: fakeDB{rowVals: [][]any{ {42, 123.4, "hello", true, []uint8{52, 46, 49}}, {43, 123.5, "goodbye", false, []uint8{52, 46, 50}}, }}, - logger: zap.NewNop(), - sql: "", + Logger: zap.NewNop(), + SQL: "", } - rows, err := cl.queryRows(context.Background()) + rows, err := cl.QueryRows(context.Background()) require.NoError(t, err) assert.Len(t, rows, 2) assert.EqualValues(t, map[string]string{ @@ -62,14 +62,14 @@ func TestDBSQLClient_MultiRow(t *testing.T) { } func TestDBSQLClient_Nulls(t *testing.T) { - cl := dbSQLClient{ - db: fakeDB{rowVals: [][]any{ + cl := DbSQLClient{ + Db: fakeDB{rowVals: [][]any{ {42, nil, 111}, // NULLs from the DB map to nil here }}, - logger: zap.NewNop(), - sql: "", + Logger: zap.NewNop(), + SQL: "", } - rows, err := cl.queryRows(context.Background()) + rows, err := cl.QueryRows(context.Background()) assert.Error(t, err) assert.True(t, errors.Is(err, errNullValueWarning)) assert.Len(t, rows, 1) @@ -80,15 +80,15 @@ func TestDBSQLClient_Nulls(t *testing.T) { } func TestDBSQLClient_Nulls_MultiRow(t *testing.T) { - cl := dbSQLClient{ - db: fakeDB{rowVals: [][]any{ + cl := DbSQLClient{ + Db: fakeDB{rowVals: [][]any{ {42, nil}, {43, nil}, }}, - logger: zap.NewNop(), - sql: "", + Logger: zap.NewNop(), + SQL: "", } - rows, err := cl.queryRows(context.Background()) + rows, err := cl.QueryRows(context.Background()) assert.Error(t, err) errs := multierr.Errors(err) for _, err := range errs { @@ -145,18 +145,3 @@ type fakeCol struct { func (c fakeCol) Name() string { return c.name } - -type fakeDBClient struct { - requestCounter int - stringMaps [][]stringMap - err error -} - -func (c *fakeDBClient) queryRows(context.Context, ...any) ([]stringMap, error) { - if c.err != nil { - return nil, c.err - } - idx := c.requestCounter - c.requestCounter++ - return c.stringMaps[idx], nil -} diff --git a/receiver/sqlqueryreceiver/db_wrappers.go b/internal/sqlquery/db_wrappers.go similarity index 73% rename from receiver/sqlqueryreceiver/db_wrappers.go rename to internal/sqlquery/db_wrappers.go index 5c8d88073afd..a8b788c82dd8 100644 --- a/receiver/sqlqueryreceiver/db_wrappers.go +++ b/internal/sqlquery/db_wrappers.go @@ -1,16 +1,16 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package sqlqueryreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver" +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" import ( "context" "database/sql" ) -// These are wrappers and interfaces around sql.DB so that it can be swapped out for testing. +// These are wrappers and interfaces around SQL.DB so that it can be swapped out for testing. -type db interface { +type Db interface { QueryContext(ctx context.Context, query string, args ...any) (rows, error) } @@ -24,12 +24,12 @@ type colType interface { Name() string } -type dbWrapper struct { - db *sql.DB +type DbWrapper struct { + Db *sql.DB } -func (d dbWrapper) QueryContext(ctx context.Context, query string, args ...any) (rows, error) { - rows, err := d.db.QueryContext(ctx, query, args...) +func (d DbWrapper) QueryContext(ctx context.Context, query string, args ...any) (rows, error) { + rows, err := d.Db.QueryContext(ctx, query, args...) return rowsWrapper{rows}, err } diff --git a/internal/sqlquery/go.mod b/internal/sqlquery/go.mod new file mode 100644 index 000000000000..6f6f9b313482 --- /dev/null +++ b/internal/sqlquery/go.mod @@ -0,0 +1,111 @@ +module github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery + +go 1.20 + +require ( + github.com/SAP/go-hdb v1.7.7 + github.com/go-sql-driver/mysql v1.7.1 + github.com/lib/pq v1.10.9 + github.com/microsoft/go-mssqldb v1.6.0 + github.com/sijms/go-ora/v2 v2.8.6 + github.com/snowflakedb/gosnowflake v1.7.2 + github.com/stretchr/testify v1.8.4 + go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f + go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5 + go.opentelemetry.io/collector/receiver v0.93.1-0.20240130182548-89388addcc7f + go.uber.org/multierr v1.11.0 + go.uber.org/zap v1.26.0 +) + +require ( + github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect + github.com/99designs/keyring v1.2.2 // indirect + github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 // indirect + github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 // indirect + github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0 // indirect + github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect + github.com/apache/arrow/go/v14 v14.0.2 // indirect + github.com/aws/aws-sdk-go-v2 v1.17.7 // indirect + github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.13.18 // indirect + github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25 // indirect + github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0 // indirect + github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0 // indirect + github.com/aws/smithy-go v1.13.5 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/danieljoos/wincred v1.1.2 // indirect + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/dvsekhvalnov/jose2go v1.6.0 // indirect + github.com/form3tech-oss/jwt-go v3.2.5+incompatible // indirect + github.com/gabriel-vasile/mimetype v1.4.2 // indirect + github.com/go-logr/logr v1.4.1 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/goccy/go-json v0.10.2 // indirect + github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect + github.com/gogo/protobuf v1.3.2 // indirect + github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect + github.com/golang-sql/sqlexp v0.1.0 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/flatbuffers v23.5.26+incompatible // indirect + github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect + github.com/hashicorp/go-uuid v1.0.3 // indirect + github.com/jcmturner/aescts/v2 v2.0.0 // indirect + github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect + github.com/jcmturner/gofork v1.7.6 // indirect + github.com/jcmturner/goidentity/v6 v6.0.1 // indirect + github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect + github.com/jcmturner/rpc/v2 v2.0.3 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/json-iterator/go v1.1.12 // indirect + github.com/klauspost/compress v1.16.7 // indirect + github.com/klauspost/cpuid/v2 v2.2.5 // indirect + github.com/knadh/koanf/maps v0.1.1 // indirect + github.com/knadh/koanf/providers/confmap v0.1.0 // indirect + github.com/knadh/koanf/v2 v2.0.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // 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/mtibben/percent v0.2.1 // indirect + github.com/pierrec/lz4/v4 v4.1.18 // indirect + github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prometheus/client_golang v1.18.0 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.46.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect + github.com/sirupsen/logrus v1.9.0 // indirect + github.com/zeebo/xxh3 v1.0.2 // indirect + go.opentelemetry.io/collector v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/collector/consumer v0.93.1-0.20240130182548-89388addcc7f // indirect + go.opentelemetry.io/otel v1.22.0 // indirect + go.opentelemetry.io/otel/exporters/prometheus v0.45.0 // indirect + go.opentelemetry.io/otel/metric v1.22.0 // indirect + go.opentelemetry.io/otel/sdk v1.22.0 // indirect + go.opentelemetry.io/otel/sdk/metric v1.22.0 // indirect + go.opentelemetry.io/otel/trace v1.22.0 // indirect + golang.org/x/crypto v0.18.0 // indirect + golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect + golang.org/x/mod v0.14.0 // indirect + golang.org/x/net v0.20.0 // indirect + golang.org/x/sync v0.6.0 // indirect + golang.org/x/sys v0.16.0 // indirect + golang.org/x/term v0.16.0 // indirect + golang.org/x/text v0.14.0 // indirect + golang.org/x/tools v0.17.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 // indirect + google.golang.org/grpc v1.61.0 // indirect + google.golang.org/protobuf v1.32.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/internal/sqlquery/go.sum b/internal/sqlquery/go.sum new file mode 100644 index 000000000000..554cdd09e397 --- /dev/null +++ b/internal/sqlquery/go.sum @@ -0,0 +1,321 @@ +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= +github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= +github.com/99designs/keyring v1.2.2 h1:pZd3neh/EmUzWONb35LxQfvuY7kiSXAq3HQd97+XBn0= +github.com/99designs/keyring v1.2.2/go.mod h1:wes/FrByc8j7lFOAGLGSNEg8f/PaI3cgTBqhFkHUrPk= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1 h1:/iHxaJhsFr0+xVFfbMr5vxz848jyiWuIEDhYq3y5odY= +github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.1/go.mod h1:bjGvMhVMb+EEm3VRNQawDMUyMMjo+S5ewNjflkep/0Q= +github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 h1:vcYCAze6p19qBW7MhZybIsqD8sMV8js0NyQM8JDnVtg= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0 h1:sXr+ck84g/ZlZUOZiNELInmMgOsuGwdjjVkEIde0OtY= +github.com/Azure/azure-sdk-for-go/sdk/internal v1.3.0/go.mod h1:okt5dMMTOFjX/aovMlrjvvXoPMBVSPzk9185BT0+eZM= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.0.0 h1:yfJe15aSwEQ6Oo6J+gdfdulPNoZ3TEhmbhLIoxZcA+U= +github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/internal v0.8.0 h1:T028gtTPiYt/RMUfs8nVsAL7FDQrfLlrm/NnRG/zcC4= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0 h1:u/LLAOFgsMv7HmNL4Qufg58y+qElGOt5qv0z1mURkRY= +github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v1.0.0/go.mod h1:2e8rMJtl2+2j+HXbTBwnyGpm5Nou7KhvSfxOq8JpTag= +github.com/AzureAD/microsoft-authentication-library-for-go v1.1.0 h1:HCc0+LpPfpCKs6LGGLAhwBARt9632unrVcI6i8s/8os= +github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c h1:RGWPOewvKIROun94nF7v2cua9qP+thov/7M50KEoeSU= +github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c/go.mod h1:X0CRv0ky0k6m906ixxpzmDRLvX58TFUKS2eePweuyxk= +github.com/SAP/go-hdb v1.7.7 h1:yA/KE5ozzHfPrPlOf7yAPUwbFGrJXBcdnBkQwUKG/VE= +github.com/SAP/go-hdb v1.7.7/go.mod h1:P56UwOZO7QpDS0wyEWFPSxtyjwwbFBs3eFuOU/TSCvk= +github.com/apache/arrow/go/v14 v14.0.2 h1:N8OkaJEOfI3mEZt07BIkvo4sC6XDbL+48MBPWO5IONw= +github.com/apache/arrow/go/v14 v14.0.2/go.mod h1:u3fgh3EdgN/YQ8cVQRguVW3R+seMybFg8QBQ5LU+eBY= +github.com/aws/aws-sdk-go-v2 v1.17.7 h1:CLSjnhJSTSogvqUGhIC6LqFKATMRexcxLZ0i/Nzk9Eg= +github.com/aws/aws-sdk-go-v2 v1.17.7/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs= +github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno= +github.com/aws/aws-sdk-go-v2/config v1.18.19 h1:AqFK6zFNtq4i1EYu+eC7lcKHYnZagMn6SW171la0bGw= +github.com/aws/aws-sdk-go-v2/config v1.18.19/go.mod h1:XvTmGMY8d52ougvakOv1RpiTLPz9dlG/OQHsKU/cMmY= +github.com/aws/aws-sdk-go-v2/credentials v1.13.18 h1:EQMdtHwz0ILTW1hoP+EwuWhwCG1hD6l3+RWFQABET4c= +github.com/aws/aws-sdk-go-v2/credentials v1.13.18/go.mod h1:vnwlwjIe+3XJPBYKu1et30ZPABG3VaXJYr8ryohpIyM= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.1 h1:gt57MN3liKiyGopcqgNzJb2+d9MJaKT/q1OksHNXVE4= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.1/go.mod h1:lfUx8puBRdM5lVVMQlwt2v+ofiG/X6Ms+dy0UkG/kXw= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59 h1:E3Y+OfzOK1+rmRo/K2G0ml8Vs+Xqk0kOnf4nS0kUtBc= +github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.59/go.mod h1:1M4PLSBUVfBI0aP+C9XI7SM6kZPCGYyI6izWz0TGprE= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31 h1:sJLYcS+eZn5EeNINGHSCRAwUJMFVqklwkH36Vbyai7M= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.31/go.mod h1:QT0BqUvX1Bh2ABdTGnjqEjvjzrCfIniM9Sc8zn9Yndo= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25 h1:1mnRASEKnkqsntcxHaysxwgVoUUp5dkiB+l3llKnqyg= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.25/go.mod h1:zBHOPwhBc3FlQjQJE/D3IfPWiWaQmT06Vq9aNukDo0k= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.32 h1:p5luUImdIqywn6JpQsW3tq5GNOxKmOnEpybzPx+d1lk= +github.com/aws/aws-sdk-go-v2/internal/ini v1.3.32/go.mod h1:XGhIBZDEgfqmFIugclZ6FU7v75nHhBDtzuB4xB/tEi4= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23 h1:DWYZIsyqagnWL00f8M/SOr9fN063OEQWn9LLTbdYXsk= +github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.23/go.mod h1:uIiFgURZbACBEQJfqTZPb/jxO7R+9LeoHUFudtIdeQI= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 h1:y2+VQzC6Zh2ojtV2LoC0MNwHWc6qXv/j2vrQtlftkdA= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26 h1:CeuSeq/8FnYpPtnuIeLQEEvDv9zUjneuYi8EghMBdwQ= +github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.26/go.mod h1:2UqAAwMUXKeRkAHIlDJqvMVgOWkUi/AUXPk/YIe+Dg4= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25 h1:5LHn8JQ0qvjD9L9JhMtylnkcw7j05GDZqM9Oin6hpr0= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.25/go.mod h1:/95IA+0lMnzW6XzqYJRpjjsAbKEORVeO0anQqjd2CNU= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0 h1:e2ooMhpYGhDnBfSvIyusvAwX7KexuZaHbQY2Dyei7VU= +github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.0/go.mod h1:bh2E0CXKZsQN+faiKVqC40vfNMAWheoULBCnEgO9K+8= +github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0 h1:B1G2pSPvbAtQjilPq+Y7jLIzCOwKzuVEl+aBBaNG0AQ= +github.com/aws/aws-sdk-go-v2/service/s3 v1.31.0/go.mod h1:ncltU6n4Nof5uJttDtcNQ537uNuwYqsZZQcpkd2/GUQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.6 h1:5V7DWLBd7wTELVz5bPpwzYy/sikk0gsgZfj40X+l5OI= +github.com/aws/aws-sdk-go-v2/service/sso v1.12.6/go.mod h1:Y1VOmit/Fn6Tz1uFAeCO6Q7M2fmfXSCLeL5INVYsLuY= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.6 h1:B8cauxOH1W1v7rd8RdI/MWnoR4Ze0wIHWrb90qczxj4= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.6/go.mod h1:Lh/bc9XUf8CfOY6Jp5aIkQtN+j1mc+nExc+KXj9jx2s= +github.com/aws/aws-sdk-go-v2/service/sts v1.18.7 h1:bWNgNdRko2x6gqa0blfATqAZKZokPIeM1vfmQt2pnvM= +github.com/aws/aws-sdk-go-v2/service/sts v1.18.7/go.mod h1:JuTnSoeePXmMVe9G8NcjjwgOKEfZ4cOjMuT2IBT/2eI= +github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= +github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= +github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= +github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= +github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= +github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= +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/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= +github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= +github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= +github.com/form3tech-oss/jwt-go v3.2.5+incompatible h1:/l4kBbb4/vGSsdtB5nUe8L7B9mImVMaBPw9L/0TBHU8= +github.com/form3tech-oss/jwt-go v3.2.5+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= +github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU= +github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA= +github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= +github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= +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-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= +github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= +github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU= +github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= +github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +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 v3.2.1+incompatible h1:73Z+4BJcrTC+KczS6WvTPvRGOp1WmfEP4Q1lOd9Z/+c= +github.com/golang-jwt/jwt/v5 v5.0.0 h1:1n1XNM9hk7O9mnQoNBGolZvzebBQ7p93ULHRc28XJUE= +github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 h1:au07oEsX2xN0ktxqI+Sida1w446QrXBRJ0nee3SNZlA= +github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= +github.com/golang-sql/sqlexp v0.1.0 h1:ZCD6MBpcuOVfGVqsEmY5/4FtYiKz6tSyUv9LPEDei6A= +github.com/golang-sql/sqlexp v0.1.0/go.mod h1:J4ad9Vo8ZCWQ2GMrC4UCQy1JpCbwU9m3EOqtpKwwwHI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= +github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/flatbuffers v23.5.26+incompatible h1:M9dgRyhJemaM4Sw8+66GHBu8ioaQmyPLg1b8VwK5WJg= +github.com/google/flatbuffers v23.5.26+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/uuid v1.4.0 h1:MtMxsa51/r9yyhkyLsVeVt0B+BGQZzpQiTQ4eHZ8bc4= +github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU= +github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0= +github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= +github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= +github.com/jcmturner/aescts/v2 v2.0.0/go.mod h1:AiaICIRyfYg35RUkr8yESTqvSy7csK90qZ5xfvvsoNs= +github.com/jcmturner/dnsutils/v2 v2.0.0 h1:lltnkeZGL0wILNvrNiVCR6Ro5PGU/SeBvVO/8c/iPbo= +github.com/jcmturner/dnsutils/v2 v2.0.0/go.mod h1:b0TnjGOvI/n42bZa+hmXL+kFJZsFT7G4t3HTlQ184QM= +github.com/jcmturner/gofork v1.7.6 h1:QH0l3hzAU1tfT3rZCnW5zXl+orbkNMMRGJfdJjHVETg= +github.com/jcmturner/gofork v1.7.6/go.mod h1:1622LH6i/EZqLloHfE7IeZ0uEJwMSUyQ/nDd82IeqRo= +github.com/jcmturner/goidentity/v6 v6.0.1 h1:VKnZd2oEIMorCTsFBnJWbExfNN7yZr3EhJAxwOkZg6o= +github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxyjn/mY9zx4tFonSg= +github.com/jcmturner/gokrb5/v8 v8.4.4 h1:x1Sv4HaTpepFkXbt2IkL29DXRf8sOfZXo8eRKh687T8= +github.com/jcmturner/gokrb5/v8 v8.4.4/go.mod h1:1btQEpgT6k+unzCwX1KdWMEwPPkkgBtP+F6aCACiMrs= +github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= +github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= +github.com/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/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/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= +github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg= +github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws= +github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= +github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= +github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= +github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= +github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= +github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +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/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= +github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw= +github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/microsoft/go-mssqldb v1.6.0 h1:mM3gYdVwEPFrlg/Dvr2DNVEgYFG7L42l+dGc67NNNpc= +github.com/microsoft/go-mssqldb v1.6.0/go.mod h1:00mDtPbeQCRGC1HwOOR5K/gr30P1NcEG0vx6Kbv2aJU= +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/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= +github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +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/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= +github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= +github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= +github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= +github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= +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/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= +github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= +github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= +github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= +github.com/sijms/go-ora/v2 v2.8.6 h1:sq907Z5cno0YIXidOYM85tiQFFVhhgssw09IJPG0WG4= +github.com/sijms/go-ora/v2 v2.8.6/go.mod h1:EHxlY6x7y9HAsdfumurRfTd+v8NrEOTR3Xl4FWlH6xk= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= +github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= +github.com/snowflakedb/gosnowflake v1.7.2 h1:HRSwva8YXC64WUppfmHcMNVVzSE1+EwXXaJxgS0EkTo= +github.com/snowflakedb/gosnowflake v1.7.2/go.mod h1:03tW856vc3ceM4rJuj7KO4dzqN7qoezTm+xw7aPIIFo= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +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.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.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= +github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +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.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= +github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= +github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= +go.opentelemetry.io/collector v0.93.1-0.20240130182548-89388addcc7f h1:NgQcLNPP/6YnIfNUkDkKu1uiRTXUa9kMtfpsKSVC4dY= +go.opentelemetry.io/collector v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:rEqeAsOy8Mu6HA6oMjGk7NrTb7958XmShSaapxFEeTs= +go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f h1:DNFOx9vwV7g+lWz9htP/Biiwwp+oFifR+J2zKnQKV3U= +go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:jOHaBlhWt4aarDS6w9A9GcgGCxrtEg+8LnBK7Y/6zqo= +go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f h1:S1mp1jVnxg0tyy7uFEMHDFRqI4AiqqE/ia8RPj3SKW0= +go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:2XLhyR/GVpWeZ2K044vCmrvH/d4Ewt0aD/y46avZyMU= +go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f h1:HIvqzK7ANxcVRhtJ/zUm+ZWGHlGo7TClqcaNMwQgzHs= +go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:KjHrfxKKojaLDc9zDPfVuyp8765AH+XfcoPWMLMiuHU= +go.opentelemetry.io/collector/consumer v0.93.1-0.20240130182548-89388addcc7f h1:xtOtkpXNP7x+CmP5hpIVNOkfPUQQbWlsjSNUUlczfrE= +go.opentelemetry.io/collector/consumer v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:RhC4X/bSMIENk68hzFS9i6I7DVsZSfF/S7JvfaqZkkI= +go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5 h1:cMc7sJ29OzK5jZqr6XFzKxiJvlypR/zt2TDhPDqpBic= +go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5/go.mod h1:IDkDj+B4Fp4wWOclBELN97zcb98HugJ8Q2gA4ZFsN8Q= +go.opentelemetry.io/collector/receiver v0.93.1-0.20240130182548-89388addcc7f h1:2C2QYMLF6YrRJPT/9LhRmfJ0wwF8nt4LjBblBCEJZtM= +go.opentelemetry.io/collector/receiver v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:bPAxjHDsXFJZKPAturS7Ar5DDY/HJz5sj73E72vSVqk= +go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= +go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= +go.opentelemetry.io/otel/exporters/prometheus v0.45.0 h1:BeIK2KGho0oCWa7LxEGSqfDZbs7Fpv/Viz+FS4P8CXE= +go.opentelemetry.io/otel/exporters/prometheus v0.45.0/go.mod h1:UVJZPLnfDSvHj+eJuZE+E1GjIBD267mEMfAAHJdghWg= +go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= +go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= +go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= +go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= +go.opentelemetry.io/otel/sdk/metric v1.22.0 h1:ARrRetm1HCVxq0cbnaZQlfwODYJHo3gFL8Z3tSmHBcI= +go.opentelemetry.io/otel/sdk/metric v1.22.0/go.mod h1:KjQGeMIDlBNEOo6HvjhxIec1p/69/kULDcp4gr0oLQQ= +go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= +go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= +go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= +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/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= +golang.org/x/crypto v0.18.0 h1:PGVlW0xEltQnzFZ55hkuX5+KLyrMYhHld1YHO4AKcdc= +golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a h1:Q8/wZp0KX97QFTc2ywcOE0YRjZPVIx+MXInMzdvQqcA= +golang.org/x/exp v0.0.0-20240119083558-1b970713d09a/go.mod h1:idGWGoKP1toJGkd5/ig9ZLuPcZBC3ewk7SzmH0uou08= +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.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0= +golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +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-20200114155413-6afb5195e5aa/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-20201021035429-f5854403a974/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-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= +golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= +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-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/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-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= +golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +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/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.16.0 h1:m+B6fahuftsE9qjo0VWp2FW0mB3MTJvR0BaMQrq0pmE= +golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +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-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.17.0 h1:FvmRgNOcs3kOa+T20R1uhfP9F6HgG2mfxDv1vrx1Htc= +golang.org/x/tools v0.17.0/go.mod h1:xsh6VxdV005rRVaS6SSAf9oiAqljS7UZUacMZ8Bnsps= +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-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17 h1:Jyp0Hsi0bmHXG6k9eATXoYtjd6e2UzZ1SCn/wIupY14= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:oQ5rr10WTTMvP4A36n8JpR1OrO1BEiV4f78CneXZxkA= +google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= +google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= +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.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= +google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/yaml.v2 v2.2.2/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.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/internal/sqlquery/metadata.yaml b/internal/sqlquery/metadata.yaml new file mode 100644 index 000000000000..eab1270e4726 --- /dev/null +++ b/internal/sqlquery/metadata.yaml @@ -0,0 +1,3 @@ +status: + codeowners: + active: [crobert-1, dmitryax] diff --git a/receiver/sqlqueryreceiver/metrics.go b/internal/sqlquery/metrics.go similarity index 95% rename from receiver/sqlqueryreceiver/metrics.go rename to internal/sqlquery/metrics.go index 52799c67bdb7..4a00e3b6269d 100644 --- a/receiver/sqlqueryreceiver/metrics.go +++ b/internal/sqlquery/metrics.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package sqlqueryreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver" +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" import ( "fmt" @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/collector/receiver/scraperhelper" ) -func rowToMetric(row stringMap, cfg MetricCfg, dest pmetric.Metric, startTime pcommon.Timestamp, ts pcommon.Timestamp, scrapeCfg scraperhelper.ScraperControllerSettings) error { +func rowToMetric(row StringMap, cfg MetricCfg, dest pmetric.Metric, startTime pcommon.Timestamp, ts pcommon.Timestamp, scrapeCfg scraperhelper.ScraperControllerSettings) error { dest.SetName(cfg.MetricName) dest.SetDescription(cfg.Description) dest.SetUnit(cfg.Unit) diff --git a/receiver/sqlqueryreceiver/metrics_test.go b/internal/sqlquery/metrics_test.go similarity index 82% rename from receiver/sqlqueryreceiver/metrics_test.go rename to internal/sqlquery/metrics_test.go index 2af66008a435..d5d46746a9ea 100644 --- a/receiver/sqlqueryreceiver/metrics_test.go +++ b/internal/sqlquery/metrics_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package sqlqueryreceiver +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" import ( "testing" diff --git a/receiver/sqlqueryreceiver/row_scanner.go b/internal/sqlquery/row_scanner.go similarity index 88% rename from receiver/sqlqueryreceiver/row_scanner.go rename to internal/sqlquery/row_scanner.go index 99c71ac0299a..9ed0711dc97e 100644 --- a/receiver/sqlqueryreceiver/row_scanner.go +++ b/internal/sqlquery/row_scanner.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package sqlqueryreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver" +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" import ( "errors" @@ -52,8 +52,8 @@ func (rs *rowScanner) scan(sqlRows rows) error { return sqlRows.Scan(rs.scanTarget...) } -func (rs *rowScanner) toStringMap() (stringMap, error) { - out := stringMap{} +func (rs *rowScanner) toStringMap() (StringMap, error) { + out := StringMap{} var errs error for k, f := range rs.cols { s, err := f() diff --git a/internal/sqlquery/scraper.go b/internal/sqlquery/scraper.go new file mode 100644 index 000000000000..e43edf4aea34 --- /dev/null +++ b/internal/sqlquery/scraper.go @@ -0,0 +1,107 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" + +import ( + "context" + "database/sql" + "errors" + "fmt" + "time" + + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/pcommon" + "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver/scrapererror" + "go.opentelemetry.io/collector/receiver/scraperhelper" + "go.uber.org/multierr" + "go.uber.org/zap" +) + +type SQLOpenerFunc func(driverName, dataSourceName string) (*sql.DB, error) + +type DbProviderFunc func() (*sql.DB, error) + +type ClientProviderFunc func(Db, string, *zap.Logger, TelemetryConfig) DbClient + +type Scraper struct { + id component.ID + Query Query + ScrapeCfg scraperhelper.ScraperControllerSettings + StartTime pcommon.Timestamp + ClientProviderFunc ClientProviderFunc + DbProviderFunc DbProviderFunc + Logger *zap.Logger + Telemetry TelemetryConfig + Client DbClient + Db *sql.DB +} + +var _ scraperhelper.Scraper = (*Scraper)(nil) + +func NewScraper(id component.ID, query Query, scrapeCfg scraperhelper.ScraperControllerSettings, logger *zap.Logger, telemetry TelemetryConfig, dbProviderFunc DbProviderFunc, clientProviderFunc ClientProviderFunc) *Scraper { + return &Scraper{ + id: id, + Query: query, + ScrapeCfg: scrapeCfg, + Logger: logger, + Telemetry: telemetry, + DbProviderFunc: dbProviderFunc, + ClientProviderFunc: clientProviderFunc, + } +} + +func (s *Scraper) ID() component.ID { + return s.id +} + +func (s *Scraper) Start(context.Context, component.Host) error { + var err error + s.Db, err = s.DbProviderFunc() + if err != nil { + return fmt.Errorf("failed to open Db connection: %w", err) + } + s.Client = s.ClientProviderFunc(DbWrapper{s.Db}, s.Query.SQL, s.Logger, s.Telemetry) + s.StartTime = pcommon.NewTimestampFromTime(time.Now()) + + return nil +} + +func (s *Scraper) Scrape(ctx context.Context) (pmetric.Metrics, error) { + out := pmetric.NewMetrics() + rows, err := s.Client.QueryRows(ctx) + if err != nil { + if errors.Is(err, errNullValueWarning) { + s.Logger.Warn("problems encountered getting metric rows", zap.Error(err)) + } else { + return out, fmt.Errorf("Scraper: %w", err) + } + } + ts := pcommon.NewTimestampFromTime(time.Now()) + rms := out.ResourceMetrics() + rm := rms.AppendEmpty() + sms := rm.ScopeMetrics() + sm := sms.AppendEmpty() + ms := sm.Metrics() + var errs error + for _, metricCfg := range s.Query.Metrics { + for i, row := range rows { + if err = rowToMetric(row, metricCfg, ms.AppendEmpty(), s.StartTime, ts, s.ScrapeCfg); err != nil { + err = fmt.Errorf("row %d: %w", i, err) + errs = multierr.Append(errs, err) + } + } + } + if errs != nil { + return out, scrapererror.NewPartialScrapeError(errs, len(multierr.Errors(errs))) + } + return out, nil +} + +func (s *Scraper) Shutdown(_ context.Context) error { + if s.Db != nil { + return s.Db.Close() + } + return nil +} diff --git a/receiver/sqlqueryreceiver/scraper_test.go b/internal/sqlquery/scraper_test.go similarity index 83% rename from receiver/sqlqueryreceiver/scraper_test.go rename to internal/sqlquery/scraper_test.go index fc43e545b7e4..e4567a189459 100644 --- a/receiver/sqlqueryreceiver/scraper_test.go +++ b/internal/sqlquery/scraper_test.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package sqlqueryreceiver +package sqlquery // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" import ( "context" @@ -19,8 +19,8 @@ import ( ) func TestScraper_ErrorOnStart(t *testing.T) { - scrpr := scraper{ - dbProviderFunc: func() (*sql.DB, error) { + scrpr := Scraper{ + DbProviderFunc: func() (*sql.DB, error) { return nil, errors.New("oops") }, } @@ -29,25 +29,25 @@ func TestScraper_ErrorOnStart(t *testing.T) { } func TestScraper_ClientErrorOnScrape(t *testing.T) { - client := &fakeDBClient{ - err: errors.New("oops"), + client := &FakeDBClient{ + Err: errors.New("oops"), } - scrpr := scraper{ - client: client, + scrpr := Scraper{ + Client: client, } _, err := scrpr.Scrape(context.Background()) require.Error(t, err) } func TestScraper_RowToMetricErrorOnScrape_Float(t *testing.T) { - client := &fakeDBClient{ - stringMaps: [][]stringMap{ + client := &FakeDBClient{ + StringMaps: [][]StringMap{ {{"myfloat": "blah"}}, }, } - scrpr := scraper{ - client: client, - query: Query{ + scrpr := Scraper{ + Client: client, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "my.float", ValueColumn: "myfloat", @@ -62,14 +62,14 @@ func TestScraper_RowToMetricErrorOnScrape_Float(t *testing.T) { } func TestScraper_RowToMetricErrorOnScrape_Int(t *testing.T) { - client := &fakeDBClient{ - stringMaps: [][]stringMap{ + client := &FakeDBClient{ + StringMaps: [][]StringMap{ {{"myint": "blah"}}, }, } - scrpr := scraper{ - client: client, - query: Query{ + scrpr := Scraper{ + Client: client, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "my.int", ValueColumn: "myint", @@ -84,15 +84,15 @@ func TestScraper_RowToMetricErrorOnScrape_Int(t *testing.T) { } func TestScraper_RowToMetricMultiErrorsOnScrape(t *testing.T) { - client := &fakeDBClient{ - stringMaps: [][]stringMap{{ + client := &FakeDBClient{ + StringMaps: [][]StringMap{{ {"myint": "foo"}, {"myint": "bar"}, }}, } - scrpr := scraper{ - client: client, - query: Query{ + scrpr := Scraper{ + Client: client, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "my.col", ValueColumn: "mycol", @@ -107,15 +107,15 @@ func TestScraper_RowToMetricMultiErrorsOnScrape(t *testing.T) { } func TestScraper_SingleRow_MultiMetrics(t *testing.T) { - scrpr := scraper{ - client: &fakeDBClient{ - stringMaps: [][]stringMap{{{ + scrpr := Scraper{ + Client: &FakeDBClient{ + StringMaps: [][]StringMap{{{ "count": "42", "foo_name": "baz", "bar_name": "quux", }}}, }, - query: Query{ + Query: Query{ Metrics: []MetricCfg{ { MetricName: "my.metric.1", @@ -178,8 +178,8 @@ func TestScraper_SingleRow_MultiMetrics(t *testing.T) { } func TestScraper_MultiRow(t *testing.T) { - client := &fakeDBClient{ - stringMaps: [][]stringMap{{ + client := &FakeDBClient{ + StringMaps: [][]StringMap{{ { "count": "42", "genre": "action", @@ -190,9 +190,9 @@ func TestScraper_MultiRow(t *testing.T) { }, }}, } - scrpr := scraper{ - client: client, - query: Query{ + scrpr := Scraper{ + Client: client, + Query: Query{ Metrics: []MetricCfg{ { MetricName: "movie.genre", @@ -224,15 +224,15 @@ func TestScraper_MultiRow(t *testing.T) { } func TestScraper_MultiResults_CumulativeSum(t *testing.T) { - client := &fakeDBClient{ - stringMaps: [][]stringMap{ + client := &FakeDBClient{ + StringMaps: [][]StringMap{ {{"count": "42"}}, {{"count": "43"}}, }, } - scrpr := scraper{ - client: client, - query: Query{ + scrpr := Scraper{ + Client: client, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "transaction.count", ValueColumn: "count", @@ -247,15 +247,15 @@ func TestScraper_MultiResults_CumulativeSum(t *testing.T) { } func TestScraper_MultiResults_DeltaSum(t *testing.T) { - client := &fakeDBClient{ - stringMaps: [][]stringMap{ + client := &FakeDBClient{ + StringMaps: [][]StringMap{ {{"count": "42"}}, {{"count": "43"}}, }, } - scrpr := scraper{ - client: client, - query: Query{ + scrpr := Scraper{ + Client: client, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "transaction.count", ValueColumn: "count", @@ -269,7 +269,7 @@ func TestScraper_MultiResults_DeltaSum(t *testing.T) { assertTransactionCount(t, scrpr, 43, pmetric.AggregationTemporalityDelta) } -func assertTransactionCount(t *testing.T, scrpr scraper, expected int, agg pmetric.AggregationTemporality) { +func assertTransactionCount(t *testing.T, scrpr Scraper, expected int, agg pmetric.AggregationTemporality) { metrics, err := scrpr.Scrape(context.Background()) require.NoError(t, err) metric := metrics.ResourceMetrics().At(0).ScopeMetrics().At(0).Metrics().At(0) @@ -284,14 +284,14 @@ func assertTransactionCount(t *testing.T, scrpr scraper, expected int, agg pmetr } func TestScraper_Float(t *testing.T) { - client := &fakeDBClient{ - stringMaps: [][]stringMap{ + client := &FakeDBClient{ + StringMaps: [][]StringMap{ {{"myfloat": "123.4"}}, }, } - scrpr := scraper{ - client: client, - query: Query{ + scrpr := Scraper{ + Client: client, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "my.float", ValueColumn: "myfloat", @@ -308,14 +308,14 @@ func TestScraper_Float(t *testing.T) { } func TestScraper_DescriptionAndUnit(t *testing.T) { - client := &fakeDBClient{ - stringMaps: [][]stringMap{ + client := &FakeDBClient{ + StringMaps: [][]StringMap{ {{"mycol": "123"}}, }, } - scrpr := scraper{ - client: client, - query: Query{ + scrpr := Scraper{ + Client: client, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "my.name", ValueColumn: "mycol", @@ -334,10 +334,10 @@ func TestScraper_DescriptionAndUnit(t *testing.T) { func TestScraper_FakeDB_Warnings(t *testing.T) { db := fakeDB{rowVals: [][]any{{42, nil}}} logger := zap.NewNop() - scrpr := scraper{ - client: newDbClient(db, "", logger, TelemetryConfig{}), - logger: logger, - query: Query{ + scrpr := Scraper{ + Client: NewDbClient(db, "", logger, TelemetryConfig{}), + Logger: logger, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "my.name", ValueColumn: "col_0", @@ -353,10 +353,10 @@ func TestScraper_FakeDB_Warnings(t *testing.T) { func TestScraper_FakeDB_MultiRows_Warnings(t *testing.T) { db := fakeDB{rowVals: [][]any{{42, nil}, {43, nil}}} logger := zap.NewNop() - scrpr := scraper{ - client: newDbClient(db, "", logger, TelemetryConfig{}), - logger: logger, - query: Query{ + scrpr := Scraper{ + Client: NewDbClient(db, "", logger, TelemetryConfig{}), + Logger: logger, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "my.col.0", ValueColumn: "col_0", @@ -374,10 +374,10 @@ func TestScraper_FakeDB_MultiRows_Warnings(t *testing.T) { func TestScraper_FakeDB_MultiRows_Error(t *testing.T) { db := fakeDB{rowVals: [][]any{{42, nil}, {43, nil}}} logger := zap.NewNop() - scrpr := scraper{ - client: newDbClient(db, "", logger, TelemetryConfig{}), - logger: logger, - query: Query{ + scrpr := Scraper{ + Client: NewDbClient(db, "", logger, TelemetryConfig{}), + Logger: logger, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "my.col.0", ValueColumn: "col_0", @@ -395,14 +395,14 @@ func TestScraper_FakeDB_MultiRows_Error(t *testing.T) { _, err := scrpr.Scrape(context.Background()) // We expect an error here not directly because of the NULL values but because // the column was also requested in Query.Metrics[1] but wasn't found. It's just - // a partial scrape error though so it shouldn't cause a scraper shutdown. + // a partial scrape error though so it shouldn't cause a Scraper shutdown. assert.Error(t, err) assert.True(t, scrapererror.IsPartialScrapeError(err)) } func TestScraper_StartAndTSColumn(t *testing.T) { - client := &fakeDBClient{ - stringMaps: [][]stringMap{{ + client := &FakeDBClient{ + StringMaps: [][]StringMap{{ { "mycol": "42", "StartTs": "1682417791", @@ -410,9 +410,9 @@ func TestScraper_StartAndTSColumn(t *testing.T) { }, }}, } - scrpr := scraper{ - client: client, - query: Query{ + scrpr := Scraper{ + Client: client, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "my.name", ValueColumn: "mycol", @@ -431,17 +431,17 @@ func TestScraper_StartAndTSColumn(t *testing.T) { } func TestScraper_StartAndTS_ErrorOnColumnNotFound(t *testing.T) { - client := &fakeDBClient{ - stringMaps: [][]stringMap{{ + client := &FakeDBClient{ + StringMaps: [][]StringMap{{ { "mycol": "42", "StartTs": "1682417791", }, }}, } - scrpr := scraper{ - client: client, - query: Query{ + scrpr := Scraper{ + Client: client, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "my.name", ValueColumn: "mycol", @@ -457,17 +457,17 @@ func TestScraper_StartAndTS_ErrorOnColumnNotFound(t *testing.T) { } func TestScraper_StartAndTS_ErrorOnParse(t *testing.T) { - client := &fakeDBClient{ - stringMaps: [][]stringMap{{ + client := &FakeDBClient{ + StringMaps: [][]StringMap{{ { "mycol": "42", "StartTs": "blah", }, }}, } - scrpr := scraper{ - client: client, - query: Query{ + scrpr := Scraper{ + Client: client, + Query: Query{ Metrics: []MetricCfg{{ MetricName: "my.name", ValueColumn: "mycol", diff --git a/pkg/ottl/e2e/package_test.go b/pkg/ottl/e2e/package_test.go index 92220a8e4eb5..73da050f0da9 100644 --- a/pkg/ottl/e2e/package_test.go +++ b/pkg/ottl/e2e/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/pkg/ottl/ottlfuncs/package_test.go b/pkg/ottl/ottlfuncs/package_test.go index 11c4ab0af2c9..7082a6c2353c 100644 --- a/pkg/ottl/ottlfuncs/package_test.go +++ b/pkg/ottl/ottlfuncs/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/pkg/ottl/package_test.go b/pkg/ottl/package_test.go index 1ee8866240c7..cecdd3359175 100644 --- a/pkg/ottl/package_test.go +++ b/pkg/ottl/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/pkg/stanza/docs/operators/journald_input.md b/pkg/stanza/docs/operators/journald_input.md index b4c8d358f26b..f1643d7de1b0 100644 --- a/pkg/stanza/docs/operators/journald_input.md +++ b/pkg/stanza/docs/operators/journald_input.md @@ -21,6 +21,7 @@ The `journald_input` operator will use the `__REALTIME_TIMESTAMP` field of the j | `start_at` | `end` | At startup, where to start reading logs from the file. Options are `beginning` or `end`. | | `attributes` | {} | A map of `key: value` pairs to add to the entry's attributes. | | `resource` | {} | A map of `key: value` pairs to add to the entry's resource. | +| `all` | 'false' | If `true`, very long logs and logs with unprintable characters will also be included. | ### Example Configurations diff --git a/pkg/stanza/operator/input/journald/config.go b/pkg/stanza/operator/input/journald/config.go index 7f2afec5bcac..e7af99b14f24 100644 --- a/pkg/stanza/operator/input/journald/config.go +++ b/pkg/stanza/operator/input/journald/config.go @@ -36,6 +36,7 @@ type Config struct { Identifiers []string `mapstructure:"identifiers,omitempty"` Grep string `mapstructure:"grep,omitempty"` Dmesg bool `mapstructure:"dmesg,omitempty"` + All bool `mapstructure:"all,omitempty"` } type MatchConfig map[string]string diff --git a/pkg/stanza/operator/input/journald/journald.go b/pkg/stanza/operator/input/journald/journald.go index 24a35f1d9f70..477427df7edc 100644 --- a/pkg/stanza/operator/input/journald/journald.go +++ b/pkg/stanza/operator/input/journald/journald.go @@ -113,6 +113,10 @@ func (c Config) buildArgs() ([]string, error) { args = append(args, matches...) } + if c.All { + args = append(args, "--all") + } + return args, nil } diff --git a/pkg/stanza/operator/input/journald/journald_test.go b/pkg/stanza/operator/input/journald/journald_test.go index 40650e056964..29bc15503e8b 100644 --- a/pkg/stanza/operator/input/journald/journald_test.go +++ b/pkg/stanza/operator/input/journald/journald_test.go @@ -203,6 +203,13 @@ func TestBuildConfig(t *testing.T) { }, Expected: []string{"--utc", "--output=json", "--follow", "--priority", "info", "--dmesg"}, }, + { + Name: "all", + Config: func(cfg *Config) { + cfg.All = true + }, + Expected: []string{"--utc", "--output=json", "--follow", "--priority", "info", "--all"}, + }, } for _, tt := range testCases { diff --git a/pkg/stanza/operator/transformer/recombine/recombine.go b/pkg/stanza/operator/transformer/recombine/recombine.go index 429ac1f9d03f..7580f8c87055 100644 --- a/pkg/stanza/operator/transformer/recombine/recombine.go +++ b/pkg/stanza/operator/transformer/recombine/recombine.go @@ -117,7 +117,6 @@ func (c *Config) Build(logger *zap.SugaredLogger) (operator.Operator, error) { batchPool: sync.Pool{ New: func() any { return &sourceBatch{ - entries: []*entry.Entry{}, recombined: &bytes.Buffer{}, } }, @@ -156,7 +155,8 @@ type Transformer struct { // sourceBatch contains the status info of a batch type sourceBatch struct { - entries []*entry.Entry + baseEntry *entry.Entry + numEntries int recombined *bytes.Buffer firstEntryObservedTime time.Time } @@ -273,19 +273,16 @@ func (r *Transformer) matchIndicatesLast() bool { func (r *Transformer) addToBatch(ctx context.Context, e *entry.Entry, source string) { batch, ok := r.batchMap[source] if !ok { - batch = r.addNewBatch(source, e) if len(r.batchMap) >= r.maxSources { - r.Error("Batched source exceeds max source size. Flushing all batched logs. Consider increasing max_sources parameter") - r.flushUncombined(context.Background()) - return + r.Error("Too many sources. Flushing all batched logs. Consider increasing max_sources parameter") + r.flushAllSources(ctx) } + batch = r.addNewBatch(source, e) } else { - // If the length of the batch is 0, this batch was flushed previously due to triggering size limit. - // In this case, the firstEntryObservedTime should be updated to reset the timeout - if len(batch.entries) == 0 { - batch.firstEntryObservedTime = e.ObservedTimestamp + batch.numEntries++ + if r.overwriteWithOldest { + batch.baseEntry = e } - batch.entries = append(batch.entries, e) } // Combine the combineField of each entry in the batch, @@ -301,7 +298,7 @@ func (r *Transformer) addToBatch(ctx context.Context, e *entry.Entry, source str } batch.recombined.WriteString(s) - if (r.maxLogSize > 0 && int64(batch.recombined.Len()) > r.maxLogSize) || len(batch.entries) >= r.maxBatchSize { + if (r.maxLogSize > 0 && int64(batch.recombined.Len()) > r.maxLogSize) || batch.numEntries >= r.maxBatchSize { if err := r.flushSource(ctx, source); err != nil { r.Errorf("there was error flushing combined logs %s", err) } @@ -309,19 +306,6 @@ func (r *Transformer) addToBatch(ctx context.Context, e *entry.Entry, source str } -// flushUncombined flushes all the logs in the batch individually to the -// next output in the pipeline. This is only used when there is an error -// or at shutdown to avoid dropping the logs. -func (r *Transformer) flushUncombined(ctx context.Context) { - for source := range r.batchMap { - for _, entry := range r.batchMap[source].entries { - r.Write(ctx, entry) - } - r.removeBatch(source) - } - r.ticker.Reset(r.forceFlushTimeout) -} - // flushAllSources flushes all sources. func (r *Transformer) flushAllSources(ctx context.Context) { var errs []error @@ -344,28 +328,18 @@ func (r *Transformer) flushSource(ctx context.Context, source string) error { return nil } - if len(batch.entries) == 0 { + if batch.baseEntry == nil { r.removeBatch(source) return nil } - // Choose which entry we want to keep the rest of the fields from - var base *entry.Entry - entries := batch.entries - - if r.overwriteWithOldest { - base = entries[len(entries)-1] - } else { - base = entries[0] - } - // Set the recombined field on the entry - err := base.Set(r.combineField, batch.recombined.String()) + err := batch.baseEntry.Set(r.combineField, batch.recombined.String()) if err != nil { return err } - r.Write(ctx, base) + r.Write(ctx, batch.baseEntry) r.removeBatch(source) return nil } @@ -373,7 +347,8 @@ func (r *Transformer) flushSource(ctx context.Context, source string) error { // addNewBatch creates a new batch for the given source and adds the entry to it. func (r *Transformer) addNewBatch(source string, e *entry.Entry) *sourceBatch { batch := r.batchPool.Get().(*sourceBatch) - batch.entries = append(batch.entries[:0], e) + batch.baseEntry = e + batch.numEntries = 1 batch.recombined.Reset() batch.firstEntryObservedTime = e.ObservedTimestamp r.batchMap[source] = batch diff --git a/pkg/stanza/operator/transformer/recombine/recombine_test.go b/pkg/stanza/operator/transformer/recombine/recombine_test.go index 34e1ee29cc44..fffa50ce4c89 100644 --- a/pkg/stanza/operator/transformer/recombine/recombine_test.go +++ b/pkg/stanza/operator/transformer/recombine/recombine_test.go @@ -381,15 +381,22 @@ func TestTransformer(t *testing.T) { cfg.IsLastEntry = "body == 'end'" cfg.OutputIDs = []string{"fake"} cfg.MaxSources = 1 + cfg.OverwriteWith = "oldest" + cfg.ForceFlushTimeout = 10 * time.Millisecond return cfg }(), []*entry.Entry{ - entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1, "start1", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t1.Add(10*time.Millisecond), "middle1", map[string]string{"file.path": "file1"}), + entryWithBodyAttr(t2, "start2", map[string]string{"file.path": "file2"}), + entryWithBodyAttr(t2.Add(10*time.Millisecond), "middle2", map[string]string{"file.path": "file2"}), + entryWithBodyAttr(t2.Add(20*time.Millisecond), "end2", map[string]string{"file.path": "file2"}), }, []*entry.Entry{ - entryWithBodyAttr(t1, "file1", map[string]string{"file.path": "file1"}), - entryWithBodyAttr(t2, "end", map[string]string{"file.path": "file1"}), + // First entry is booted before end comes in, but partial recombination should occur + entryWithBodyAttr(t1.Add(10*time.Millisecond), "start1\nmiddle1", map[string]string{"file.path": "file1"}), + // Second entry is flushed automatically when end comes in + entryWithBodyAttr(t2.Add(20*time.Millisecond), "start2\nmiddle2\nend2", map[string]string{"file.path": "file2"}), }, }, { @@ -591,7 +598,7 @@ func BenchmarkRecombine(b *testing.B) { for _, e := range entries { require.NoError(b, recombine.Process(ctx, e)) } - recombine.flushUncombined(ctx) + recombine.flushAllSources(ctx) } } @@ -630,7 +637,7 @@ func BenchmarkRecombineLimitTrigger(b *testing.B) { require.NoError(b, recombine.Process(ctx, next)) require.NoError(b, recombine.Process(ctx, start)) require.NoError(b, recombine.Process(ctx, next)) - recombine.flushUncombined(ctx) + recombine.flushAllSources(ctx) } } diff --git a/processor/attributesprocessor/package_test.go b/processor/attributesprocessor/package_test.go index 53f0738500b7..fbaef1cb7fbc 100644 --- a/processor/attributesprocessor/package_test.go +++ b/processor/attributesprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/cumulativetodeltaprocessor/package_test.go b/processor/cumulativetodeltaprocessor/package_test.go index 00a5411fe5cc..dd3df47d6b82 100644 --- a/processor/cumulativetodeltaprocessor/package_test.go +++ b/processor/cumulativetodeltaprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/datadogprocessor/go.mod b/processor/datadogprocessor/go.mod index ce9994c2b581..474a4623c889 100644 --- a/processor/datadogprocessor/go.mod +++ b/processor/datadogprocessor/go.mod @@ -5,8 +5,8 @@ go 1.20 require ( github.com/DataDog/datadog-agent/pkg/proto v0.52.0-devel - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 - github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 + github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 github.com/DataDog/sketches-go v1.4.4 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog v0.93.0 @@ -35,7 +35,7 @@ require ( github.com/DataDog/datadog-go/v5 v5.1.1 // indirect github.com/DataDog/go-sqllexer v0.0.8 // indirect github.com/DataDog/go-tuf v1.0.2-0.5.2 // indirect - github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 // indirect + github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect diff --git a/processor/datadogprocessor/go.sum b/processor/datadogprocessor/go.sum index 5e0dfdf2455f..0530027d5b2a 100644 --- a/processor/datadogprocessor/go.sum +++ b/processor/datadogprocessor/go.sum @@ -20,13 +20,13 @@ github.com/DataDog/go-sqllexer v0.0.8 h1:vfC8R9PhmJfeOKcFYAX9UOd890A3wu3KrjU9Kr7 github.com/DataDog/go-sqllexer v0.0.8/go.mod h1:nB4Ea2YNsqMwtbWMc4Fm/oP98IIrSPapqwOwPioMspY= github.com/DataDog/go-tuf v1.0.2-0.5.2 h1:EeZr937eKAWPxJ26IykAdWA4A0jQXJgkhUjqEI/w7+I= github.com/DataDog/go-tuf v1.0.2-0.5.2/go.mod h1:zBcq6f654iVqmkk8n2Cx81E1JnNTMOAx1UEO/wZR+P0= -github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.1 h1:0ugsTkWG1SrU8WR9sDGhOy4M/iqHY+w5Ali+jzMGetg= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1 h1:mOfJySl1BbvgVHgLsA1ouWHN2QKyd+xksy3hG2TeD68= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.1/go.mod h1:NRv/hOlGq1LrJN1bbY7gJa4upTDTh5ZRW19U5w/wuNQ= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1 h1:z0QDSV9lQbTVoAnOkKiu7SWElWKPwpqGI7OE+OYNCIs= -github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.1/go.mod h1:As+hEGB+/quKDMjxLtMKU9ucSsjrpdk1pXnMNqfwGoU= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1 h1:nd3Zch8xtTALM3ObZ3jBwzbDFtARTN/QVoDCCWXubJE= -github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.1/go.mod h1:xF6NyzghnEeQe9+9d8XiiOzxhDAdvOWOF8dR4dq5DqI= +github.com/DataDog/opentelemetry-mapping-go/pkg/internal/sketchtest v0.13.2 h1:TGGnFPI160L3HGhCN7Y4lXNlH7mFj/uBYdVeQG6lIVo= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2 h1:V5SoRFNeFdidAemhVTGO/zwtPNluN4ZrrqiFLuAT7Us= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.13.2/go.mod h1:Z2FPxYhi8GIFkS4WLC7RrRaGolyB9TqS2RMSwNcmczk= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2 h1:IkA9MI8nmY8gbRI9YLI7o7tKmjuTK1nU29cDqyi+sOg= +github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/metrics v0.13.2/go.mod h1:QLz5CEgTHJ91pLOcb2hL8P3+7AKMUIOfXJw2Sr4588o= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2 h1:s06GkbYmWnG7WYmmxOTB0W+1BidVqZ/4oXvyoQmNovE= +github.com/DataDog/opentelemetry-mapping-go/pkg/quantile v0.13.2/go.mod h1:hKaXjBn+Y/KT6otuDA213Y0gtjlK0ylI8uuAho3LKKo= github.com/DataDog/sketches-go v1.4.4 h1:dF52vzXRFSPOj2IjXSWLvXq3jubL4CI69kwYjJ1w5Z8= github.com/DataDog/sketches-go v1.4.4/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= diff --git a/processor/deltatorateprocessor/package_test.go b/processor/deltatorateprocessor/package_test.go index e0b681a87ff8..a5033fd28efd 100644 --- a/processor/deltatorateprocessor/package_test.go +++ b/processor/deltatorateprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/filterprocessor/package_test.go b/processor/filterprocessor/package_test.go index 8ed805994973..3fa378477bfd 100644 --- a/processor/filterprocessor/package_test.go +++ b/processor/filterprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/groupbyattrsprocessor/package_test.go b/processor/groupbyattrsprocessor/package_test.go index 4852d53012c7..ed5419297ee2 100644 --- a/processor/groupbyattrsprocessor/package_test.go +++ b/processor/groupbyattrsprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/logstransformprocessor/package_test.go b/processor/logstransformprocessor/package_test.go index 19303e8d6a6e..e27f2a3dce71 100644 --- a/processor/logstransformprocessor/package_test.go +++ b/processor/logstransformprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/metricsgenerationprocessor/package_test.go b/processor/metricsgenerationprocessor/package_test.go index e83f4ee1791e..8e85d8eb1217 100644 --- a/processor/metricsgenerationprocessor/package_test.go +++ b/processor/metricsgenerationprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/metricstransformprocessor/package_test.go b/processor/metricstransformprocessor/package_test.go index f1880a143ee7..e6044b57e6ba 100644 --- a/processor/metricstransformprocessor/package_test.go +++ b/processor/metricstransformprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/redactionprocessor/package_test.go b/processor/redactionprocessor/package_test.go index d920ca21874e..d15d22f8a304 100644 --- a/processor/redactionprocessor/package_test.go +++ b/processor/redactionprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/aws/ec2/package_test.go b/processor/resourcedetectionprocessor/internal/aws/ec2/package_test.go index d9aad1a8d944..84becb4326f7 100644 --- a/processor/resourcedetectionprocessor/internal/aws/ec2/package_test.go +++ b/processor/resourcedetectionprocessor/internal/aws/ec2/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/aws/ecs/package_test.go b/processor/resourcedetectionprocessor/internal/aws/ecs/package_test.go index b8725751ea40..d53a4a4d11c2 100644 --- a/processor/resourcedetectionprocessor/internal/aws/ecs/package_test.go +++ b/processor/resourcedetectionprocessor/internal/aws/ecs/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/aws/eks/package_test.go b/processor/resourcedetectionprocessor/internal/aws/eks/package_test.go index f099568a65e6..7d08231e51a0 100644 --- a/processor/resourcedetectionprocessor/internal/aws/eks/package_test.go +++ b/processor/resourcedetectionprocessor/internal/aws/eks/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/package_test.go b/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/package_test.go index b7921edc93cf..969f068ae126 100644 --- a/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/package_test.go +++ b/processor/resourcedetectionprocessor/internal/aws/elasticbeanstalk/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/aws/lambda/package_test.go b/processor/resourcedetectionprocessor/internal/aws/lambda/package_test.go index c8274eee780c..3eaceb23f8f4 100644 --- a/processor/resourcedetectionprocessor/internal/aws/lambda/package_test.go +++ b/processor/resourcedetectionprocessor/internal/aws/lambda/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/azure/aks/package_test.go b/processor/resourcedetectionprocessor/internal/azure/aks/package_test.go index cc81930dc4f7..72c16c5c61ec 100644 --- a/processor/resourcedetectionprocessor/internal/azure/aks/package_test.go +++ b/processor/resourcedetectionprocessor/internal/azure/aks/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/azure/package_test.go b/processor/resourcedetectionprocessor/internal/azure/package_test.go index 7d2de5ed42ec..c7b9e1e8dda9 100644 --- a/processor/resourcedetectionprocessor/internal/azure/package_test.go +++ b/processor/resourcedetectionprocessor/internal/azure/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/docker/package_test.go b/processor/resourcedetectionprocessor/internal/docker/package_test.go index 5c2459787012..0ebd6a327e31 100644 --- a/processor/resourcedetectionprocessor/internal/docker/package_test.go +++ b/processor/resourcedetectionprocessor/internal/docker/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/env/package_test.go b/processor/resourcedetectionprocessor/internal/env/package_test.go index 9f7b5a41340b..3e2759e4025e 100644 --- a/processor/resourcedetectionprocessor/internal/env/package_test.go +++ b/processor/resourcedetectionprocessor/internal/env/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/heroku/package_test.go b/processor/resourcedetectionprocessor/internal/heroku/package_test.go index af67b0ef5137..ae813988fbfe 100644 --- a/processor/resourcedetectionprocessor/internal/heroku/package_test.go +++ b/processor/resourcedetectionprocessor/internal/heroku/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/k8snode/package_test.go b/processor/resourcedetectionprocessor/internal/k8snode/package_test.go index 3a4fa37073ce..961bc2afda52 100644 --- a/processor/resourcedetectionprocessor/internal/k8snode/package_test.go +++ b/processor/resourcedetectionprocessor/internal/k8snode/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/package_test.go b/processor/resourcedetectionprocessor/internal/package_test.go index 7ac04c6b0e5d..4486cdb28aa6 100644 --- a/processor/resourcedetectionprocessor/internal/package_test.go +++ b/processor/resourcedetectionprocessor/internal/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/internal/system/package_test.go b/processor/resourcedetectionprocessor/internal/system/package_test.go index 360bca30d01d..641255b7bf5e 100644 --- a/processor/resourcedetectionprocessor/internal/system/package_test.go +++ b/processor/resourcedetectionprocessor/internal/system/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourcedetectionprocessor/package_test.go b/processor/resourcedetectionprocessor/package_test.go index e4e33fd4c397..68a116728f38 100644 --- a/processor/resourcedetectionprocessor/package_test.go +++ b/processor/resourcedetectionprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/resourceprocessor/package_test.go b/processor/resourceprocessor/package_test.go index 2e864eb9eb95..e46263dcac95 100644 --- a/processor/resourceprocessor/package_test.go +++ b/processor/resourceprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/routingprocessor/package_test.go b/processor/routingprocessor/package_test.go index 49f4e60439cd..7f0735be0aeb 100644 --- a/processor/routingprocessor/package_test.go +++ b/processor/routingprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/schemaprocessor/package_test.go b/processor/schemaprocessor/package_test.go index e8b8663ada01..49dd0a89be58 100644 --- a/processor/schemaprocessor/package_test.go +++ b/processor/schemaprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/servicegraphprocessor/Makefile b/processor/servicegraphprocessor/Makefile deleted file mode 100644 index c1496226e590..000000000000 --- a/processor/servicegraphprocessor/Makefile +++ /dev/null @@ -1 +0,0 @@ -include ../../Makefile.Common \ No newline at end of file diff --git a/processor/servicegraphprocessor/README.md b/processor/servicegraphprocessor/README.md deleted file mode 100644 index b20ec13260f1..000000000000 --- a/processor/servicegraphprocessor/README.md +++ /dev/null @@ -1,177 +0,0 @@ -# Service graph processor - - -| Status | | -| ------------- |-----------| -| Stability | [deprecated]: traces | -| Distributions | [contrib], [sumo] | -| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Aprocessor%2Fservicegraph%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Aprocessor%2Fservicegraph) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Aprocessor%2Fservicegraph%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Aprocessor%2Fservicegraph) | -| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@jpkrohling](https://www.github.com/jpkrohling), [@mapno](https://www.github.com/mapno) | - -[deprecated]: https://github.com/open-telemetry/opentelemetry-collector#deprecated -[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib -[sumo]: https://github.com/SumoLogic/sumologic-otel-collector - - -The service graph processor is deprecated and will be removed in future versions. Use the [service graph connector](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/connector/servicegraphconnector/README.md) instead. - -The service graphs processor is a traces processor that builds a map representing the interrelationships between various services in a system. -The processor will analyse trace data and generate metrics describing the relationship between the services. -These metrics can be used by data visualization apps (e.g. Grafana) to draw a service graph. - -Service graphs are useful for a number of use-cases: - -* Infer the topology of a distributed system. As distributed systems grow, they become more complex. Service graphs can help you understand the structure of the system. -* Provide a high level overview of the health of your system. -Service graphs show error rates, latencies, among other relevant data. -* Provide an historic view of a system’s topology. -Distributed systems change very frequently, -and service graphs offer a way of seeing how these systems have evolved over time. - -This component is based on [Grafana Tempo's service graph processor](https://github.com/grafana/tempo/tree/main/modules/generator/processor/servicegraphs). - -## How it works - -Service graphs work by inspecting traces and looking for spans with parent-children relationship that represent a request. -The processor uses the OpenTelemetry semantic conventions to detect a myriad of requests. -It currently supports the following requests: - -* A direct request between two services where the outgoing and the incoming span must have `span.kind` client and server respectively. -* A request across a messaging system where the outgoing and the incoming span must have `span.kind` producer and consumer respectively. -* A database request; in this case the processor looks for spans containing attributes `span.kind`=client as well as db.name. - -Every span that can be paired up to form a request is kept in an in-memory store, -until its corresponding pair span is received or the maximum waiting time has passed. -When either of these conditions are reached, the request is recorded and removed from the local store. - -Each emitted metrics series have the client and server label corresponding with the service doing the request and the service receiving the request. - -``` -traces_service_graph_request_total{client="app", server="db", connection_type="database"} 20 -``` - -TLDR: The processor will try to find spans belonging to requests as seen from the client and the server and will create a metric representing an edge in the graph. - -## Metrics - -The following metrics are emitted by the processor: - -| Metric | Type | Labels | Description | -|---------------------------------------------|-----------|---------------------------------|--------------------------------------------------------------| -| traces_service_graph_request_total | Counter | client, server, connection_type | Total count of requests between two nodes | -| traces_service_graph_request_failed_total | Counter | client, server, connection_type | Total count of failed requests between two nodes | -| traces_service_graph_request_server_seconds | Histogram | client, server, connection_type | Time for a request between two nodes as seen from the server | -| traces_service_graph_request_client_seconds | Histogram | client, server, connection_type | Time for a request between two nodes as seen from the client | -| traces_service_graph_unpaired_spans_total | Counter | client, server, connection_type | Total count of unpaired spans | -| traces_service_graph_dropped_spans_total | Counter | client, server, connection_type | Total count of dropped spans | - -Duration is measured both from the client and the server sides. - -Possible values for `connection_type`: unset, `messaging_system`, or `database`. - -Additional labels can be included using the `dimensions` configuration option. Those labels will have a prefix to mark where they originate (client or server span kinds). -The `client_` prefix relates to the dimensions coming from spans with `SPAN_KIND_CLIENT`, and the `server_` prefix relates to the -dimensions coming from spans with `SPAN_KIND_SERVER`. - -Since the service graph processor has to process both sides of an edge, -it needs to process all spans of a trace to function properly. -If spans of a trace are spread out over multiple instances, spans are not paired up reliably. -A possible solution to this problem is using the [load balancing exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/exporter/loadbalancingexporter) -in a layer on front of collector instances running this processor. - -## Visualization - -Service graph metrics are natively supported by Grafana since v9.0.4. -To run it, configure a Tempo data source's 'Service Graphs' by linking to the Prometheus backend where metrics are being sent: - -```yaml -apiVersion: 1 -datasources: - # Prometheus backend where metrics are sent - - name: Prometheus - type: prometheus - uid: prometheus - url: - jsonData: - httpMethod: GET - version: 1 - - name: Tempo - type: tempo - uid: tempo - url: - jsonData: - httpMethod: GET - serviceMap: - datasourceUid: 'prometheus' - version: 1 -``` - -## Configuration - -The following settings are required: - -- `metrics_exporter`: the name of the exporter that this processor will write metrics to. This exporter **must** be present in a pipeline. -- `latency_histogram_buckets`: the list of durations defining the latency histogram buckets. - - Default: `[2ms, 4ms, 6ms, 8ms, 10ms, 50ms, 100ms, 200ms, 400ms, 800ms, 1s, 1400ms, 2s, 5s, 10s, 15s]` -- `dimensions`: the list of dimensions to add together with the default dimensions defined above. - -The following settings can be optionally configured: - -- `store`: defines the config for the in-memory store used to find requests between services by pairing spans. - - `ttl`: TTL is the time to live for items in the store. - - Default: `2s` - - `max_items`: MaxItems is the maximum number of items to keep in the store. - - Default: `1000` -- `cache_loop`: the interval at which to clean the cache. -- `store_expiration_loop`: the time to expire old entries from the store periodically. -- `virtual_node_peer_attributes`: the list of attributes need to match for building virtual server node, the higher the front, the higher the priority. - - Default: `[db.name, net.sock.peer.addr, net.peer.name, rpc.service, net.sock.peer.name, net.peer.name, http.url, http.target]` -- `metrics_flush_interval`: the interval at which metrics are flushed to the exporter. Metrics are flush on every received batch of traces by default. - -## Example configuration - -```yaml -receivers: - otlp: - protocols: - grpc: - otlp/servicegraph: # Dummy receiver for the metrics pipeline - protocols: - grpc: - endpoint: localhost:12345 - -processors: - servicegraph: - metrics_exporter: prometheus/servicegraph # Exporter to send metrics to - latency_histogram_buckets: [100us, 1ms, 2ms, 6ms, 10ms, 100ms, 250ms] # Buckets for latency histogram - dimensions: [cluster, namespace] # Additional dimensions (labels) to be added to the metrics extracted from the resource and span attributes - store: # Configuration for the in-memory store - ttl: 2s # Value to wait for an edge to be completed - max_items: 200 # Amount of edges that will be stored in the storeMap - cache_loop: 2m # the time to cleans the cache periodically - store_expiration_loop: 10s # the time to expire old entries from the store periodically. - virtual_node_peer_attributes: - - db.name - - rpc.service -exporters: - prometheus/servicegraph: - endpoint: localhost:9090 - namespace: servicegraph - otlp: - endpoint: localhost:4317 - -service: - pipelines: - traces: - receivers: [otlp] - processors: [servicegraph] - exporters: [otlp] - metrics/servicegraph: - receivers: [otlp/servicegraph] - processors: [] - exporters: [prometheus/servicegraph] -``` - -## Features and Feature-Gates - -See the [Collector feature gates](https://github.com/open-telemetry/opentelemetry-collector/blob/main/featuregate/README.md#collector-feature-gates) for an overview of feature gates in the collector. diff --git a/processor/servicegraphprocessor/config_test.go b/processor/servicegraphprocessor/config_test.go deleted file mode 100644 index ee4cac1c7888..000000000000 --- a/processor/servicegraphprocessor/config_test.go +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package servicegraphprocessor - -import ( - "path/filepath" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/otelcol/otelcoltest" - - "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor/internal/metadata" -) - -func TestLoadConfig(t *testing.T) { - // Prepare - factories, err := otelcoltest.NopFactories() - require.NoError(t, err) - - factories.Processors[metadata.Type] = NewFactory() - factories.Connectors[metadata.Type] = NewConnectorFactoryFunc("servicegraph", component.StabilityLevelAlpha) - - // Test - cfg, err := otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "service-graph-config.yaml"), factories) - - // Verify - require.NoError(t, err) - require.NotNil(t, cfg) - assert.Equal(t, - &Config{ - MetricsExporter: "metrics", - LatencyHistogramBuckets: []time.Duration{1, 2, 3, 4, 5}, - Dimensions: []string{"dimension-1", "dimension-2"}, - Store: StoreConfig{ - TTL: time.Second, - MaxItems: 10, - }, - CacheLoop: 2 * time.Minute, - StoreExpirationLoop: 10 * time.Second, - VirtualNodePeerAttributes: []string{"db.name", "rpc.service"}, - }, - cfg.Processors[component.NewID(metadata.Type)], - ) - - cfg, err = otelcoltest.LoadConfigAndValidate(filepath.Join("testdata", "service-graph-connector-config.yaml"), factories) - - // Verify - require.NoError(t, err) - require.NotNil(t, cfg) - assert.Equal(t, - &Config{ - LatencyHistogramBuckets: []time.Duration{1, 2, 3, 4, 5}, - Dimensions: []string{"dimension-1", "dimension-2"}, - Store: StoreConfig{ - TTL: time.Second, - MaxItems: 10, - }, - CacheLoop: time.Minute, - StoreExpirationLoop: 2 * time.Second, - }, - cfg.Connectors[component.NewID(metadata.Type)], - ) - -} diff --git a/processor/servicegraphprocessor/doc.go b/processor/servicegraphprocessor/doc.go deleted file mode 100644 index 86e86a92fa57..000000000000 --- a/processor/servicegraphprocessor/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -//go:generate mdatagen metadata.yaml - -package servicegraphprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor" diff --git a/processor/servicegraphprocessor/factory.go b/processor/servicegraphprocessor/factory.go deleted file mode 100644 index fb046d4baf9a..000000000000 --- a/processor/servicegraphprocessor/factory.go +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package servicegraphprocessor // import "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor" - -import ( - "context" - "time" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/connector" - "go.opentelemetry.io/collector/consumer" - "go.opentelemetry.io/collector/featuregate" - "go.opentelemetry.io/collector/processor" -) - -const ( - // The value of "type" key in configuration. - typeStr = "servicegraph" - // The stability level of the processor. - connectorStability = component.StabilityLevelDevelopment - virtualNodeFeatureGateID = "processor.servicegraph.virtualNode" - legacyLatencyMetricNamesFeatureGateID = "processor.servicegraph.legacyLatencyMetricNames" - legacyLatencyUnitMs = "processor.servicegraph.legacyLatencyUnitMs" -) - -var virtualNodeFeatureGate, legacyMetricNamesFeatureGate, legacyLatencyUnitMsFeatureGate *featuregate.Gate - -func init() { - virtualNodeFeatureGate = featuregate.GlobalRegistry().MustRegister( - virtualNodeFeatureGateID, - featuregate.StageAlpha, - featuregate.WithRegisterDescription("When enabled, when the edge expires, processor checks if it has peer attributes(`db.name, net.sock.peer.addr, net.peer.name, rpc.service, http.url, http.target`), and then aggregate the metrics with virtual node."), - featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/17196"), - ) - // TODO: Remove this feature gate when the legacy metric names are removed. - legacyMetricNamesFeatureGate = featuregate.GlobalRegistry().MustRegister( - legacyLatencyMetricNamesFeatureGateID, - featuregate.StageAlpha, // Alpha because we want it disabled by default. - featuregate.WithRegisterDescription("When enabled, processor uses legacy latency metric names."), - featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/18743,https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/16578"), - ) - legacyLatencyUnitMsFeatureGate = featuregate.GlobalRegistry().MustRegister( - legacyLatencyUnitMs, - featuregate.StageAlpha, // Alpha because we want it disabled by default. - featuregate.WithRegisterDescription("When enabled, processor reports latency in milliseconds, instead of seconds."), - featuregate.WithRegisterReferenceURL("https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/27488"), - ) -} - -// NewFactory creates a factory for the servicegraph processor. -func NewFactory() processor.Factory { - return processor.NewFactory( - typeStr, - createDefaultConfig, - processor.WithTraces(createTracesProcessor, connectorStability), - ) -} - -// NewConnectorFactoryFunc creates a function that returns a factory for the servicegraph connector. -var NewConnectorFactoryFunc = func(cfgType component.Type, tracesToMetricsStability component.StabilityLevel) connector.Factory { - return connector.NewFactory( - cfgType, - createDefaultConfig, - connector.WithTracesToMetrics(createTracesToMetricsConnector, tracesToMetricsStability), - ) -} - -func createDefaultConfig() component.Config { - return &Config{ - Store: StoreConfig{ - TTL: 2 * time.Second, - MaxItems: 1000, - }, - CacheLoop: time.Minute, - StoreExpirationLoop: 2 * time.Second, - } -} - -func createTracesProcessor(_ context.Context, params processor.CreateSettings, cfg component.Config, nextConsumer consumer.Traces) (processor.Traces, error) { - p := newProcessor(params.TelemetrySettings, cfg) - p.tracesConsumer = nextConsumer - return p, nil -} - -func createTracesToMetricsConnector(_ context.Context, params connector.CreateSettings, cfg component.Config, nextConsumer consumer.Metrics) (connector.Traces, error) { - c := newProcessor(params.TelemetrySettings, cfg) - c.metricsConsumer = nextConsumer - return c, nil -} diff --git a/processor/servicegraphprocessor/factory_test.go b/processor/servicegraphprocessor/factory_test.go deleted file mode 100644 index 27e96627f76a..000000000000 --- a/processor/servicegraphprocessor/factory_test.go +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package servicegraphprocessor - -import ( - "context" - "testing" - "time" - - "github.com/stretchr/testify/assert" - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/connector/connectortest" - "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/processor/processortest" -) - -func TestNewProcessor(t *testing.T) { - for _, tc := range []struct { - name string - latencyHistogramBuckets []time.Duration - expectedLatencyHistogramBuckets []float64 - }{ - { - name: "simplest config (use defaults)", - expectedLatencyHistogramBuckets: defaultLatencyHistogramBuckets, - }, - { - name: "latency histogram configured with catch-all bucket to check no additional catch-all bucket inserted", - latencyHistogramBuckets: []time.Duration{2 * time.Millisecond}, - expectedLatencyHistogramBuckets: []float64{0.002}, - }, - { - name: "full config with no catch-all bucket and check the catch-all bucket is inserted", - latencyHistogramBuckets: []time.Duration{2 * time.Millisecond}, - expectedLatencyHistogramBuckets: []float64{0.002}, - }, - } { - t.Run(tc.name, func(t *testing.T) { - // Prepare - factory := NewFactory() - - creationParams := processortest.NewNopCreateSettings() - cfg := factory.CreateDefaultConfig().(*Config) - cfg.LatencyHistogramBuckets = tc.latencyHistogramBuckets - - // Test - traceProcessor, err := factory.CreateTracesProcessor(context.Background(), creationParams, cfg, consumertest.NewNop()) - smp := traceProcessor.(*serviceGraphProcessor) - - // Verify - assert.NoError(t, err) - assert.NotNil(t, smp) - - assert.Equal(t, tc.expectedLatencyHistogramBuckets, smp.reqDurationBounds) - }) - } -} - -func TestNewConnector(t *testing.T) { - for _, tc := range []struct { - name string - latencyHistogramBuckets []time.Duration - expectedLatencyHistogramBuckets []float64 - }{ - { - name: "simplest config (use defaults)", - expectedLatencyHistogramBuckets: defaultLatencyHistogramBuckets, - }, - { - name: "latency histogram configured with catch-all bucket to check no additional catch-all bucket inserted", - latencyHistogramBuckets: []time.Duration{2 * time.Millisecond}, - expectedLatencyHistogramBuckets: []float64{0.002}, - }, - { - name: "full config with no catch-all bucket and check the catch-all bucket is inserted", - latencyHistogramBuckets: []time.Duration{2 * time.Millisecond}, - expectedLatencyHistogramBuckets: []float64{0.002}, - }, - } { - t.Run(tc.name, func(t *testing.T) { - // Prepare - factory := NewConnectorFactoryFunc("servicegraph", component.StabilityLevelAlpha) - - creationParams := connectortest.NewNopCreateSettings() - cfg := factory.CreateDefaultConfig().(*Config) - cfg.LatencyHistogramBuckets = tc.latencyHistogramBuckets - - // Test - conn, err := factory.CreateTracesToMetrics(context.Background(), creationParams, cfg, consumertest.NewNop()) - smc := conn.(*serviceGraphProcessor) - - // Verify - assert.NoError(t, err) - assert.NotNil(t, smc) - - assert.Equal(t, tc.expectedLatencyHistogramBuckets, smc.reqDurationBounds) - }) - } -} diff --git a/processor/servicegraphprocessor/go.mod b/processor/servicegraphprocessor/go.mod deleted file mode 100644 index 65d1e5e83e61..000000000000 --- a/processor/servicegraphprocessor/go.mod +++ /dev/null @@ -1,127 +0,0 @@ -// Deprecated: the service graph processor is deprecated and will be removed in future versions. Use the service graph connector instead. -module github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor - -go 1.20 - -require ( - github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.93.0 - github.com/stretchr/testify v1.8.4 - go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f - go.opentelemetry.io/collector/config/configgrpc v0.93.1-0.20240130182548-89388addcc7f - go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f - go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f - go.opentelemetry.io/collector/connector v0.93.1-0.20240130182548-89388addcc7f - go.opentelemetry.io/collector/consumer v0.93.1-0.20240130182548-89388addcc7f - go.opentelemetry.io/collector/exporter v0.93.1-0.20240130182548-89388addcc7f - go.opentelemetry.io/collector/exporter/otlpexporter v0.93.1-0.20240130182548-89388addcc7f - go.opentelemetry.io/collector/featuregate v1.0.2-0.20240130181942-9c7177496fd5 - go.opentelemetry.io/collector/otelcol v0.93.1-0.20240130182548-89388addcc7f - go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5 - go.opentelemetry.io/collector/processor v0.93.1-0.20240130182548-89388addcc7f - go.opentelemetry.io/collector/semconv v0.93.1-0.20240130182548-89388addcc7f - go.opentelemetry.io/otel/metric v1.22.0 - go.opentelemetry.io/otel/sdk/metric v1.22.0 - go.opentelemetry.io/otel/trace v1.22.0 - go.uber.org/goleak v1.3.0 - go.uber.org/zap v1.26.0 -) - -require ( - cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/fsnotify/fsnotify v1.7.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-ole/go-ole v1.2.6 // 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.3 // indirect - github.com/golang/snappy v0.0.4 // indirect - github.com/google/uuid v1.5.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 // indirect - github.com/hashicorp/go-version v1.6.0 // indirect - github.com/inconshreveable/mousetrap v1.1.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.4 // indirect - github.com/knadh/koanf/maps v0.1.1 // indirect - github.com/knadh/koanf/providers/confmap v0.1.0 // indirect - github.com/knadh/koanf/v2 v2.0.1 // indirect - github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect - github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // 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/mostynb/go-grpc-compression v1.2.2 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect - github.com/prometheus/client_golang v1.18.0 // indirect - github.com/prometheus/client_model v0.5.0 // indirect - github.com/prometheus/common v0.46.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect - github.com/shirou/gopsutil/v3 v3.23.12 // indirect - github.com/shoenig/go-m1cpu v0.1.6 // indirect - github.com/spf13/cobra v1.8.0 // indirect - github.com/spf13/pflag v1.0.5 // indirect - github.com/tklauser/go-sysconf v0.3.12 // indirect - github.com/tklauser/numcpus v0.6.1 // indirect - github.com/yusufpapurcu/wmi v1.2.3 // indirect - go.opencensus.io v0.24.0 // indirect - go.opentelemetry.io/collector v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/config/configauth v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/config/configcompression v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/config/confignet v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/config/configopaque v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/config/configretry v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/config/configtls v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/config/internal v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/extension v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/extension/auth v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/receiver v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/collector/service v0.93.1-0.20240130182548-89388addcc7f // indirect - go.opentelemetry.io/contrib/config v0.2.0 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 // indirect - go.opentelemetry.io/contrib/propagators/b3 v1.22.0 // indirect - go.opentelemetry.io/otel v1.22.0 // indirect - go.opentelemetry.io/otel/bridge/opencensus v0.45.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.45.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.45.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 // indirect - go.opentelemetry.io/otel/exporters/prometheus v0.45.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.45.0 // indirect - go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.22.0 // indirect - go.opentelemetry.io/otel/sdk v1.22.0 // indirect - go.opentelemetry.io/proto/otlp v1.0.0 // indirect - go.uber.org/multierr v1.11.0 // indirect - golang.org/x/net v0.20.0 // indirect - golang.org/x/sys v0.16.0 // indirect - golang.org/x/text v0.14.0 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 // indirect - google.golang.org/grpc v1.61.0 // indirect - google.golang.org/protobuf v1.32.0 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -retract ( - v0.76.2 - v0.76.1 - v0.65.0 -) - -// ambiguous import: found package cloud.google.com/go/compute/metadata in multiple modules -replace cloud.google.com/go v0.65.0 => cloud.google.com/go v0.110.10 - -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil => ../../pkg/pdatautil - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest => ../../pkg/pdatatest - -replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../pkg/golden diff --git a/processor/servicegraphprocessor/go.sum b/processor/servicegraphprocessor/go.sum deleted file mode 100644 index a4e93f4b8171..000000000000 --- a/processor/servicegraphprocessor/go.sum +++ /dev/null @@ -1,338 +0,0 @@ -cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= -cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68 h1:aRVqY1p2IJaBGStWMsQMpkAa83cPkCDLl80eOj0Rbz4= -cloud.google.com/go/compute/metadata v0.2.4-0.20230617002413-005d2dfb6b68/go.mod h1:1a3eRNYX12fs5UABBIXS8HXVvQbX9hRB/RkEBPORpe8= -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -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/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= -github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -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/xds/go v0.0.0-20231109132714-523115ebc101 h1:7To3pQ+pZo0i3dsWEbinPNFs5gPSBOsJtx3wTT94VBY= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nosvA= -github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -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-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -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/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/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -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.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= -github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= -github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= -github.com/golang/snappy v0.0.4/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.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.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -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/google/uuid v1.5.0 h1:1p67kYwdtXjb0gL0BPiP1Av9wiZPo5A8z2cWkTZ+eyU= -github.com/google/uuid v1.5.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1 h1:6UKoz5ujsI55KNpsJH3UwCq3T8kKbZwNZBNPuTTje8U= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.1/go.mod h1:YvJ2f6MplWDhfxiUC3KpyTy76kYUZA4W3pTv/wdKQ9Y= -github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= -github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= -github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -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/klauspost/compress v1.17.4 h1:Ej5ixsIri7BrIjBkRZLTo6ghwrEtHFk7ijlczPW4fZ4= -github.com/klauspost/compress v1.17.4/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/knadh/koanf/maps v0.1.1 h1:G5TjmUh2D7G2YWf5SQQqSiHRJEjaicvU0KpypqB3NIs= -github.com/knadh/koanf/maps v0.1.1/go.mod h1:npD/QZY3V6ghQDdcQzl1W4ICNVTkohC8E73eI2xW4yI= -github.com/knadh/koanf/providers/confmap v0.1.0 h1:gOkxhHkemwG4LezxxN8DMOFopOPghxRVp7JbIvdvqzU= -github.com/knadh/koanf/providers/confmap v0.1.0/go.mod h1:2uLhxQzJnyHKfxG927awZC7+fyHFdQkd697K4MdLnIU= -github.com/knadh/koanf/v2 v2.0.1 h1:1dYGITt1I23x8cfx8ZnldtezdyaZtfAuRtIFOiRzK7g= -github.com/knadh/koanf/v2 v2.0.1/go.mod h1:ZeiIlIDXTE7w1lMT6UVcNiRAS2/rCeLn/GdLNvY1Dus= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -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/mapstructure v1.5.1-0.20231216201459-8508981c8b6c h1:cqn374mizHuIWj+OSJCajGr/phAmuMug9qIX3l9CflE= -github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -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/mostynb/go-grpc-compression v1.2.2 h1:XaDbnRvt2+1vgr0b/l0qh4mJAfIxE0bKXtz2Znl3GGI= -github.com/mostynb/go-grpc-compression v1.2.2/go.mod h1:GOCr2KBxXcblCuczg3YdLQlcin1/NfyDA348ckuCH6w= -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/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/prometheus/client_golang v1.18.0 h1:HzFfmkOzH5Q8L8G+kSJKUx5dtG87sewO+FoDDqP5Tbk= -github.com/prometheus/client_golang v1.18.0/go.mod h1:T+GXkCk5wSJyOqMIzVgvvjFDlkOQntgjkJWKrN5txjA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= -github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= -github.com/prometheus/common v0.46.0 h1:doXzt5ybi1HBKpsZOL0sSkaNHJJqkyfEWZGGqqScV0Y= -github.com/prometheus/common v0.46.0/go.mod h1:Tp0qkxpb9Jsg54QMe+EAmqXkSV7Evdy1BTn+g2pa/hQ= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shirou/gopsutil/v3 v3.23.12 h1:z90NtUkp3bMtmICZKpC4+WaknU1eXtp5vtbQ11DgpE4= -github.com/shirou/gopsutil/v3 v3.23.12/go.mod h1:1FrWgea594Jp7qmjHUUPlJDTPgcsb9mGnXDxavtikzM= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shoenig/test v0.6.4 h1:kVTaSd7WLz5WZ2IaoM0RSzRsUD+m8wRR+5qvntpn4LU= -github.com/shoenig/test v0.6.4/go.mod h1:byHiCGXqrVaflBLAMq/srcZIHynQPQgeyvkvXnjqq0k= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= -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.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= -go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= -go.opentelemetry.io/collector v0.93.1-0.20240130182548-89388addcc7f h1:NgQcLNPP/6YnIfNUkDkKu1uiRTXUa9kMtfpsKSVC4dY= -go.opentelemetry.io/collector v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:rEqeAsOy8Mu6HA6oMjGk7NrTb7958XmShSaapxFEeTs= -go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f h1:DNFOx9vwV7g+lWz9htP/Biiwwp+oFifR+J2zKnQKV3U= -go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:jOHaBlhWt4aarDS6w9A9GcgGCxrtEg+8LnBK7Y/6zqo= -go.opentelemetry.io/collector/config/configauth v0.93.1-0.20240130182548-89388addcc7f h1:3kgTrMN+n+gTgz0t2g+HxKbosnXj3cbTWpKzm5iVrP4= -go.opentelemetry.io/collector/config/configauth v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:HNJs8R2QsUUFTvIECNoQOdGe3bryAC7LdLlf+D36S7M= -go.opentelemetry.io/collector/config/configcompression v0.93.1-0.20240130182548-89388addcc7f h1:FI5NTZ1premzy9eb8RlUeSPYzC99owa5C7WWfIuMmSM= -go.opentelemetry.io/collector/config/configcompression v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:fA36AZC/Qcyl+HvMnvFZuV/iUWGQJrchimmk+qYWuMM= -go.opentelemetry.io/collector/config/configgrpc v0.93.1-0.20240130182548-89388addcc7f h1:3uNi8JLUGrJAdYkfhjs1bnYg2gBVN/lbpMsrz6jprJs= -go.opentelemetry.io/collector/config/configgrpc v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:RBGOjIkj+3Sb2LGlsS+kawtbCui9c/L2rZYHahNf0kw= -go.opentelemetry.io/collector/config/confignet v0.93.1-0.20240130182548-89388addcc7f h1:k+zyKnjQZIzbv4j2UI56DTUm8t2TCuG9EjWwug8K4pY= -go.opentelemetry.io/collector/config/confignet v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:rraribsOoZsYZm51+3TXHavmXKJOC5a5/X20vfmNbdw= -go.opentelemetry.io/collector/config/configopaque v0.93.1-0.20240130182548-89388addcc7f h1:5wpcYp67vufdi7j6swWWu7K87yiHFoosO/KpuMZtNVA= -go.opentelemetry.io/collector/config/configopaque v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:dQK8eUXjIGKaw1RB7UIg2nqx56AueNxeKFCdB0P1ypg= -go.opentelemetry.io/collector/config/configretry v0.93.1-0.20240130182548-89388addcc7f h1:6n/g6GmXrwZfYfZoIRFLZn5yG9lv9YKaerzmYjLu3lk= -go.opentelemetry.io/collector/config/configretry v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:gt1HRYyMxcMca9lbDLPbivQzsUCjVjkPAn/3S6fiD14= -go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f h1:S1mp1jVnxg0tyy7uFEMHDFRqI4AiqqE/ia8RPj3SKW0= -go.opentelemetry.io/collector/config/configtelemetry v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:2XLhyR/GVpWeZ2K044vCmrvH/d4Ewt0aD/y46avZyMU= -go.opentelemetry.io/collector/config/configtls v0.93.1-0.20240130182548-89388addcc7f h1:WjsQK6NCASD7Ht/6mdmweFcowBvWf/HiWJASkb4f9rw= -go.opentelemetry.io/collector/config/configtls v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:ehXx933OgUTSH7bIWphIf1Kfohy6qmrVHizFCgHtF7U= -go.opentelemetry.io/collector/config/internal v0.93.1-0.20240130182548-89388addcc7f h1:uaN1LYmZkVWolEUVVVoD7xlKq+6hAaQ53CBbtB4OBGk= -go.opentelemetry.io/collector/config/internal v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:e1lsJgZrO0jpId7iesPp2tljDzJsY4UrggKLfWp53bg= -go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f h1:HIvqzK7ANxcVRhtJ/zUm+ZWGHlGo7TClqcaNMwQgzHs= -go.opentelemetry.io/collector/confmap v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:KjHrfxKKojaLDc9zDPfVuyp8765AH+XfcoPWMLMiuHU= -go.opentelemetry.io/collector/connector v0.93.1-0.20240130182548-89388addcc7f h1:HPzKN+S6hTDdTcB6oxf4StM0EWRpO/uPgJyIaxBLiqQ= -go.opentelemetry.io/collector/connector v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:CJACQS5XfIhJYSumd4Ei64txW1EHVppB5x6gVvxqNfc= -go.opentelemetry.io/collector/consumer v0.93.1-0.20240130182548-89388addcc7f h1:xtOtkpXNP7x+CmP5hpIVNOkfPUQQbWlsjSNUUlczfrE= -go.opentelemetry.io/collector/consumer v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:RhC4X/bSMIENk68hzFS9i6I7DVsZSfF/S7JvfaqZkkI= -go.opentelemetry.io/collector/exporter v0.93.1-0.20240130182548-89388addcc7f h1:LxjUUxlAXcQQGQCjB3v+Rzef1M5IMRUdwX2tO82obSw= -go.opentelemetry.io/collector/exporter v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:iqkIF8nB0FkKG2p0oIBLBwT8lQ/Ab4oZ3U9ca9tSoT8= -go.opentelemetry.io/collector/exporter/otlpexporter v0.93.1-0.20240130182548-89388addcc7f h1:+7NTThkyrKPATZ4uBAvU25l+w124nsSC0rg21q+uTL4= -go.opentelemetry.io/collector/exporter/otlpexporter v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:Iz7BOR+JzVoK4ykFXlMtBjLb/dXCmBjgA4W2X7YoT50= -go.opentelemetry.io/collector/extension v0.93.1-0.20240130182548-89388addcc7f h1:cBHNixkZij3SmkQSoFLRbVOv7tqsQ9BNE3uSFjQaP30= -go.opentelemetry.io/collector/extension v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:vT7HRXtE+5MLesDYDhIf/6cdkAaDCR3ikSlvH6PoA6A= -go.opentelemetry.io/collector/extension/auth v0.93.1-0.20240130182548-89388addcc7f h1:xwtN/kL5zyVROBmQ0kBiOL7pH0H+bVleCbGuB5uATfI= -go.opentelemetry.io/collector/extension/auth v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:hJ6p4yGoJP5zCeKaHV7k8WtRDSAQt20iDWy32gqiXP8= -go.opentelemetry.io/collector/extension/zpagesextension v0.93.0 h1:cOTVR+8HlV5P8/ZNHxNtxcAUqw88InNjGuM8YL4KmnI= -go.opentelemetry.io/collector/featuregate v1.0.2-0.20240130181942-9c7177496fd5 h1:ksQGFKtMhIeFKuAu5n0teItSFBCMJo1bF5q8YkE/4W4= -go.opentelemetry.io/collector/featuregate v1.0.2-0.20240130181942-9c7177496fd5/go.mod h1:QQXjP4etmJQhkQ20j4P/rapWuItYxoFozg/iIwuKnYg= -go.opentelemetry.io/collector/otelcol v0.93.1-0.20240130182548-89388addcc7f h1:mWiQ8XBU9W7dxtyWHctSqagycluK9y1pelfXrW8h+9M= -go.opentelemetry.io/collector/otelcol v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:AnAlOGt4q7G0JdU2fceI5vdC6D5omp0GO40wL0aMBak= -go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5 h1:cMc7sJ29OzK5jZqr6XFzKxiJvlypR/zt2TDhPDqpBic= -go.opentelemetry.io/collector/pdata v1.0.2-0.20240130181942-9c7177496fd5/go.mod h1:IDkDj+B4Fp4wWOclBELN97zcb98HugJ8Q2gA4ZFsN8Q= -go.opentelemetry.io/collector/processor v0.93.1-0.20240130182548-89388addcc7f h1:uxnhFSB9peafVvsAGVhbCF1hJudye5mg7Bz94b+LSaQ= -go.opentelemetry.io/collector/processor v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:8RhlEB6SZyCTd60aviHxmjbUT2EQ40yXOq6Bea9TOkU= -go.opentelemetry.io/collector/receiver v0.93.1-0.20240130182548-89388addcc7f h1:2C2QYMLF6YrRJPT/9LhRmfJ0wwF8nt4LjBblBCEJZtM= -go.opentelemetry.io/collector/receiver v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:bPAxjHDsXFJZKPAturS7Ar5DDY/HJz5sj73E72vSVqk= -go.opentelemetry.io/collector/semconv v0.93.1-0.20240130182548-89388addcc7f h1:hmcWaQ+Lv9nFlYi08SNUlNXfzh7q/W8PAIPWH8XoSXQ= -go.opentelemetry.io/collector/semconv v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:gZ0uzkXsN+J5NpiRcdp9xOhNGQDDui8Y62p15sKrlzo= -go.opentelemetry.io/collector/service v0.93.1-0.20240130182548-89388addcc7f h1:z04ELDKEnY3O8FagzUv59/1OFr3IiwE9QPl8NeQUwlE= -go.opentelemetry.io/collector/service v0.93.1-0.20240130182548-89388addcc7f/go.mod h1:qTiO7dWBfV6tH9fq59cparYQDmG22O+Go+GN69vYMfE= -go.opentelemetry.io/contrib/config v0.2.0 h1:VRYXnoE2ug3QOtaKka4eV9OgHXMJ0q6ggFtx6s+Jvy0= -go.opentelemetry.io/contrib/config v0.2.0/go.mod h1:iBfwdwpZBKsVXMOAWHyGS8//dcVNJORYnFm6VNqsOG8= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0 h1:UNQQKPfTDe1J81ViolILjTKPr9WetKW6uei2hFgJmFs= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.47.0/go.mod h1:r9vWsPS/3AQItv3OSlEJ/E4mbrhUbbw18meOjArPtKQ= -go.opentelemetry.io/contrib/propagators/b3 v1.22.0 h1:Okbgv0pWHMQq+mF7H2o1mucJ5PvxKFq2c8cyqoXfeaQ= -go.opentelemetry.io/contrib/propagators/b3 v1.22.0/go.mod h1:N3z0ycFRhsVZ+tG/uavMxHvOvFE95QM6gwW1zSqT9dQ= -go.opentelemetry.io/contrib/zpages v0.47.0 h1:ekpdNa2wqOvAfwZIGDIIV02zmR+z08aWPt21KrPJnaU= -go.opentelemetry.io/otel v1.22.0 h1:xS7Ku+7yTFvDfDraDIJVpw7XPyuHlB9MCiqqX5mcJ6Y= -go.opentelemetry.io/otel v1.22.0/go.mod h1:eoV4iAi3Ea8LkAEI9+GFT44O6T/D0GWAVFyZVCC6pMI= -go.opentelemetry.io/otel/bridge/opencensus v0.45.0 h1:kEOlv9Exuv3J8GCf1nLMHfrTPGnZOuIkN8YlRM14TtQ= -go.opentelemetry.io/otel/bridge/opencensus v0.45.0/go.mod h1:tkVMJeFOr43+zzwbxtIWsNcCCDT7rI5/c9rhMfMIENg= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.45.0 h1:tfil6di0PoNV7FZdsCS7A5izZoVVQ7AuXtyekbOpG/I= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetricgrpc v0.45.0/go.mod h1:AKFZIEPOnqB00P63bTjOiah4ZTaRzl1TKwUWpZdYUHI= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.45.0 h1:+RbSCde0ERway5FwKvXR3aRJIFeDu9rtwC6E7BC6uoM= -go.opentelemetry.io/otel/exporters/otlp/otlpmetric/otlpmetrichttp v0.45.0/go.mod h1:zcI8u2EJxbLPyoZ3SkVAAcQPgYb1TDRzW93xLFnsggU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0 h1:9M3+rhx7kZCIQQhQRYaZCdNu1V73tm4TvXs2ntl98C4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.22.0/go.mod h1:noq80iT8rrHP1SfybmPiRGc9dc5M8RPmGvtwo7Oo7tc= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0 h1:H2JFgRcGiyHg7H7bwcwaQJYrNFqCqrbTQ8K4p1OvDu8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.22.0/go.mod h1:WfCWp1bGoYK8MeULtI15MmQVczfR+bFkk0DF3h06QmQ= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 h1:FyjCyI9jVEfqhUh2MoSkmolPjfh5fp2hnV0b0irxH4Q= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0/go.mod h1:hYwym2nDEeZfG/motx0p7L7J1N1vyzIThemQsb4g2qY= -go.opentelemetry.io/otel/exporters/prometheus v0.45.0 h1:BeIK2KGho0oCWa7LxEGSqfDZbs7Fpv/Viz+FS4P8CXE= -go.opentelemetry.io/otel/exporters/prometheus v0.45.0/go.mod h1:UVJZPLnfDSvHj+eJuZE+E1GjIBD267mEMfAAHJdghWg= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.45.0 h1:NjN6zc7Mwy9torqa3mo+pMJ3mHoPI0uzVSYcqB2t72A= -go.opentelemetry.io/otel/exporters/stdout/stdoutmetric v0.45.0/go.mod h1:U+T5v2bk4fCC8XdSEWZja3Pm/ZhvV/zE7JwX/ELJKts= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.22.0 h1:zr8ymM5OWWjjiWRzwTfZ67c905+2TMHYp2lMJ52QTyM= -go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.22.0/go.mod h1:sQs7FT2iLVJ+67vYngGJkPe1qr39IzaBzaj9IDNNY8k= -go.opentelemetry.io/otel/metric v1.22.0 h1:lypMQnGyJYeuYPhOM/bgjbFM6WE44W1/T45er4d8Hhg= -go.opentelemetry.io/otel/metric v1.22.0/go.mod h1:evJGjVpZv0mQ5QBRJoBF64yMuOf4xCWdXjK8pzFvliY= -go.opentelemetry.io/otel/sdk v1.22.0 h1:6coWHw9xw7EfClIC/+O31R8IY3/+EiRFHevmHafB2Gw= -go.opentelemetry.io/otel/sdk v1.22.0/go.mod h1:iu7luyVGYovrRpe2fmj3CVKouQNdTOkxtLzPvPz1DOc= -go.opentelemetry.io/otel/sdk/metric v1.22.0 h1:ARrRetm1HCVxq0cbnaZQlfwODYJHo3gFL8Z3tSmHBcI= -go.opentelemetry.io/otel/sdk/metric v1.22.0/go.mod h1:KjQGeMIDlBNEOo6HvjhxIec1p/69/kULDcp4gr0oLQQ= -go.opentelemetry.io/otel/trace v1.22.0 h1:Hg6pPujv0XG9QaVbGOBVHunyuLcCC3jN7WEhPx83XD0= -go.opentelemetry.io/otel/trace v1.22.0/go.mod h1:RbbHXVqKES9QhzZq/fE5UnOSILqRt40a21sPw2He1xo= -go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= -go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= -go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= -go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= -go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= -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/exp v0.0.0-20230711023510-fffb14384f22 h1:FqrVOBQxQ8r/UwwXibI0KMolVhvFiGobSfdE33deHJM= -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/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/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-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-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.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo= -golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -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-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/sys v0.0.0-20180830151530-49385e6e1522/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-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU= -golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -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-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -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= -gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= -gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= -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.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= -google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= -google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20231120223509-83a465c0220f h1:Vn+VyHU5guc9KjB5KrjI2q0wCOWEOIh0OEsleqakHJg= -google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17 h1:JpwMPBpFN3uKhdaekDpiNlImDdkUAyiJ6ez/uxGaUSo= -google.golang.org/genproto/googleapis/api v0.0.0-20231106174013-bbf56f31fb17/go.mod h1:0xJLfVdJqpAPl8tDg1ujOCGzx6LFLttXT5NhllGOXY4= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4 h1:DC7wcm+i+P1rN3Ff07vL+OndGg5OhNddHyTA+ocPqYE= -google.golang.org/genproto/googleapis/rpc v0.0.0-20231127180814-3a041ad873d4/go.mod h1:eJVxU6o+4G1PSczBr85xmyvSNYAKvAYgkub40YGomFM= -google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -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.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= -google.golang.org/grpc v1.61.0 h1:TOvOcuXn30kRao+gfcvsebNEa5iZIiLkisYEkf7R7o0= -google.golang.org/grpc v1.61.0/go.mod h1:VUbo7IFqmF1QtCAstipjG0GIoq49KvMe9+h1jFLBNJs= -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.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I= -google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/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-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/processor/servicegraphprocessor/metadata.yaml b/processor/servicegraphprocessor/metadata.yaml deleted file mode 100644 index f2fb89d91606..000000000000 --- a/processor/servicegraphprocessor/metadata.yaml +++ /dev/null @@ -1,14 +0,0 @@ -type: servicegraph - -status: - class: processor - stability: - deprecated: [traces] - distributions: [contrib, sumo] - warnings: [] - codeowners: - active: [jpkrohling, mapno] - -tests: - config: - skip_lifecycle: true diff --git a/processor/servicegraphprocessor/testdata/service-graph-config.yaml b/processor/servicegraphprocessor/testdata/service-graph-config.yaml deleted file mode 100644 index 29406316cc5c..000000000000 --- a/processor/servicegraphprocessor/testdata/service-graph-config.yaml +++ /dev/null @@ -1,28 +0,0 @@ -receivers: - nop: - -exporters: - nop: - -processors: - servicegraph: - metrics_exporter: metrics - latency_histogram_buckets: [1,2,3,4,5] - dimensions: - - dimension-1 - - dimension-2 - store: - ttl: 1s - max_items: 10 - cache_loop: 2m - store_expiration_loop: 10s - virtual_node_peer_attributes: - - db.name - - rpc.service - -service: - pipelines: - traces: - receivers: [nop] - processors: [servicegraph] - exporters: [nop] diff --git a/processor/spanprocessor/package_test.go b/processor/spanprocessor/package_test.go index 468e86caa8b8..d3748205b59d 100644 --- a/processor/spanprocessor/package_test.go +++ b/processor/spanprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/sumologicprocessor/package_test.go b/processor/sumologicprocessor/package_test.go index 0463f90d32c9..9668b53939e8 100644 --- a/processor/sumologicprocessor/package_test.go +++ b/processor/sumologicprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/transformprocessor/internal/logs/package_test.go b/processor/transformprocessor/internal/logs/package_test.go index 876917cfd627..1158f120b289 100644 --- a/processor/transformprocessor/internal/logs/package_test.go +++ b/processor/transformprocessor/internal/logs/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/transformprocessor/internal/metrics/package_test.go b/processor/transformprocessor/internal/metrics/package_test.go index d87cbe1d8cf6..b8f16a8085ef 100644 --- a/processor/transformprocessor/internal/metrics/package_test.go +++ b/processor/transformprocessor/internal/metrics/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/transformprocessor/internal/traces/package_test.go b/processor/transformprocessor/internal/traces/package_test.go index 18082d4a36fb..d1398ba09b9b 100644 --- a/processor/transformprocessor/internal/traces/package_test.go +++ b/processor/transformprocessor/internal/traces/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/processor/transformprocessor/package_test.go b/processor/transformprocessor/package_test.go index 38a049864046..89f3fe61a35e 100644 --- a/processor/transformprocessor/package_test.go +++ b/processor/transformprocessor/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/activedirectorydsreceiver/internal/metadata/package_test.go b/receiver/activedirectorydsreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/activedirectorydsreceiver/internal/metadata/package_test.go +++ b/receiver/activedirectorydsreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/activedirectorydsreceiver/package_test.go b/receiver/activedirectorydsreceiver/package_test.go index 2e229b3f43c9..5f228f5b583c 100644 --- a/receiver/activedirectorydsreceiver/package_test.go +++ b/receiver/activedirectorydsreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/aerospikereceiver/internal/metadata/package_test.go b/receiver/aerospikereceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/aerospikereceiver/internal/metadata/package_test.go +++ b/receiver/aerospikereceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/apachereceiver/internal/metadata/package_test.go b/receiver/apachereceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/apachereceiver/internal/metadata/package_test.go +++ b/receiver/apachereceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/apachesparkreceiver/internal/metadata/package_test.go b/receiver/apachesparkreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/apachesparkreceiver/internal/metadata/package_test.go +++ b/receiver/apachesparkreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/apachesparkreceiver/package_test.go b/receiver/apachesparkreceiver/package_test.go index fd4a4547ba59..b1a51fcf74d9 100644 --- a/receiver/apachesparkreceiver/package_test.go +++ b/receiver/apachesparkreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/awscloudwatchmetricsreceiver/package_test.go b/receiver/awscloudwatchmetricsreceiver/package_test.go index 74b55ee520dc..85287865a863 100644 --- a/receiver/awscloudwatchmetricsreceiver/package_test.go +++ b/receiver/awscloudwatchmetricsreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/awscloudwatchreceiver/package_test.go b/receiver/awscloudwatchreceiver/package_test.go index 31f60295c78c..c424bb3e6c46 100644 --- a/receiver/awscloudwatchreceiver/package_test.go +++ b/receiver/awscloudwatchreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/awsecscontainermetricsreceiver/package_test.go b/receiver/awsecscontainermetricsreceiver/package_test.go index 2b42ea506add..a94a78f3c47e 100644 --- a/receiver/awsecscontainermetricsreceiver/package_test.go +++ b/receiver/awsecscontainermetricsreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/awsfirehosereceiver/package_test.go b/receiver/awsfirehosereceiver/package_test.go index 2ac0e0101b8e..153874b53bcc 100644 --- a/receiver/awsfirehosereceiver/package_test.go +++ b/receiver/awsfirehosereceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/awsxrayreceiver/package_test.go b/receiver/awsxrayreceiver/package_test.go index 30e08ea2ef5c..af0529634e36 100644 --- a/receiver/awsxrayreceiver/package_test.go +++ b/receiver/awsxrayreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/azureblobreceiver/package_test.go b/receiver/azureblobreceiver/package_test.go index 11b49e77c258..ee479277c5c2 100644 --- a/receiver/azureblobreceiver/package_test.go +++ b/receiver/azureblobreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/azuremonitorreceiver/internal/metadata/package_test.go b/receiver/azuremonitorreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/azuremonitorreceiver/internal/metadata/package_test.go +++ b/receiver/azuremonitorreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/azuremonitorreceiver/package_test.go b/receiver/azuremonitorreceiver/package_test.go index 4d891310a86b..8500cce3db60 100644 --- a/receiver/azuremonitorreceiver/package_test.go +++ b/receiver/azuremonitorreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/bigipreceiver/internal/metadata/package_test.go b/receiver/bigipreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/bigipreceiver/internal/metadata/package_test.go +++ b/receiver/bigipreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/bigipreceiver/package_test.go b/receiver/bigipreceiver/package_test.go index a8c5416da8d3..9a82c047479c 100644 --- a/receiver/bigipreceiver/package_test.go +++ b/receiver/bigipreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/carbonreceiver/package_test.go b/receiver/carbonreceiver/package_test.go index dd6b27a08054..4c838dae0a8f 100644 --- a/receiver/carbonreceiver/package_test.go +++ b/receiver/carbonreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/chronyreceiver/internal/metadata/package_test.go b/receiver/chronyreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/chronyreceiver/internal/metadata/package_test.go +++ b/receiver/chronyreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/chronyreceiver/package_test.go b/receiver/chronyreceiver/package_test.go index 3db6fade84d1..8e087cba875d 100644 --- a/receiver/chronyreceiver/package_test.go +++ b/receiver/chronyreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/cloudflarereceiver/package_test.go b/receiver/cloudflarereceiver/package_test.go index f3037676e844..9440f66586e5 100644 --- a/receiver/cloudflarereceiver/package_test.go +++ b/receiver/cloudflarereceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/cloudfoundryreceiver/package_test.go b/receiver/cloudfoundryreceiver/package_test.go index 6eaa7b5b0683..57160e99eca9 100644 --- a/receiver/cloudfoundryreceiver/package_test.go +++ b/receiver/cloudfoundryreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/collectdreceiver/package_test.go b/receiver/collectdreceiver/package_test.go index 0a462d4d2054..eb835d65a3b0 100644 --- a/receiver/collectdreceiver/package_test.go +++ b/receiver/collectdreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/couchdbreceiver/internal/metadata/package_test.go b/receiver/couchdbreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/couchdbreceiver/internal/metadata/package_test.go +++ b/receiver/couchdbreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/couchdbreceiver/package_test.go b/receiver/couchdbreceiver/package_test.go index 1c9ef69b9ce4..e34fcb6cc1ea 100644 --- a/receiver/couchdbreceiver/package_test.go +++ b/receiver/couchdbreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/datadogreceiver/package_test.go b/receiver/datadogreceiver/package_test.go index 1249ed09859f..723f448a54aa 100644 --- a/receiver/datadogreceiver/package_test.go +++ b/receiver/datadogreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/dockerstatsreceiver/internal/metadata/package_test.go b/receiver/dockerstatsreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/dockerstatsreceiver/internal/metadata/package_test.go +++ b/receiver/dockerstatsreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/elasticsearchreceiver/internal/metadata/package_test.go b/receiver/elasticsearchreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/elasticsearchreceiver/internal/metadata/package_test.go +++ b/receiver/elasticsearchreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/elasticsearchreceiver/package_test.go b/receiver/elasticsearchreceiver/package_test.go index 460f2aa45907..2d1ace308cc0 100644 --- a/receiver/elasticsearchreceiver/package_test.go +++ b/receiver/elasticsearchreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/expvarreceiver/internal/metadata/package_test.go b/receiver/expvarreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/expvarreceiver/internal/metadata/package_test.go +++ b/receiver/expvarreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/expvarreceiver/package_test.go b/receiver/expvarreceiver/package_test.go index 0f61fa14f3fb..1ae8c60f3799 100644 --- a/receiver/expvarreceiver/package_test.go +++ b/receiver/expvarreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/filelogreceiver/package_test.go b/receiver/filelogreceiver/package_test.go index 85ae0a448388..54b77fb5365f 100644 --- a/receiver/filelogreceiver/package_test.go +++ b/receiver/filelogreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/filestatsreceiver/internal/metadata/package_test.go b/receiver/filestatsreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/filestatsreceiver/internal/metadata/package_test.go +++ b/receiver/filestatsreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/filestatsreceiver/package_test.go b/receiver/filestatsreceiver/package_test.go index d8e237357b6e..aab996a76d8d 100644 --- a/receiver/filestatsreceiver/package_test.go +++ b/receiver/filestatsreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/flinkmetricsreceiver/internal/metadata/package_test.go b/receiver/flinkmetricsreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/flinkmetricsreceiver/internal/metadata/package_test.go +++ b/receiver/flinkmetricsreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/flinkmetricsreceiver/package_test.go b/receiver/flinkmetricsreceiver/package_test.go index 4f7441602acc..88b4c4f6ef55 100644 --- a/receiver/flinkmetricsreceiver/package_test.go +++ b/receiver/flinkmetricsreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/gitproviderreceiver/generated_component_test.go b/receiver/gitproviderreceiver/generated_component_test.go new file mode 100644 index 000000000000..be0c3cbc6557 --- /dev/null +++ b/receiver/gitproviderreceiver/generated_component_test.go @@ -0,0 +1,73 @@ +// Code generated by mdatagen. DO NOT EDIT. + +package gitproviderreceiver + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + + "go.opentelemetry.io/collector/consumer/consumertest" + "go.opentelemetry.io/collector/receiver" + "go.opentelemetry.io/collector/receiver/receivertest" + + "go.opentelemetry.io/collector/confmap/confmaptest" +) + +// assertNoErrorHost implements a component.Host that asserts that there were no errors. +type assertNoErrorHost struct { + component.Host + *testing.T +} + +var _ component.Host = (*assertNoErrorHost)(nil) + +func TestComponentLifecycle(t *testing.T) { + factory := NewFactory() + + tests := []struct { + name string + createFn func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) + }{ + + { + name: "metrics", + createFn: func(ctx context.Context, set receiver.CreateSettings, cfg component.Config) (component.Component, error) { + return factory.CreateMetricsReceiver(ctx, set, cfg, consumertest.NewNop()) + }, + }, + } + + cm, err := confmaptest.LoadConf("metadata.yaml") + require.NoError(t, err) + cfg := factory.CreateDefaultConfig() + sub, err := cm.Sub("tests::config") + require.NoError(t, err) + require.NoError(t, component.UnmarshalConfig(sub, cfg)) + + for _, test := range tests { + t.Run(test.name+"-shutdown", func(t *testing.T) { + c, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + err = c.Shutdown(context.Background()) + require.NoError(t, err) + }) + + t.Run(test.name+"-lifecycle", func(t *testing.T) { + + firstRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + host := componenttest.NewNopHost() + require.NoError(t, err) + require.NoError(t, firstRcvr.Start(context.Background(), host)) + require.NoError(t, firstRcvr.Shutdown(context.Background())) + secondRcvr, err := test.createFn(context.Background(), receivertest.NewNopCreateSettings(), cfg) + require.NoError(t, err) + require.NoError(t, secondRcvr.Start(context.Background(), host)) + require.NoError(t, secondRcvr.Shutdown(context.Background())) + }) + } +} diff --git a/receiver/gitproviderreceiver/internal/metadata/package_test.go b/receiver/gitproviderreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/gitproviderreceiver/internal/metadata/package_test.go +++ b/receiver/gitproviderreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/gitproviderreceiver/metadata.yaml b/receiver/gitproviderreceiver/metadata.yaml index 5cbf86898606..dfc34fce8798 100644 --- a/receiver/gitproviderreceiver/metadata.yaml +++ b/receiver/gitproviderreceiver/metadata.yaml @@ -88,3 +88,7 @@ metrics: gauge: value_type: int attributes: [repository.name, branch.name] + +tests: + config: + diff --git a/receiver/gitproviderreceiver/package_test.go b/receiver/gitproviderreceiver/package_test.go index 1e32234cf58c..e90dea71a25b 100644 --- a/receiver/gitproviderreceiver/package_test.go +++ b/receiver/gitproviderreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/haproxyreceiver/internal/metadata/package_test.go b/receiver/haproxyreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/haproxyreceiver/internal/metadata/package_test.go +++ b/receiver/haproxyreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/haproxyreceiver/package_test.go b/receiver/haproxyreceiver/package_test.go index 838993e9ca9b..0c2c11236b81 100644 --- a/receiver/haproxyreceiver/package_test.go +++ b/receiver/haproxyreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/internal/metadata/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/internal/metadata/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/package_test.go index 75437cc8c442..f8ec4100442a 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/cpuscraper/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/internal/metadata/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/internal/metadata/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/package_test.go index 321219b98d94..87820d4586fa 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/diskscraper/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/diskscraper/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/internal/metadata/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/internal/metadata/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/package_test.go index a6a31cac7a11..a6dc338a5136 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/filesystemscraper/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/loadscraper/internal/metadata/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/loadscraper/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/loadscraper/internal/metadata/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/loadscraper/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/loadscraper/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/loadscraper/package_test.go index d2515f9a6da2..080209ffda22 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/loadscraper/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/loadscraper/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/internal/metadata/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/internal/metadata/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/package_test.go index 0143204cfcaa..e072fcd6aed6 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/memoryscraper/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/package_test.go index d66d67149d45..e6b28219d5ae 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/internal/metadata/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/internal/metadata/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/package_test.go index e95735b196ec..d7265fcd402c 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/pagingscraper/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/processesscraper/internal/metadata/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/processesscraper/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processesscraper/internal/metadata/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processesscraper/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/processesscraper/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/processesscraper/package_test.go index e0a07ea30b2b..f8548f1a5d7d 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processesscraper/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processesscraper/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/metadata/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/metadata/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processscraper/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/internal/scraper/processscraper/package_test.go b/receiver/hostmetricsreceiver/internal/scraper/processscraper/package_test.go index 18644e6935d7..668a212dce14 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processscraper/package_test.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processscraper/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/hostmetricsreceiver/package_test.go b/receiver/hostmetricsreceiver/package_test.go index 261d9dadc66a..d0d4ed0605f0 100644 --- a/receiver/hostmetricsreceiver/package_test.go +++ b/receiver/hostmetricsreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/httpcheckreceiver/internal/metadata/package_test.go b/receiver/httpcheckreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/httpcheckreceiver/internal/metadata/package_test.go +++ b/receiver/httpcheckreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/httpcheckreceiver/package_test.go b/receiver/httpcheckreceiver/package_test.go index 1ff5a8d4e872..b16c30142f2c 100644 --- a/receiver/httpcheckreceiver/package_test.go +++ b/receiver/httpcheckreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/iisreceiver/internal/metadata/package_test.go b/receiver/iisreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/iisreceiver/internal/metadata/package_test.go +++ b/receiver/iisreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/iisreceiver/package_test.go b/receiver/iisreceiver/package_test.go index 77a2fe0e3a9b..7ba270504668 100644 --- a/receiver/iisreceiver/package_test.go +++ b/receiver/iisreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/influxdbreceiver/package_test.go b/receiver/influxdbreceiver/package_test.go index f6425fdb8540..80c5660aa3d5 100644 --- a/receiver/influxdbreceiver/package_test.go +++ b/receiver/influxdbreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/journaldreceiver/README.md b/receiver/journaldreceiver/README.md index ddb41bdd11be..4ad8e271b6a6 100644 --- a/receiver/journaldreceiver/README.md +++ b/receiver/journaldreceiver/README.md @@ -35,6 +35,7 @@ Journald receiver requires that: | `grep` | | Filter output to entries where the MESSAGE= field matches the specified regular expression. See [Multiple filtering options](#multiple-filtering-options) examples. | | `dmesg` | 'false' | Show only kernel messages. This shows logs from current boot and adds the match `_TRANSPORT=kernel`. See [Multiple filtering options](#multiple-filtering-options) examples. | | `storage` | none | The ID of a storage extension to be used to store cursors. Cursors allow the receiver to pick up where it left off in the case of a collector restart. If no storage extension is used, the receiver will manage cursors in memory only. | +| `all` | 'false' | If `true`, very long logs and logs with unprintable characters will also be included. | | `retry_on_failure.enabled` | `false` | If `true`, the receiver will pause reading a file and attempt to resend the current batch of logs if it encounters an error from downstream components. | | `retry_on_failure.initial_interval` | `1 second` | Time to wait after the first failure before retrying. | | `retry_on_failure.max_interval` | `30 seconds` | Upper bound on retry backoff interval. Once this value is reached the delay between consecutive retries will remain constant at the specified value. | diff --git a/receiver/journaldreceiver/package_test.go b/receiver/journaldreceiver/package_test.go index dc604ce13f96..333b8a714370 100644 --- a/receiver/journaldreceiver/package_test.go +++ b/receiver/journaldreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/clusterresourcequota/package_test.go b/receiver/k8sclusterreceiver/internal/clusterresourcequota/package_test.go index a2a375983966..6a481aff9f15 100644 --- a/receiver/k8sclusterreceiver/internal/clusterresourcequota/package_test.go +++ b/receiver/k8sclusterreceiver/internal/clusterresourcequota/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/collection/package_test.go b/receiver/k8sclusterreceiver/internal/collection/package_test.go index 1b6e3b693206..3cd1cc97d518 100644 --- a/receiver/k8sclusterreceiver/internal/collection/package_test.go +++ b/receiver/k8sclusterreceiver/internal/collection/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/cronjob/package_test.go b/receiver/k8sclusterreceiver/internal/cronjob/package_test.go index 2badc58d9d33..79303916cf10 100644 --- a/receiver/k8sclusterreceiver/internal/cronjob/package_test.go +++ b/receiver/k8sclusterreceiver/internal/cronjob/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/demonset/package_test.go b/receiver/k8sclusterreceiver/internal/demonset/package_test.go index 00ae939fa680..cbb7f74afde5 100644 --- a/receiver/k8sclusterreceiver/internal/demonset/package_test.go +++ b/receiver/k8sclusterreceiver/internal/demonset/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/deployment/package_test.go b/receiver/k8sclusterreceiver/internal/deployment/package_test.go index 6a15758d0108..fb0b61678f40 100644 --- a/receiver/k8sclusterreceiver/internal/deployment/package_test.go +++ b/receiver/k8sclusterreceiver/internal/deployment/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/hpa/package_test.go b/receiver/k8sclusterreceiver/internal/hpa/package_test.go index 74e4848d23b7..02a24d37bcbf 100644 --- a/receiver/k8sclusterreceiver/internal/hpa/package_test.go +++ b/receiver/k8sclusterreceiver/internal/hpa/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/jobs/package_test.go b/receiver/k8sclusterreceiver/internal/jobs/package_test.go index 59cb166ec229..170b7336aefa 100644 --- a/receiver/k8sclusterreceiver/internal/jobs/package_test.go +++ b/receiver/k8sclusterreceiver/internal/jobs/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/metadata/package_test.go b/receiver/k8sclusterreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/k8sclusterreceiver/internal/metadata/package_test.go +++ b/receiver/k8sclusterreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/namespace/package_test.go b/receiver/k8sclusterreceiver/internal/namespace/package_test.go index 169d5069919f..bd0eb3cc5084 100644 --- a/receiver/k8sclusterreceiver/internal/namespace/package_test.go +++ b/receiver/k8sclusterreceiver/internal/namespace/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/node/package_test.go b/receiver/k8sclusterreceiver/internal/node/package_test.go index 558cfc86cba9..5cdd36029699 100644 --- a/receiver/k8sclusterreceiver/internal/node/package_test.go +++ b/receiver/k8sclusterreceiver/internal/node/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/pod/package_test.go b/receiver/k8sclusterreceiver/internal/pod/package_test.go index f85dcd0fd759..fa2addb15c5f 100644 --- a/receiver/k8sclusterreceiver/internal/pod/package_test.go +++ b/receiver/k8sclusterreceiver/internal/pod/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/replicaset/package_test.go b/receiver/k8sclusterreceiver/internal/replicaset/package_test.go index a1caec09a4b7..c769894f0e9a 100644 --- a/receiver/k8sclusterreceiver/internal/replicaset/package_test.go +++ b/receiver/k8sclusterreceiver/internal/replicaset/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/replicationcontroller/package_test.go b/receiver/k8sclusterreceiver/internal/replicationcontroller/package_test.go index 5163b4cc18a7..e97f48767d48 100644 --- a/receiver/k8sclusterreceiver/internal/replicationcontroller/package_test.go +++ b/receiver/k8sclusterreceiver/internal/replicationcontroller/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/resourcequota/package_test.go b/receiver/k8sclusterreceiver/internal/resourcequota/package_test.go index 4733b3a992a2..7180a2598520 100644 --- a/receiver/k8sclusterreceiver/internal/resourcequota/package_test.go +++ b/receiver/k8sclusterreceiver/internal/resourcequota/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/k8sclusterreceiver/internal/statefulset/package_test.go b/receiver/k8sclusterreceiver/internal/statefulset/package_test.go index 7e608433a84d..ebf6319023cf 100644 --- a/receiver/k8sclusterreceiver/internal/statefulset/package_test.go +++ b/receiver/k8sclusterreceiver/internal/statefulset/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/kafkametricsreceiver/internal/metadata/package_test.go b/receiver/kafkametricsreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/kafkametricsreceiver/internal/metadata/package_test.go +++ b/receiver/kafkametricsreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/kafkametricsreceiver/package_test.go b/receiver/kafkametricsreceiver/package_test.go index 6ee0ea2523ca..7b7f2a1c3fda 100644 --- a/receiver/kafkametricsreceiver/package_test.go +++ b/receiver/kafkametricsreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/kubeletstatsreceiver/internal/kubelet/package_test.go b/receiver/kubeletstatsreceiver/internal/kubelet/package_test.go index 6409b75cf9fb..09546bfd4d9a 100644 --- a/receiver/kubeletstatsreceiver/internal/kubelet/package_test.go +++ b/receiver/kubeletstatsreceiver/internal/kubelet/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/kubeletstatsreceiver/internal/metadata/package_test.go b/receiver/kubeletstatsreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/kubeletstatsreceiver/internal/metadata/package_test.go +++ b/receiver/kubeletstatsreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/lokireceiver/package_test.go b/receiver/lokireceiver/package_test.go index dcc3f1afcd10..772bf02240ed 100644 --- a/receiver/lokireceiver/package_test.go +++ b/receiver/lokireceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/memcachedreceiver/internal/metadata/package_test.go b/receiver/memcachedreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/memcachedreceiver/internal/metadata/package_test.go +++ b/receiver/memcachedreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/memcachedreceiver/package_test.go b/receiver/memcachedreceiver/package_test.go index cb1504d6f1de..abc6bf2546a0 100644 --- a/receiver/memcachedreceiver/package_test.go +++ b/receiver/memcachedreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/mongodbatlasreceiver/internal/metadata/package_test.go b/receiver/mongodbatlasreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/mongodbatlasreceiver/internal/metadata/package_test.go +++ b/receiver/mongodbatlasreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/mongodbreceiver/internal/metadata/package_test.go b/receiver/mongodbreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/mongodbreceiver/internal/metadata/package_test.go +++ b/receiver/mongodbreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/mongodbreceiver/package_test.go b/receiver/mongodbreceiver/package_test.go index f4d7979565aa..cd15b1c3fe54 100644 --- a/receiver/mongodbreceiver/package_test.go +++ b/receiver/mongodbreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/mysqlreceiver/internal/metadata/package_test.go b/receiver/mysqlreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/mysqlreceiver/internal/metadata/package_test.go +++ b/receiver/mysqlreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/mysqlreceiver/package_test.go b/receiver/mysqlreceiver/package_test.go index 47234f42d8fe..691792482a4c 100644 --- a/receiver/mysqlreceiver/package_test.go +++ b/receiver/mysqlreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/nginxreceiver/internal/metadata/package_test.go b/receiver/nginxreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/nginxreceiver/internal/metadata/package_test.go +++ b/receiver/nginxreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/nsxtreceiver/internal/metadata/package_test.go b/receiver/nsxtreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/nsxtreceiver/internal/metadata/package_test.go +++ b/receiver/nsxtreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/opencensusreceiver/internal/ocmetrics/package_test.go b/receiver/opencensusreceiver/internal/ocmetrics/package_test.go index a080456240b3..2cd3908a5358 100644 --- a/receiver/opencensusreceiver/internal/ocmetrics/package_test.go +++ b/receiver/opencensusreceiver/internal/ocmetrics/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/opencensusreceiver/internal/octrace/package_test.go b/receiver/opencensusreceiver/internal/octrace/package_test.go index f10e33bbaf90..3383dc22a3b1 100644 --- a/receiver/opencensusreceiver/internal/octrace/package_test.go +++ b/receiver/opencensusreceiver/internal/octrace/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/oracledbreceiver/internal/metadata/package_test.go b/receiver/oracledbreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/oracledbreceiver/internal/metadata/package_test.go +++ b/receiver/oracledbreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/oracledbreceiver/package_test.go b/receiver/oracledbreceiver/package_test.go index 7cc6a314b219..28435bb6df0c 100644 --- a/receiver/oracledbreceiver/package_test.go +++ b/receiver/oracledbreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/osqueryreceiver/package_test.go b/receiver/osqueryreceiver/package_test.go index 05f3af407c7e..e1844d0e2240 100644 --- a/receiver/osqueryreceiver/package_test.go +++ b/receiver/osqueryreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/otlpjsonfilereceiver/package_test.go b/receiver/otlpjsonfilereceiver/package_test.go index 029d5468a1f0..1780dd816600 100644 --- a/receiver/otlpjsonfilereceiver/package_test.go +++ b/receiver/otlpjsonfilereceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/postgresqlreceiver/internal/metadata/package_test.go b/receiver/postgresqlreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/postgresqlreceiver/internal/metadata/package_test.go +++ b/receiver/postgresqlreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/postgresqlreceiver/package_test.go b/receiver/postgresqlreceiver/package_test.go index 7ba394126fd7..b64d95ca01b4 100644 --- a/receiver/postgresqlreceiver/package_test.go +++ b/receiver/postgresqlreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/rabbitmqreceiver/internal/metadata/package_test.go b/receiver/rabbitmqreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/rabbitmqreceiver/internal/metadata/package_test.go +++ b/receiver/rabbitmqreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/rabbitmqreceiver/package_test.go b/receiver/rabbitmqreceiver/package_test.go index 8fb059802493..30a21d15b1b4 100644 --- a/receiver/rabbitmqreceiver/package_test.go +++ b/receiver/rabbitmqreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/receivercreator/package_test.go b/receiver/receivercreator/package_test.go index 97e319b9fc86..46461061c862 100644 --- a/receiver/receivercreator/package_test.go +++ b/receiver/receivercreator/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/redisreceiver/internal/metadata/package_test.go b/receiver/redisreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/redisreceiver/internal/metadata/package_test.go +++ b/receiver/redisreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/redisreceiver/package_test.go b/receiver/redisreceiver/package_test.go index de8c8498677f..c88149425f20 100644 --- a/receiver/redisreceiver/package_test.go +++ b/receiver/redisreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/riakreceiver/internal/metadata/package_test.go b/receiver/riakreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/riakreceiver/internal/metadata/package_test.go +++ b/receiver/riakreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/riakreceiver/package_test.go b/receiver/riakreceiver/package_test.go index 7c81e3b6b0d9..f095cb1e48d0 100644 --- a/receiver/riakreceiver/package_test.go +++ b/receiver/riakreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/saphanareceiver/internal/metadata/package_test.go b/receiver/saphanareceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/saphanareceiver/internal/metadata/package_test.go +++ b/receiver/saphanareceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/skywalkingreceiver/package_test.go b/receiver/skywalkingreceiver/package_test.go index 5d92511bfbce..8afc0d7dd8de 100644 --- a/receiver/skywalkingreceiver/package_test.go +++ b/receiver/skywalkingreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/snmpreceiver/package_test.go b/receiver/snmpreceiver/package_test.go index 11b262f9a62f..c553e4931ff1 100644 --- a/receiver/snmpreceiver/package_test.go +++ b/receiver/snmpreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/snowflakereceiver/internal/metadata/package_test.go b/receiver/snowflakereceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/snowflakereceiver/internal/metadata/package_test.go +++ b/receiver/snowflakereceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/splunkenterprisereceiver/internal/metadata/package_test.go b/receiver/splunkenterprisereceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/splunkenterprisereceiver/internal/metadata/package_test.go +++ b/receiver/splunkenterprisereceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/splunkenterprisereceiver/package_test.go b/receiver/splunkenterprisereceiver/package_test.go index 7c16d334de25..51caab706c73 100644 --- a/receiver/splunkenterprisereceiver/package_test.go +++ b/receiver/splunkenterprisereceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/sqlqueryreceiver/config.go b/receiver/sqlqueryreceiver/config.go index 5b37abf5f58a..d83427f37365 100644 --- a/receiver/sqlqueryreceiver/config.go +++ b/receiver/sqlqueryreceiver/config.go @@ -4,186 +4,29 @@ package sqlqueryreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver" import ( - "errors" - "fmt" "time" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/receiver/scraperhelper" - "go.uber.org/multierr" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver/internal/metadata" ) type Config struct { - scraperhelper.ScraperControllerSettings `mapstructure:",squash"` - Driver string `mapstructure:"driver"` - DataSource string `mapstructure:"datasource"` - Queries []Query `mapstructure:"queries"` - StorageID *component.ID `mapstructure:"storage"` - Telemetry TelemetryConfig `mapstructure:"telemetry"` + sqlquery.Config `mapstructure:",squash"` } func (c Config) Validate() error { - if c.Driver == "" { - return errors.New("'driver' cannot be empty") - } - if c.DataSource == "" { - return errors.New("'datasource' cannot be empty") - } - if len(c.Queries) == 0 { - return errors.New("'queries' cannot be empty") - } - for _, query := range c.Queries { - if err := query.Validate(); err != nil { - return err - } - } return nil } -type Query struct { - SQL string `mapstructure:"sql"` - Metrics []MetricCfg `mapstructure:"metrics"` - Logs []LogsCfg `mapstructure:"logs"` - TrackingColumn string `mapstructure:"tracking_column"` - TrackingStartValue string `mapstructure:"tracking_start_value"` -} - -func (q Query) Validate() error { - var errs error - if q.SQL == "" { - errs = multierr.Append(errs, errors.New("'query.sql' cannot be empty")) - } - if len(q.Logs) == 0 && len(q.Metrics) == 0 { - errs = multierr.Append(errs, errors.New("at least one of 'query.logs' and 'query.metrics' must not be empty")) - } - for _, logs := range q.Logs { - if err := logs.Validate(); err != nil { - errs = multierr.Append(errs, err) - } - } - for _, metric := range q.Metrics { - if err := metric.Validate(); err != nil { - errs = multierr.Append(errs, err) - } - } - return errs -} - -type LogsCfg struct { - BodyColumn string `mapstructure:"body_column"` -} - -func (config LogsCfg) Validate() error { - var errs error - if config.BodyColumn == "" { - errs = multierr.Append(errs, errors.New("'body_column' must not be empty")) - } - return errs -} - -type MetricCfg struct { - MetricName string `mapstructure:"metric_name"` - ValueColumn string `mapstructure:"value_column"` - AttributeColumns []string `mapstructure:"attribute_columns"` - Monotonic bool `mapstructure:"monotonic"` - ValueType MetricValueType `mapstructure:"value_type"` - DataType MetricType `mapstructure:"data_type"` - Aggregation MetricAggregation `mapstructure:"aggregation"` - Unit string `mapstructure:"unit"` - Description string `mapstructure:"description"` - StaticAttributes map[string]string `mapstructure:"static_attributes"` - StartTsColumn string `mapstructure:"start_ts_column"` - TsColumn string `mapstructure:"ts_column"` -} - -func (c MetricCfg) Validate() error { - var errs error - if c.MetricName == "" { - errs = multierr.Append(errs, errors.New("'metric_name' cannot be empty")) - } - if c.ValueColumn == "" { - errs = multierr.Append(errs, errors.New("'value_column' cannot be empty")) - } - if err := c.ValueType.Validate(); err != nil { - errs = multierr.Append(errs, err) - } - if err := c.DataType.Validate(); err != nil { - errs = multierr.Append(errs, err) - } - if err := c.Aggregation.Validate(); err != nil { - errs = multierr.Append(errs, err) - } - if c.DataType == MetricTypeGauge && c.Aggregation != "" { - errs = multierr.Append(errs, fmt.Errorf("aggregation=%s but data_type=%s does not support aggregation", c.Aggregation, c.DataType)) - } - if errs != nil && c.MetricName != "" { - errs = multierr.Append(fmt.Errorf("invalid metric config with metric_name '%s'", c.MetricName), errs) - } - return errs -} - -type MetricType string - -const ( - MetricTypeUnspecified MetricType = "" - MetricTypeGauge MetricType = "gauge" - MetricTypeSum MetricType = "sum" -) - -func (t MetricType) Validate() error { - switch t { - case MetricTypeUnspecified, MetricTypeGauge, MetricTypeSum: - return nil - } - return fmt.Errorf("metric config has unsupported data_type: '%s'", t) -} - -type MetricValueType string - -const ( - MetricValueTypeUnspecified MetricValueType = "" - MetricValueTypeInt MetricValueType = "int" - MetricValueTypeDouble MetricValueType = "double" -) - -func (t MetricValueType) Validate() error { - switch t { - case MetricValueTypeUnspecified, MetricValueTypeInt, MetricValueTypeDouble: - return nil - } - return fmt.Errorf("metric config has unsupported value_type: '%s'", t) -} - -type MetricAggregation string - -const ( - MetricAggregationUnspecified MetricAggregation = "" - MetricAggregationCumulative MetricAggregation = "cumulative" - MetricAggregationDelta MetricAggregation = "delta" -) - -func (a MetricAggregation) Validate() error { - switch a { - case MetricAggregationUnspecified, MetricAggregationCumulative, MetricAggregationDelta: - return nil - } - return fmt.Errorf("metric config has unsupported aggregation: '%s'", a) -} - func createDefaultConfig() component.Config { cfg := scraperhelper.NewDefaultScraperControllerSettings(metadata.Type) cfg.CollectionInterval = 10 * time.Second return &Config{ - ScraperControllerSettings: cfg, + Config: sqlquery.Config{ + ScraperControllerSettings: cfg, + }, } } - -type TelemetryConfig struct { - Logs TelemetryLogsConfig `mapstructure:"logs"` -} - -type TelemetryLogsConfig struct { - Query bool `mapstructure:"query"` -} diff --git a/receiver/sqlqueryreceiver/config_test.go b/receiver/sqlqueryreceiver/config_test.go index 56893e428f94..d4d4e11b2f7f 100644 --- a/receiver/sqlqueryreceiver/config_test.go +++ b/receiver/sqlqueryreceiver/config_test.go @@ -14,6 +14,7 @@ import ( "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/receiver/scraperhelper" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver/internal/metadata" ) @@ -30,25 +31,27 @@ func TestLoadConfig(t *testing.T) { id: component.NewIDWithName(metadata.Type, ""), fname: "config.yaml", expected: &Config{ - ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ - CollectionInterval: 10 * time.Second, - InitialDelay: time.Second, - }, - Driver: "mydriver", - DataSource: "host=localhost port=5432 user=me password=s3cr3t sslmode=disable", - Queries: []Query{ - { - SQL: "select count(*) as count, type from mytable group by type", - Metrics: []MetricCfg{ - { - MetricName: "val.count", - ValueColumn: "count", - AttributeColumns: []string{"type"}, - Monotonic: false, - ValueType: MetricValueTypeInt, - DataType: MetricTypeSum, - Aggregation: MetricAggregationCumulative, - StaticAttributes: map[string]string{"foo": "bar"}, + Config: sqlquery.Config{ + ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ + CollectionInterval: 10 * time.Second, + InitialDelay: time.Second, + }, + Driver: "mydriver", + DataSource: "host=localhost port=5432 user=me password=s3cr3t sslmode=disable", + Queries: []sqlquery.Query{ + { + SQL: "select count(*) as count, type from mytable group by type", + Metrics: []sqlquery.MetricCfg{ + { + MetricName: "val.count", + ValueColumn: "count", + AttributeColumns: []string{"type"}, + Monotonic: false, + ValueType: sqlquery.MetricValueTypeInt, + DataType: sqlquery.MetricTypeSum, + Aggregation: sqlquery.MetricAggregationCumulative, + StaticAttributes: map[string]string{"foo": "bar"}, + }, }, }, }, @@ -109,20 +112,22 @@ func TestLoadConfig(t *testing.T) { fname: "config-logs.yaml", id: component.NewIDWithName(metadata.Type, ""), expected: &Config{ - ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ - CollectionInterval: 10 * time.Second, - InitialDelay: time.Second, - }, - Driver: "mydriver", - DataSource: "host=localhost port=5432 user=me password=s3cr3t sslmode=disable", - Queries: []Query{ - { - SQL: "select * from test_logs where log_id > ?", - TrackingColumn: "log_id", - TrackingStartValue: "10", - Logs: []LogsCfg{ - { - BodyColumn: "log_body", + Config: sqlquery.Config{ + ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ + CollectionInterval: 10 * time.Second, + InitialDelay: time.Second, + }, + Driver: "mydriver", + DataSource: "host=localhost port=5432 user=me password=s3cr3t sslmode=disable", + Queries: []sqlquery.Query{ + { + SQL: "select * from test_logs where log_id > ?", + TrackingColumn: "log_id", + TrackingStartValue: "10", + Logs: []sqlquery.LogsCfg{ + { + BodyColumn: "log_body", + }, }, }, }, @@ -165,7 +170,7 @@ func TestLoadConfig(t *testing.T) { func TestCreateDefaultConfig(t *testing.T) { cfg := createDefaultConfig().(*Config) - assert.Equal(t, 10*time.Second, cfg.ScraperControllerSettings.CollectionInterval) + assert.Equal(t, 10*time.Second, cfg.Config.ScraperControllerSettings.CollectionInterval) } func TestConfig_Validate_Multierr(t *testing.T) { diff --git a/receiver/sqlqueryreceiver/db_client.go b/receiver/sqlqueryreceiver/db_client.go deleted file mode 100644 index 2afa56f3e51e..000000000000 --- a/receiver/sqlqueryreceiver/db_client.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package sqlqueryreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver" - -import ( - "context" - - // register db drivers - _ "github.com/SAP/go-hdb/driver" - _ "github.com/go-sql-driver/mysql" - _ "github.com/lib/pq" - _ "github.com/microsoft/go-mssqldb" - _ "github.com/microsoft/go-mssqldb/integratedauth/krb5" - _ "github.com/sijms/go-ora/v2" - _ "github.com/snowflakedb/gosnowflake" - "go.uber.org/multierr" - "go.uber.org/zap" -) - -type stringMap map[string]string - -type dbClient interface { - queryRows(ctx context.Context, args ...any) ([]stringMap, error) -} - -type dbSQLClient struct { - db db - logger *zap.Logger - telemetryConfig TelemetryConfig - sql string -} - -func newDbClient(db db, sql string, logger *zap.Logger, telemetryConfig TelemetryConfig) dbClient { - return dbSQLClient{ - db: db, - sql: sql, - logger: logger, - telemetryConfig: telemetryConfig, - } -} - -func (cl dbSQLClient) queryRows(ctx context.Context, args ...any) ([]stringMap, error) { - cl.logger.Debug("Running query", cl.prepareQueryFields(cl.sql, args)...) - sqlRows, err := cl.db.QueryContext(ctx, cl.sql, args...) - if err != nil { - return nil, err - } - var out []stringMap - colTypes, err := sqlRows.ColumnTypes() - if err != nil { - return nil, err - } - scanner := newRowScanner(colTypes) - var warnings error - for sqlRows.Next() { - err = scanner.scan(sqlRows) - if err != nil { - return nil, err - } - sm, scanErr := scanner.toStringMap() - if scanErr != nil { - warnings = multierr.Append(warnings, scanErr) - } - out = append(out, sm) - } - return out, warnings -} - -func (cl dbSQLClient) prepareQueryFields(sql string, args []any) []zap.Field { - var logFields []zap.Field - if cl.telemetryConfig.Logs.Query { - logFields = append(logFields, zap.String("query", sql)) - logFields = append(logFields, zap.Any("parameters", args)) - } - return logFields -} diff --git a/receiver/sqlqueryreceiver/factory.go b/receiver/sqlqueryreceiver/factory.go index b72c1c37a2f2..2b31320b98d9 100644 --- a/receiver/sqlqueryreceiver/factory.go +++ b/receiver/sqlqueryreceiver/factory.go @@ -8,6 +8,7 @@ import ( "go.opentelemetry.io/collector/receiver" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver/internal/metadata" ) @@ -15,7 +16,7 @@ func NewFactory() receiver.Factory { return receiver.NewFactory( metadata.Type, createDefaultConfig, - receiver.WithLogs(createLogsReceiverFunc(sql.Open, newDbClient), metadata.LogsStability), - receiver.WithMetrics(createMetricsReceiverFunc(sql.Open, newDbClient), metadata.MetricsStability), + receiver.WithLogs(createLogsReceiverFunc(sql.Open, sqlquery.NewDbClient), metadata.LogsStability), + receiver.WithMetrics(createMetricsReceiverFunc(sql.Open, sqlquery.NewDbClient), metadata.MetricsStability), ) } diff --git a/receiver/sqlqueryreceiver/go.mod b/receiver/sqlqueryreceiver/go.mod index 74e5fcb13a68..77d1d78e48ec 100644 --- a/receiver/sqlqueryreceiver/go.mod +++ b/receiver/sqlqueryreceiver/go.mod @@ -3,17 +3,12 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlque go 1.20 require ( - github.com/SAP/go-hdb v1.7.11 github.com/docker/go-connections v0.5.0 - github.com/go-sql-driver/mysql v1.7.1 - github.com/lib/pq v1.10.9 - github.com/microsoft/go-mssqldb v1.6.0 github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.93.0 + github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest v0.93.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza v0.93.0 - github.com/sijms/go-ora/v2 v2.8.6 - github.com/snowflakedb/gosnowflake v1.7.2 github.com/stretchr/testify v1.8.4 github.com/testcontainers/testcontainers-go v0.27.0 go.opentelemetry.io/collector/component v0.93.1-0.20240130182548-89388addcc7f @@ -39,6 +34,7 @@ require ( github.com/JohnCGriffin/overflow v0.0.0-20211019200055-46fa312c352c // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/SAP/go-hdb v1.7.11 // indirect github.com/apache/arrow/go/v14 v14.0.2 // indirect github.com/aws/aws-sdk-go-v2 v1.22.2 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect @@ -71,6 +67,7 @@ require ( github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/go-ole/go-ole v1.2.6 // indirect + github.com/go-sql-driver/mysql v1.7.1 // indirect github.com/goccy/go-json v0.10.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/protobuf v1.3.2 // indirect @@ -97,8 +94,10 @@ require ( github.com/knadh/koanf/providers/confmap v0.1.0 // indirect github.com/knadh/koanf/v2 v2.0.1 // indirect github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165 // indirect + github.com/lib/pq v1.10.9 // indirect github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect github.com/magiconair/properties v1.8.7 // indirect + github.com/microsoft/go-mssqldb v1.6.0 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect github.com/mitchellh/reflectwalk v1.0.2 // indirect @@ -125,7 +124,9 @@ require ( github.com/prometheus/procfs v0.12.0 // indirect github.com/shirou/gopsutil/v3 v3.23.12 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect + github.com/sijms/go-ora/v2 v2.8.6 // indirect github.com/sirupsen/logrus v1.9.3 // indirect + github.com/snowflakedb/gosnowflake v1.7.2 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/valyala/fastjson v1.6.4 // indirect @@ -178,3 +179,5 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza => replace github.com/docker/docker v24.0.4+incompatible => github.com/docker/docker v24.0.5-0.20230719162248-f022632503d1+incompatible replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden => ../../pkg/golden + +replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery => ../../internal/sqlquery diff --git a/receiver/sqlqueryreceiver/integration_test.go b/receiver/sqlqueryreceiver/integration_test.go index fe154e3a299d..f8ba19dc4737 100644 --- a/receiver/sqlqueryreceiver/integration_test.go +++ b/receiver/sqlqueryreceiver/integration_test.go @@ -29,6 +29,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage/storagetest" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/scraperinttest" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatatest/pmetrictest" ) @@ -49,10 +50,10 @@ func TestPostgresIntegrationLogsTrackingWithoutStorage(t *testing.T) { // Start the SQL Query receiver. receiver, config, consumer := createTestLogsReceiverForPostgres(t, externalPort) config.CollectionInterval = time.Second - config.Queries = []Query{ + config.Queries = []sqlquery.Query{ { SQL: "select * from simple_logs where id > $1", - Logs: []LogsCfg{ + Logs: []sqlquery.LogsCfg{ { BodyColumn: "body", }, @@ -85,10 +86,10 @@ func TestPostgresIntegrationLogsTrackingWithoutStorage(t *testing.T) { // Start new SQL Query receiver with the same configuration. receiver, config, consumer = createTestLogsReceiverForPostgres(t, externalPort) config.CollectionInterval = time.Second - config.Queries = []Query{ + config.Queries = []sqlquery.Query{ { SQL: "select * from simple_logs where id > $1", - Logs: []LogsCfg{ + Logs: []sqlquery.LogsCfg{ { BodyColumn: "body", }, @@ -136,10 +137,10 @@ func TestPostgresIntegrationLogsTrackingWithStorage(t *testing.T) { receiver, config, consumer := createTestLogsReceiverForPostgres(t, externalPort) config.CollectionInterval = time.Second config.StorageID = &storageExtension.ID - config.Queries = []Query{ + config.Queries = []sqlquery.Query{ { SQL: "select * from simple_logs where id > $1", - Logs: []LogsCfg{ + Logs: []sqlquery.LogsCfg{ { BodyColumn: "body", }, @@ -178,10 +179,10 @@ func TestPostgresIntegrationLogsTrackingWithStorage(t *testing.T) { receiver, config, consumer = createTestLogsReceiverForPostgres(t, externalPort) config.CollectionInterval = time.Second config.StorageID = &storageExtension.ID - config.Queries = []Query{ + config.Queries = []sqlquery.Query{ { SQL: "select * from simple_logs where id > $1", - Logs: []LogsCfg{ + Logs: []sqlquery.LogsCfg{ { BodyColumn: "body", }, @@ -211,10 +212,10 @@ func TestPostgresIntegrationLogsTrackingWithStorage(t *testing.T) { receiver, config, consumer = createTestLogsReceiverForPostgres(t, externalPort) config.CollectionInterval = time.Second config.StorageID = &storageExtension.ID - config.Queries = []Query{ + config.Queries = []sqlquery.Query{ { SQL: "select * from simple_logs where id > $1", - Logs: []LogsCfg{ + Logs: []sqlquery.LogsCfg{ { BodyColumn: "body", }, @@ -354,77 +355,77 @@ func TestPostgresqlIntegrationMetrics(t *testing.T) { rCfg.Driver = "postgres" rCfg.DataSource = fmt.Sprintf("host=%s port=%s user=otel password=otel sslmode=disable", ci.Host(t), ci.MappedPort(t, postgresqlPort)) - rCfg.Queries = []Query{ + rCfg.Queries = []sqlquery.Query{ { SQL: "select genre, count(*), avg(imdb_rating) from movie group by genre", - Metrics: []MetricCfg{ + Metrics: []sqlquery.MetricCfg{ { MetricName: "genre.count", ValueColumn: "count", AttributeColumns: []string{"genre"}, - ValueType: MetricValueTypeInt, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeInt, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "genre.imdb", ValueColumn: "avg", AttributeColumns: []string{"genre"}, - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, }, }, { SQL: "select 1::smallint as a, 2::integer as b, 3::bigint as c, 4.1::decimal as d," + " 4.2::numeric as e, 4.3::real as f, 4.4::double precision as g, null as h", - Metrics: []MetricCfg{ + Metrics: []sqlquery.MetricCfg{ { MetricName: "a", ValueColumn: "a", - ValueType: MetricValueTypeInt, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeInt, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "b", ValueColumn: "b", - ValueType: MetricValueTypeInt, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeInt, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "c", ValueColumn: "c", - ValueType: MetricValueTypeInt, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeInt, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "d", ValueColumn: "d", - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "e", ValueColumn: "e", - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "f", ValueColumn: "f", - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "g", ValueColumn: "g", - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "h", ValueColumn: "h", - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, }, }, @@ -467,23 +468,23 @@ func TestOracleDBIntegrationMetrics(t *testing.T) { rCfg.Driver = "oracle" rCfg.DataSource = fmt.Sprintf("oracle://otel:p@ssw%%25rd@%s:%s/XE", ci.Host(t), ci.MappedPort(t, oraclePort)) - rCfg.Queries = []Query{ + rCfg.Queries = []sqlquery.Query{ { SQL: "select genre, count(*) as count, avg(imdb_rating) as avg from sys.movie group by genre", - Metrics: []MetricCfg{ + Metrics: []sqlquery.MetricCfg{ { MetricName: "genre.count", ValueColumn: "COUNT", AttributeColumns: []string{"GENRE"}, - ValueType: MetricValueTypeInt, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeInt, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "genre.imdb", ValueColumn: "AVG", AttributeColumns: []string{"GENRE"}, - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, }, }, @@ -524,23 +525,23 @@ func TestMysqlIntegrationMetrics(t *testing.T) { rCfg.Driver = "mysql" rCfg.DataSource = fmt.Sprintf("otel:otel@tcp(%s:%s)/otel", ci.Host(t), ci.MappedPort(t, mysqlPort)) - rCfg.Queries = []Query{ + rCfg.Queries = []sqlquery.Query{ { SQL: "select genre, count(*), avg(imdb_rating) from movie group by genre", - Metrics: []MetricCfg{ + Metrics: []sqlquery.MetricCfg{ { MetricName: "genre.count", ValueColumn: "count(*)", AttributeColumns: []string{"genre"}, - ValueType: MetricValueTypeInt, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeInt, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "genre.imdb", ValueColumn: "avg(imdb_rating)", AttributeColumns: []string{"genre"}, - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, }, }, @@ -553,42 +554,42 @@ func TestMysqlIntegrationMetrics(t *testing.T) { "cast(3.3 as float) as e, " + "cast(3.4 as double) as f, " + "null as g", - Metrics: []MetricCfg{ + Metrics: []sqlquery.MetricCfg{ { MetricName: "a", ValueColumn: "a", - ValueType: MetricValueTypeInt, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeInt, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "b", ValueColumn: "b", - ValueType: MetricValueTypeInt, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeInt, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "c", ValueColumn: "c", - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "d", ValueColumn: "d", - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "e", ValueColumn: "e", - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, { MetricName: "f", ValueColumn: "f", - ValueType: MetricValueTypeDouble, - DataType: MetricTypeGauge, + ValueType: sqlquery.MetricValueTypeDouble, + DataType: sqlquery.MetricTypeGauge, }, }, }, diff --git a/receiver/sqlqueryreceiver/logs_receiver.go b/receiver/sqlqueryreceiver/logs_receiver.go index fb24433b5177..7372f8dcd47f 100644 --- a/receiver/sqlqueryreceiver/logs_receiver.go +++ b/receiver/sqlqueryreceiver/logs_receiver.go @@ -19,6 +19,7 @@ import ( "go.uber.org/multierr" "go.uber.org/zap" + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/stanza/adapter" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver/internal/metadata" ) @@ -26,8 +27,8 @@ import ( type logsReceiver struct { config *Config settings receiver.CreateSettings - createConnection dbProviderFunc - createClient clientProviderFunc + createConnection sqlquery.DbProviderFunc + createClient sqlquery.ClientProviderFunc queryReceivers []*logsQueryReceiver nextConsumer consumer.Logs @@ -43,8 +44,8 @@ type logsReceiver struct { func newLogsReceiver( config *Config, settings receiver.CreateSettings, - sqlOpenerFunc sqlOpenerFunc, - createClient clientProviderFunc, + sqlOpenerFunc sqlquery.SQLOpenerFunc, + createClient sqlquery.ClientProviderFunc, nextConsumer consumer.Logs, ) (*logsReceiver, error) { @@ -199,14 +200,14 @@ func (receiver *logsReceiver) stopCollecting() { type logsQueryReceiver struct { id string - query Query - createDb dbProviderFunc - createClient clientProviderFunc + query sqlquery.Query + createDb sqlquery.DbProviderFunc + createClient sqlquery.ClientProviderFunc logger *zap.Logger - telemetry TelemetryConfig + telemetry sqlquery.TelemetryConfig db *sql.DB - client dbClient + client sqlquery.DbClient trackingValue string // TODO: Extract persistence into its own component storageClient storage.Client @@ -215,11 +216,11 @@ type logsQueryReceiver struct { func newLogsQueryReceiver( id string, - query Query, - dbProviderFunc dbProviderFunc, - clientProviderFunc clientProviderFunc, + query sqlquery.Query, + dbProviderFunc sqlquery.DbProviderFunc, + clientProviderFunc sqlquery.ClientProviderFunc, logger *zap.Logger, - telemetry TelemetryConfig, + telemetry sqlquery.TelemetryConfig, storageClient storage.Client, ) *logsQueryReceiver { queryReceiver := &logsQueryReceiver{ @@ -246,7 +247,7 @@ func (queryReceiver *logsQueryReceiver) start(ctx context.Context) error { if err != nil { return fmt.Errorf("failed to open db connection: %w", err) } - queryReceiver.client = queryReceiver.createClient(dbWrapper{queryReceiver.db}, queryReceiver.query.SQL, queryReceiver.logger, queryReceiver.telemetry) + queryReceiver.client = queryReceiver.createClient(sqlquery.DbWrapper{Db: queryReceiver.db}, queryReceiver.query.SQL, queryReceiver.logger, queryReceiver.telemetry) queryReceiver.trackingValue = queryReceiver.retrieveTrackingValue(ctx) @@ -273,13 +274,13 @@ func (queryReceiver *logsQueryReceiver) retrieveTrackingValue(ctx context.Contex func (queryReceiver *logsQueryReceiver) collect(ctx context.Context) (plog.Logs, error) { logs := plog.NewLogs() - var rows []stringMap + var rows []sqlquery.StringMap var err error observedAt := pcommon.NewTimestampFromTime(time.Now()) if queryReceiver.query.TrackingColumn != "" { - rows, err = queryReceiver.client.queryRows(ctx, queryReceiver.trackingValue) + rows, err = queryReceiver.client.QueryRows(ctx, queryReceiver.trackingValue) } else { - rows, err = queryReceiver.client.queryRows(ctx) + rows, err = queryReceiver.client.QueryRows(ctx) } if err != nil { return logs, fmt.Errorf("error getting rows: %w", err) @@ -300,7 +301,7 @@ func (queryReceiver *logsQueryReceiver) collect(ctx context.Context) (plog.Logs, return logs, nil } -func (queryReceiver *logsQueryReceiver) storeTrackingValue(ctx context.Context, row stringMap) error { +func (queryReceiver *logsQueryReceiver) storeTrackingValue(ctx context.Context, row sqlquery.StringMap) error { if queryReceiver.query.TrackingColumn == "" { return nil } @@ -314,7 +315,7 @@ func (queryReceiver *logsQueryReceiver) storeTrackingValue(ctx context.Context, return nil } -func rowToLog(row stringMap, config LogsCfg, logRecord plog.LogRecord) { +func rowToLog(row sqlquery.StringMap, config sqlquery.LogsCfg, logRecord plog.LogRecord) { logRecord.Body().SetStr(row[config.BodyColumn]) } diff --git a/receiver/sqlqueryreceiver/logs_receiver_test.go b/receiver/sqlqueryreceiver/logs_receiver_test.go index b78b698bc898..34877c23ce23 100644 --- a/receiver/sqlqueryreceiver/logs_receiver_test.go +++ b/receiver/sqlqueryreceiver/logs_receiver_test.go @@ -10,20 +10,22 @@ import ( "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/pdata/pcommon" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" ) func TestLogsQueryReceiver_Collect(t *testing.T) { now := time.Now() - fakeClient := &fakeDBClient{ - stringMaps: [][]stringMap{ + fakeClient := &sqlquery.FakeDBClient{ + StringMaps: [][]sqlquery.StringMap{ {{"col1": "42"}, {"col1": "63"}}, }, } queryReceiver := logsQueryReceiver{ client: fakeClient, - query: Query{ - Logs: []LogsCfg{ + query: sqlquery.Query{ + Logs: []sqlquery.LogsCfg{ { BodyColumn: "col1", }, diff --git a/receiver/sqlqueryreceiver/receiver.go b/receiver/sqlqueryreceiver/receiver.go index 3228d51fcd9e..f9b54613e6e5 100644 --- a/receiver/sqlqueryreceiver/receiver.go +++ b/receiver/sqlqueryreceiver/receiver.go @@ -12,16 +12,11 @@ import ( "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/scraperhelper" - "go.uber.org/zap" -) - -type sqlOpenerFunc func(driverName, dataSourceName string) (*sql.DB, error) - -type dbProviderFunc func() (*sql.DB, error) -type clientProviderFunc func(db, string, *zap.Logger, TelemetryConfig) dbClient + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" +) -func createLogsReceiverFunc(sqlOpenerFunc sqlOpenerFunc, clientProviderFunc clientProviderFunc) receiver.CreateLogsFunc { +func createLogsReceiverFunc(sqlOpenerFunc sqlquery.SQLOpenerFunc, clientProviderFunc sqlquery.ClientProviderFunc) receiver.CreateLogsFunc { return func( ctx context.Context, settings receiver.CreateSettings, @@ -33,7 +28,7 @@ func createLogsReceiverFunc(sqlOpenerFunc sqlOpenerFunc, clientProviderFunc clie } } -func createMetricsReceiverFunc(sqlOpenerFunc sqlOpenerFunc, clientProviderFunc clientProviderFunc) receiver.CreateMetricsFunc { +func createMetricsReceiverFunc(sqlOpenerFunc sqlquery.SQLOpenerFunc, clientProviderFunc sqlquery.ClientProviderFunc) receiver.CreateMetricsFunc { return func( ctx context.Context, settings receiver.CreateSettings, @@ -47,17 +42,11 @@ func createMetricsReceiverFunc(sqlOpenerFunc sqlOpenerFunc, clientProviderFunc c continue } id := component.NewIDWithName("sqlqueryreceiver", fmt.Sprintf("query-%d: %s", i, query.SQL)) - mp := &scraper{ - id: id, - query: query, - scrapeCfg: sqlCfg.ScraperControllerSettings, - logger: settings.TelemetrySettings.Logger, - telemetry: sqlCfg.Telemetry, - dbProviderFunc: func() (*sql.DB, error) { - return sqlOpenerFunc(sqlCfg.Driver, sqlCfg.DataSource) - }, - clientProviderFunc: clientProviderFunc, + dbProviderFunc := func() (*sql.DB, error) { + return sqlOpenerFunc(sqlCfg.Driver, sqlCfg.DataSource) } + mp := sqlquery.NewScraper(id, query, sqlCfg.ScraperControllerSettings, settings.TelemetrySettings.Logger, sqlCfg.Config.Telemetry, dbProviderFunc, clientProviderFunc) + opt := scraperhelper.AddScraper(mp) opts = append(opts, opt) } diff --git a/receiver/sqlqueryreceiver/receiver_test.go b/receiver/sqlqueryreceiver/receiver_test.go index 7d222bc8613b..ff5cd49f9d53 100644 --- a/receiver/sqlqueryreceiver/receiver_test.go +++ b/receiver/sqlqueryreceiver/receiver_test.go @@ -15,6 +15,8 @@ import ( "go.opentelemetry.io/collector/receiver/receivertest" "go.opentelemetry.io/collector/receiver/scraperhelper" "go.uber.org/zap" + + "github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery" ) func TestCreateLogsReceiver(t *testing.T) { @@ -24,17 +26,19 @@ func TestCreateLogsReceiver(t *testing.T) { ctx, receivertest.NewNopCreateSettings(), &Config{ - ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ - CollectionInterval: 10 * time.Second, - }, - Driver: "mydriver", - DataSource: "my-datasource", - Queries: []Query{{ - SQL: "select * from foo", - Logs: []LogsCfg{ - {}, + Config: sqlquery.Config{ + ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ + CollectionInterval: 10 * time.Second, }, - }}, + Driver: "mydriver", + DataSource: "my-datasource", + Queries: []sqlquery.Query{{ + SQL: "select * from foo", + Logs: []sqlquery.LogsCfg{ + {}, + }, + }}, + }, }, consumertest.NewNop(), ) @@ -50,19 +54,21 @@ func TestCreateMetricsReceiver(t *testing.T) { ctx, receivertest.NewNopCreateSettings(), &Config{ - ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ - CollectionInterval: 10 * time.Second, - InitialDelay: time.Second, - }, - Driver: "mydriver", - DataSource: "my-datasource", - Queries: []Query{{ - SQL: "select * from foo", - Metrics: []MetricCfg{{ - MetricName: "my-metric", - ValueColumn: "my-column", + Config: sqlquery.Config{ + ScraperControllerSettings: scraperhelper.ScraperControllerSettings{ + CollectionInterval: 10 * time.Second, + InitialDelay: time.Second, + }, + Driver: "mydriver", + DataSource: "my-datasource", + Queries: []sqlquery.Query{{ + SQL: "select * from foo", + Metrics: []sqlquery.MetricCfg{{ + MetricName: "my-metric", + ValueColumn: "my-column", + }}, }}, - }}, + }, }, consumertest.NewNop(), ) @@ -75,6 +81,6 @@ func fakeDBConnect(string, string) (*sql.DB, error) { return nil, nil } -func mkFakeClient(db, string, *zap.Logger, TelemetryConfig) dbClient { - return &fakeDBClient{stringMaps: [][]stringMap{{{"foo": "111"}}}} +func mkFakeClient(sqlquery.Db, string, *zap.Logger, sqlquery.TelemetryConfig) sqlquery.DbClient { + return &sqlquery.FakeDBClient{StringMaps: [][]sqlquery.StringMap{{{"foo": "111"}}}} } diff --git a/receiver/sqlqueryreceiver/scraper.go b/receiver/sqlqueryreceiver/scraper.go deleted file mode 100644 index babd119be87f..000000000000 --- a/receiver/sqlqueryreceiver/scraper.go +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright The OpenTelemetry Authors -// SPDX-License-Identifier: Apache-2.0 - -package sqlqueryreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/sqlqueryreceiver" - -import ( - "context" - "database/sql" - "errors" - "fmt" - "time" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/pdata/pcommon" - "go.opentelemetry.io/collector/pdata/pmetric" - "go.opentelemetry.io/collector/receiver/scrapererror" - "go.opentelemetry.io/collector/receiver/scraperhelper" - "go.uber.org/multierr" - "go.uber.org/zap" -) - -type scraper struct { - id component.ID - query Query - scrapeCfg scraperhelper.ScraperControllerSettings - startTime pcommon.Timestamp - clientProviderFunc clientProviderFunc - dbProviderFunc dbProviderFunc - logger *zap.Logger - telemetry TelemetryConfig - client dbClient - db *sql.DB -} - -var _ scraperhelper.Scraper = (*scraper)(nil) - -func (s *scraper) ID() component.ID { - return s.id -} - -func (s *scraper) Start(context.Context, component.Host) error { - var err error - s.db, err = s.dbProviderFunc() - if err != nil { - return fmt.Errorf("failed to open db connection: %w", err) - } - s.client = s.clientProviderFunc(dbWrapper{s.db}, s.query.SQL, s.logger, s.telemetry) - s.startTime = pcommon.NewTimestampFromTime(time.Now()) - - return nil -} - -func (s *scraper) Scrape(ctx context.Context) (pmetric.Metrics, error) { - out := pmetric.NewMetrics() - rows, err := s.client.queryRows(ctx) - if err != nil { - if errors.Is(err, errNullValueWarning) { - s.logger.Warn("problems encountered getting metric rows", zap.Error(err)) - } else { - return out, fmt.Errorf("scraper: %w", err) - } - } - ts := pcommon.NewTimestampFromTime(time.Now()) - rms := out.ResourceMetrics() - rm := rms.AppendEmpty() - sms := rm.ScopeMetrics() - sm := sms.AppendEmpty() - ms := sm.Metrics() - var errs error - for _, metricCfg := range s.query.Metrics { - for i, row := range rows { - if err = rowToMetric(row, metricCfg, ms.AppendEmpty(), s.startTime, ts, s.scrapeCfg); err != nil { - err = fmt.Errorf("row %d: %w", i, err) - errs = multierr.Append(errs, err) - } - } - } - if errs != nil { - return out, scrapererror.NewPartialScrapeError(errs, len(multierr.Errors(errs))) - } - return out, nil -} - -func (s *scraper) Shutdown(_ context.Context) error { - if s.db != nil { - return s.db.Close() - } - return nil -} diff --git a/receiver/sqlserverreceiver/internal/metadata/package_test.go b/receiver/sqlserverreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/sqlserverreceiver/internal/metadata/package_test.go +++ b/receiver/sqlserverreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/sqlserverreceiver/package_test.go b/receiver/sqlserverreceiver/package_test.go index 37bae3453d33..2aed75e4608d 100644 --- a/receiver/sqlserverreceiver/package_test.go +++ b/receiver/sqlserverreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/sshcheckreceiver/internal/configssh/package_test.go b/receiver/sshcheckreceiver/internal/configssh/package_test.go index 97a5369566fa..3880cfe24aa4 100644 --- a/receiver/sshcheckreceiver/internal/configssh/package_test.go +++ b/receiver/sshcheckreceiver/internal/configssh/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/sshcheckreceiver/internal/metadata/package_test.go b/receiver/sshcheckreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/sshcheckreceiver/internal/metadata/package_test.go +++ b/receiver/sshcheckreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/statsdreceiver/package_test.go b/receiver/statsdreceiver/package_test.go index 7730f09fe281..22212e630214 100644 --- a/receiver/statsdreceiver/package_test.go +++ b/receiver/statsdreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/syslogreceiver/package_test.go b/receiver/syslogreceiver/package_test.go index fb2048e8458d..434090f51d69 100644 --- a/receiver/syslogreceiver/package_test.go +++ b/receiver/syslogreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/tcplogreceiver/package_test.go b/receiver/tcplogreceiver/package_test.go index 255a5fe3b5c4..624dadf8ff1d 100644 --- a/receiver/tcplogreceiver/package_test.go +++ b/receiver/tcplogreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/udplogreceiver/package_test.go b/receiver/udplogreceiver/package_test.go index 80695e5da5fe..63dedc33a79f 100644 --- a/receiver/udplogreceiver/package_test.go +++ b/receiver/udplogreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/vcenterreceiver/internal/metadata/package_test.go b/receiver/vcenterreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/vcenterreceiver/internal/metadata/package_test.go +++ b/receiver/vcenterreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/vcenterreceiver/package_test.go b/receiver/vcenterreceiver/package_test.go index c7301b240353..7cb2cde81a5b 100644 --- a/receiver/vcenterreceiver/package_test.go +++ b/receiver/vcenterreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/wavefrontreceiver/package_test.go b/receiver/wavefrontreceiver/package_test.go index 335576ea1e61..22f79a7e4ae6 100644 --- a/receiver/wavefrontreceiver/package_test.go +++ b/receiver/wavefrontreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/webhookeventreceiver/package_test.go b/receiver/webhookeventreceiver/package_test.go index 4537f4cd41b5..30290f231e8e 100644 --- a/receiver/webhookeventreceiver/package_test.go +++ b/receiver/webhookeventreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/windowseventlogreceiver/package_test.go b/receiver/windowseventlogreceiver/package_test.go index 70b5122d5ca9..32ea110d18c5 100644 --- a/receiver/windowseventlogreceiver/package_test.go +++ b/receiver/windowseventlogreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/windowsperfcountersreceiver/package_test.go b/receiver/windowsperfcountersreceiver/package_test.go index 9e6df6a686e9..1f6929cc43b8 100644 --- a/receiver/windowsperfcountersreceiver/package_test.go +++ b/receiver/windowsperfcountersreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/zipkinreceiver/package_test.go b/receiver/zipkinreceiver/package_test.go index c41da34c6957..6a9aa07443a0 100644 --- a/receiver/zipkinreceiver/package_test.go +++ b/receiver/zipkinreceiver/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/receiver/zookeeperreceiver/internal/metadata/package_test.go b/receiver/zookeeperreceiver/internal/metadata/package_test.go index c83588d3062e..1aba5ec4bb0b 100644 --- a/receiver/zookeeperreceiver/internal/metadata/package_test.go +++ b/receiver/zookeeperreceiver/internal/metadata/package_test.go @@ -9,9 +9,6 @@ import ( "go.uber.org/goleak" ) -// The IgnoreTopFunction call prevents catching the leak generated by opencensus -// defaultWorker.Start which at this time is part of the package's init call. -// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. func TestMain(m *testing.M) { - goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) + goleak.VerifyTestMain(m) } diff --git a/reports/distributions/contrib.yaml b/reports/distributions/contrib.yaml index b746e237753d..9cb33e5783bb 100644 --- a/reports/distributions/contrib.yaml +++ b/reports/distributions/contrib.yaml @@ -90,7 +90,6 @@ components: - resource - resourcedetection - routing - - servicegraph - span - spanmetrics - sumologic diff --git a/reports/distributions/sumo.yaml b/reports/distributions/sumo.yaml index 7064477973dd..586a09756347 100644 --- a/reports/distributions/sumo.yaml +++ b/reports/distributions/sumo.yaml @@ -39,6 +39,7 @@ components: - oidc - pprof - sigv4auth + - sumologic processor: - attributes - cumulativetodelta @@ -56,7 +57,6 @@ components: - resourcedetection - routing - schema - - servicegraph - span - spanmetrics - sumologic diff --git a/versions.yaml b/versions.yaml index 461476187f9a..bf624c473305 100644 --- a/versions.yaml +++ b/versions.yaml @@ -97,6 +97,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension - github.com/open-telemetry/opentelemetry-collector-contrib/extension/solarwindsapmsettingsextension - github.com/open-telemetry/opentelemetry-collector-contrib/extension/storage + - github.com/open-telemetry/opentelemetry-collector-contrib/extension/sumologicextension - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/awsutil - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/cwlogs - github.com/open-telemetry/opentelemetry-collector-contrib/internal/aws/containerinsight @@ -119,6 +120,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent - github.com/open-telemetry/opentelemetry-collector-contrib/internal/splunk + - github.com/open-telemetry/opentelemetry-collector-contrib/internal/sqlquery - github.com/open-telemetry/opentelemetry-collector-contrib/internal/datadog - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchperresourceattr - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal @@ -159,7 +161,6 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/routingprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/schemaprocessor - - github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanmetricsprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor - github.com/open-telemetry/opentelemetry-collector-contrib/processor/sumologicprocessor